Skip to content

Commit af1039a

Browse files
theEfrain08anlyyao
andauthored
fix(toast): 新增 warning 主题类型 (#3517)
* fix(toast): 新增 warning 主题类型 * docs: update docs by tdesign-api --------- Co-authored-by: anlyyao <anly_yaw@163.com>
1 parent 6d150e3 commit af1039a

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/toast/README.en-US.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ overlay-props | Object | - | Typescript:`OverlayProps `,[Overlay API Documen
1616
placement | String | middle | options: top/middle/bottom | N
1717
prevent-scroll-through | Boolean | false | \- | N
1818
show-overlay | Boolean | false | \- | N
19-
theme | String | - | options: loading/success/error | N
19+
theme | String | - | options: loading/success/warning/error | N
2020
using-custom-navbar | Boolean | false | \- | N
2121

2222
### Toast Events
@@ -25,6 +25,7 @@ name | params | description
2525
-- | -- | --
2626
close | \- | \-
2727
destroy | \- | \-
28+
2829
### Toast External Classes
2930

3031
className | Description

src/toast/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ overlay-props | Object | - | 遮罩层属性,透传至 Overlay。TS 类型:`
5353
placement | String | middle | 弹窗展示位置。可选项: top/middle/bottom | N
5454
prevent-scroll-through | Boolean | false | 防止滚动穿透,即不允许点击和滚动 | N
5555
show-overlay | Boolean | false | 是否显示遮罩层 | N
56-
theme | String | - | 提示类型。可选项:loading/success/error | N
56+
theme | String | - | 提示类型。可选项:loading/success/warning/error | N
5757
using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
5858

5959
### Toast Events
@@ -62,6 +62,7 @@ using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
6262
-- | -- | --
6363
close | \- | 轻提示隐藏的时候触发
6464
destroy | \- | 轻提示销毁的时候触发
65+
6566
### Toast External Classes
6667

6768
类名 | 描述

src/toast/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getInstance } from '../common/utils';
22

33
type Context = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
44

5-
type ToastType = 'loading' | 'success' | 'error';
5+
type ToastType = 'loading' | 'success' | 'warning' | 'error';
66
type ToastPositionType = 'top' | 'middle' | 'bottom';
77
type ToastDirectionType = 'row' | 'column';
88

src/toast/type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export interface TdToastProps {
7373
*/
7474
theme?: {
7575
type: StringConstructor;
76-
value?: 'loading' | 'success' | 'error';
76+
value?: 'loading' | 'success' | 'warning' | 'error';
7777
};
7878
/**
7979
* 是否使用了自定义导航栏

0 commit comments

Comments
 (0)