diff --git a/src/toast/README.en-US.md b/src/toast/README.en-US.md index 579747c8f..55a1ee7db 100644 --- a/src/toast/README.en-US.md +++ b/src/toast/README.en-US.md @@ -16,7 +16,7 @@ overlay-props | Object | - | Typescript:`OverlayProps `,[Overlay API Documen placement | String | middle | options: top/middle/bottom | N prevent-scroll-through | Boolean | false | \- | N show-overlay | Boolean | false | \- | N -theme | String | - | options: loading/success/error | N +theme | String | - | options: loading/success/warning/error | N using-custom-navbar | Boolean | false | \- | N ### Toast Events @@ -25,6 +25,7 @@ name | params | description -- | -- | -- close | \- | \- destroy | \- | \- + ### Toast External Classes className | Description diff --git a/src/toast/README.md b/src/toast/README.md index bc6e1ee9f..e910aff9b 100644 --- a/src/toast/README.md +++ b/src/toast/README.md @@ -53,7 +53,7 @@ overlay-props | Object | - | 遮罩层属性,透传至 Overlay。TS 类型:` placement | String | middle | 弹窗展示位置。可选项: top/middle/bottom | N prevent-scroll-through | Boolean | false | 防止滚动穿透,即不允许点击和滚动 | N show-overlay | Boolean | false | 是否显示遮罩层 | N -theme | String | - | 提示类型。可选项:loading/success/error | N +theme | String | - | 提示类型。可选项:loading/success/warning/error | N using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N ### Toast Events @@ -62,6 +62,7 @@ using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N -- | -- | -- close | \- | 轻提示隐藏的时候触发 destroy | \- | 轻提示销毁的时候触发 + ### Toast External Classes 类名 | 描述 diff --git a/src/toast/index.ts b/src/toast/index.ts index 80c0c79d2..a0a7f1dc7 100644 --- a/src/toast/index.ts +++ b/src/toast/index.ts @@ -2,7 +2,7 @@ import { getInstance } from '../common/utils'; type Context = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance; -type ToastType = 'loading' | 'success' | 'error'; +type ToastType = 'loading' | 'success' | 'warning' | 'error'; type ToastPositionType = 'top' | 'middle' | 'bottom'; type ToastDirectionType = 'row' | 'column'; diff --git a/src/toast/type.ts b/src/toast/type.ts index 6bace569d..00226be20 100644 --- a/src/toast/type.ts +++ b/src/toast/type.ts @@ -73,7 +73,7 @@ export interface TdToastProps { */ theme?: { type: StringConstructor; - value?: 'loading' | 'success' | 'error'; + value?: 'loading' | 'success' | 'warning' | 'error'; }; /** * 是否使用了自定义导航栏