From 4c856b2eea84e21c946257559c62c7fe47f0f3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E4=BC=9F=E6=9D=B0?= <674416404@qq.com> Date: Tue, 3 Sep 2024 16:13:31 +0800 Subject: [PATCH] docs(Toast): sync api doc --- src/toast/README.en-US.md | 4 ++-- src/toast/README.md | 6 +++--- src/toast/props.ts | 6 +++++- src/toast/type.ts | 3 +-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/toast/README.en-US.md b/src/toast/README.en-US.md index 0c80f67f0..579747c8f 100644 --- a/src/toast/README.en-US.md +++ b/src/toast/README.en-US.md @@ -12,7 +12,7 @@ direction | String | row | options: row/column | N duration | Number | 2000 | \- | N icon | String / Object / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N message | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -overlay-props | Object | {} | Typescript:`OverlayProps `,[Overlay API Documents](./overlay?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/toast/type.ts) | N +overlay-props | Object | - | Typescript:`OverlayProps `,[Overlay API Documents](./overlay?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/toast/type.ts) | N placement | String | middle | options: top/middle/bottom | N prevent-scroll-through | Boolean | false | \- | N show-overlay | Boolean | false | \- | N @@ -24,7 +24,7 @@ using-custom-navbar | Boolean | false | \- | N name | params | description -- | -- | -- close | \- | \- -destory | \- | \- +destroy | \- | \- ### Toast External Classes className | Description diff --git a/src/toast/README.md b/src/toast/README.md index cb83447aa..bc6e1ee9f 100644 --- a/src/toast/README.md +++ b/src/toast/README.md @@ -49,11 +49,11 @@ direction | String | row | 图标排列方式。可选项:row/column | N duration | Number | 2000 | 弹窗显示毫秒数 | N icon | String / Object / Slot | - | 自定义图标。传入对象则透传至 Icon 组件。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N message | String / Slot | - | 弹窗显示文字。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -overlay-props | Object | {} | 遮罩层属性,透传至 Overlay。TS 类型:`OverlayProps `,[Overlay API Documents](./overlay?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/toast/type.ts) | N +overlay-props | Object | - | 遮罩层属性,透传至 Overlay。TS 类型:`OverlayProps `,[Overlay API Documents](./overlay?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/toast/type.ts) | N placement | String | middle | 弹窗展示位置。可选项: top/middle/bottom | N prevent-scroll-through | Boolean | false | 防止滚动穿透,即不允许点击和滚动 | N show-overlay | Boolean | false | 是否显示遮罩层 | N -theme | String | - | 提示类型。可选项:loading/success/error,skyline模式下暂不支持枚举值loading | N +theme | String | - | 提示类型。可选项:loading/success/error | N using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N ### Toast Events @@ -61,7 +61,7 @@ using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N 名称 | 参数 | 描述 -- | -- | -- close | \- | 轻提示隐藏的时候触发 -destory | \- | 轻提示销毁的时候触发 +destroy | \- | 轻提示销毁的时候触发 ### Toast External Classes 类名 | 描述 diff --git a/src/toast/props.ts b/src/toast/props.ts index 3d82f64bf..783713979 100644 --- a/src/toast/props.ts +++ b/src/toast/props.ts @@ -27,7 +27,6 @@ const props: TdToastProps = { /** 遮罩层属性,透传至 Overlay */ overlayProps: { type: Object, - value: {}, }, /** 弹窗展示位置 */ placement: { @@ -48,6 +47,11 @@ const props: TdToastProps = { theme: { type: String, }, + /** 是否使用了自定义导航栏 */ + usingCustomNavbar: { + type: Boolean, + value: false, + }, }; export default props; diff --git a/src/toast/type.ts b/src/toast/type.ts index aedec78e1..6bace569d 100644 --- a/src/toast/type.ts +++ b/src/toast/type.ts @@ -4,7 +4,7 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ -import { TdOverlayProps as OverlayProps } from '../overlay/index'; +import { OverlayProps } from '../overlay/index'; export interface TdToastProps { /** @@ -39,7 +39,6 @@ export interface TdToastProps { }; /** * 遮罩层属性,透传至 Overlay - * @default {} */ overlayProps?: { type: ObjectConstructor;