diff --git a/db/TDesign.db b/db/TDesign.db index 67dff5920..dea73c20a 100644 Binary files a/db/TDesign.db and b/db/TDesign.db differ diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/README.md b/packages/products/tdesign-miniprogram/src/action-sheet/README.md index a853f2801..7ce86116c 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/README.md +++ b/packages/products/tdesign-miniprogram/src/action-sheet/README.md @@ -13,7 +13,7 @@ cancel-text | String | - | 设置取消按钮的文本 | N count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N description | String | - | `0.29.0`。动作面板描述文字 | N items | Array | - | 必需。菜单项。TS 类型:`Array` `interface ActionSheetItem { label: string; color?: string; disabled?: boolean; icon?: string; suffixIcon?: string }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y -popup-props | Object | {} | popupProps透传。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | N +popup-props | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | N show-cancel | Boolean | true | 是否显示取消按钮 | N show-overlay | Boolean | true | 是否显示遮罩层 | N theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/props.ts b/packages/products/tdesign-miniprogram/src/action-sheet/props.ts index cceef789e..8f604c762 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/props.ts +++ b/packages/products/tdesign-miniprogram/src/action-sheet/props.ts @@ -31,7 +31,7 @@ const props: TdActionSheetProps = { type: Array, required: true, }, - /** popupProps透传 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object, value: {}, diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/type.ts b/packages/products/tdesign-miniprogram/src/action-sheet/type.ts index c241ab81c..f99d9a658 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/type.ts +++ b/packages/products/tdesign-miniprogram/src/action-sheet/type.ts @@ -48,7 +48,7 @@ export interface TdActionSheetProps { required?: boolean; }; /** - * popupProps透传 + * 透传 Popup 组件全部属性 * @default {} */ popupProps?: { diff --git a/packages/products/tdesign-miniprogram/src/alert/README.en-US.md b/packages/products/tdesign-miniprogram/src/alert/README.en-US.md deleted file mode 100644 index ee84cd639..000000000 --- a/packages/products/tdesign-miniprogram/src/alert/README.en-US.md +++ /dev/null @@ -1,23 +0,0 @@ -:: BASE_DOC :: - -## API - -### Alert Props - -name | type | default | description | required --- | -- | -- | -- | -- -style | Object | - | CSS(Cascading Style Sheets) | N -custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N -close | String / Boolean / Slot | false | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -max-line | Number | 0 | \- | N -message | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -operation | Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -theme | String | info | options: success/info/warning/error | N -title | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N - -### Alert Events - -name | params | description --- | -- | -- -close | - | \- -closed | `(detail: { e: TransitionEvent })` | \- diff --git a/packages/products/tdesign-miniprogram/src/alert/README.md b/packages/products/tdesign-miniprogram/src/alert/README.md deleted file mode 100644 index 0bd4cb715..000000000 --- a/packages/products/tdesign-miniprogram/src/alert/README.md +++ /dev/null @@ -1,23 +0,0 @@ -:: BASE_DOC :: - -## API - -### Alert Props - -名称 | 类型 | 默认值 | 描述 | 必传 --- | -- | -- | -- | -- -style | Object | - | 样式 | N -custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N -close | String / Boolean / Slot | false | 关闭按钮。值为 true 则显示默认关闭按钮;值为 false 则不显示按钮;值类型为 string 则直接显示;值类型为 Function 则可以自定关闭按钮。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -max-line | Number | 0 | 内容显示最大行数,超出的内容会折叠收起,用户点击后再展开。值为 0 表示不折叠 | N -message | String / Slot | - | 内容(子元素)。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -operation | Slot | - | 跟在告警内容后面的操作区。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -theme | String | info | 组件风格。可选项:success/info/warning/error | N -title | String / Slot | - | 标题。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N - -### Alert Events - -名称 | 参数 | 描述 --- | -- | -- -close | - | 关闭按钮点击时触发 -closed | `(detail: { e: TransitionEvent })` | 告警提示框关闭动画结束后触发 diff --git a/packages/products/tdesign-miniprogram/src/avatar/avatar-group-props.ts b/packages/products/tdesign-miniprogram/src/avatar/avatar-group-props.ts deleted file mode 100644 index ad462848f..000000000 --- a/packages/products/tdesign-miniprogram/src/avatar/avatar-group-props.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdAvatarGroupProps } from './type'; -const props: TdAvatarGroupProps = { - /** 图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上 */ - cascading: { - type: String, - value: 'right-up', - }, - /** 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多` */ - collapseAvatar: { - type: String, - }, - /** 组件类名,用于设置组件外层元素类名 */ - externalClasses: { - type: Array, - }, - /** 能够同时显示的最多头像数量 */ - max: { - type: Number, - }, - /** 尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size */ - size: { - type: String, - value: 'medium', - }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/back-top/README.en-US.md b/packages/products/tdesign-miniprogram/src/back-top/README.en-US.md index 14f120daa..193e1caed 100644 --- a/packages/products/tdesign-miniprogram/src/back-top/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/back-top/README.en-US.md @@ -20,6 +20,7 @@ visibility-height | Number | 200 | \- | N name | params | description -- | -- | -- to-top | \- | \- + ### BackTop External Classes className | Description diff --git a/packages/products/tdesign-miniprogram/src/back-top/README.md b/packages/products/tdesign-miniprogram/src/back-top/README.md index f3835e58c..030098676 100644 --- a/packages/products/tdesign-miniprogram/src/back-top/README.md +++ b/packages/products/tdesign-miniprogram/src/back-top/README.md @@ -20,6 +20,7 @@ visibility-height | Number | 200 | 滚动高度达到此参数值才出现 | N 名称 | 参数 | 描述 -- | -- | -- to-top | \- | 点击触发 + ### BackTop External Classes 类名 | 描述 diff --git a/packages/products/tdesign-miniprogram/src/back-top/props.ts b/packages/products/tdesign-miniprogram/src/back-top/props.ts index abdacbaf8..a01d07712 100644 --- a/packages/products/tdesign-miniprogram/src/back-top/props.ts +++ b/packages/products/tdesign-miniprogram/src/back-top/props.ts @@ -21,11 +21,6 @@ const props: TdBackTopProps = { type: Number, value: 0, }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, /** 文案 */ text: { type: String, diff --git a/packages/products/tdesign-miniprogram/src/back-top/type.ts b/packages/products/tdesign-miniprogram/src/back-top/type.ts index 21196e2d2..3b0c8ebaa 100644 --- a/packages/products/tdesign-miniprogram/src/back-top/type.ts +++ b/packages/products/tdesign-miniprogram/src/back-top/type.ts @@ -29,14 +29,6 @@ export interface TdBackTopProps { type: NumberConstructor; value?: number; }; - /** - * 自定义组件样式 - * @default '' - */ - style?: { - type: StringConstructor; - value?: string; - }; /** * 文案 * @default '' diff --git a/packages/products/tdesign-miniprogram/src/badge/README.en-US.md b/packages/products/tdesign-miniprogram/src/badge/README.en-US.md index 8d005b6de..b7093c416 100644 --- a/packages/products/tdesign-miniprogram/src/badge/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/badge/README.en-US.md @@ -17,6 +17,7 @@ offset | Array | - | Typescript:`Array` | N shape | String | circle | options: circle/square/bubble/ribbon | N show-zero | Boolean | false | \- | N size | String | medium | options: medium/large | N + ### Badge External Classes className | Description diff --git a/packages/products/tdesign-miniprogram/src/badge/README.md b/packages/products/tdesign-miniprogram/src/badge/README.md index 7a97e2577..f62fe85ee 100644 --- a/packages/products/tdesign-miniprogram/src/badge/README.md +++ b/packages/products/tdesign-miniprogram/src/badge/README.md @@ -17,6 +17,7 @@ offset | Array | - | 设置状态点的位置偏移,示例:[-10, 20] 或 ['1 shape | String | circle | 形状。可选项:circle/square/bubble/ribbon | N show-zero | Boolean | false | 当数值为 0 时,是否展示徽标 | N size | String | medium | 尺寸。可选项:medium/large | N + ### Badge External Classes 类名 | 描述 diff --git a/packages/products/tdesign-miniprogram/src/badge/props.ts b/packages/products/tdesign-miniprogram/src/badge/props.ts index b121776ea..bf7988856 100644 --- a/packages/products/tdesign-miniprogram/src/badge/props.ts +++ b/packages/products/tdesign-miniprogram/src/badge/props.ts @@ -26,10 +26,6 @@ const props: TdBadgeProps = { type: Boolean, value: false, }, - /** 组件类名,分别用于设置外层元素、默认内容、右上角内容等元素类名 */ - externalClasses: { - type: Array, - }, /** 封顶的数字值 */ maxCount: { type: Number, @@ -54,11 +50,6 @@ const props: TdBadgeProps = { type: String, value: 'medium', }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, }; export default props; diff --git a/packages/products/tdesign-miniprogram/src/badge/type.ts b/packages/products/tdesign-miniprogram/src/badge/type.ts index 6c4f9689d..92ac9cdf0 100644 --- a/packages/products/tdesign-miniprogram/src/badge/type.ts +++ b/packages/products/tdesign-miniprogram/src/badge/type.ts @@ -37,13 +37,6 @@ export interface TdBadgeProps { type: BooleanConstructor; value?: boolean; }; - /** - * 组件类名,分别用于设置外层元素、默认内容、右上角内容等元素类名 - */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-content', 't-class-count']; - }; /** * 封顶的数字值 * @default 99 @@ -65,7 +58,7 @@ export interface TdBadgeProps { */ shape?: { type: StringConstructor; - value?: 'circle' | 'square' | 'round' | 'ribbon'; + value?: 'circle' | 'square' | 'bubble' | 'ribbon'; }; /** * 当数值为 0 时,是否展示徽标 @@ -81,14 +74,6 @@ export interface TdBadgeProps { */ size?: { type: StringConstructor; - value?: 'small' | 'medium'; - }; - /** - * 自定义组件样式 - * @default '' - */ - style?: { - type: StringConstructor; - value?: string; + value?: 'medium' | 'large'; }; } diff --git a/packages/products/tdesign-miniprogram/src/button/props.ts b/packages/products/tdesign-miniprogram/src/button/props.ts index 014d96669..fe739c518 100644 --- a/packages/products/tdesign-miniprogram/src/button/props.ts +++ b/packages/products/tdesign-miniprogram/src/button/props.ts @@ -115,11 +115,6 @@ const props: TdButtonProps = { type: String, value: 'medium', }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, /** 按钮标签id */ tId: { type: String, diff --git a/packages/products/tdesign-miniprogram/src/button/type.ts b/packages/products/tdesign-miniprogram/src/button/type.ts index 755a393bf..b6e5da082 100644 --- a/packages/products/tdesign-miniprogram/src/button/type.ts +++ b/packages/products/tdesign-miniprogram/src/button/type.ts @@ -193,14 +193,6 @@ export interface TdButtonProps { type: StringConstructor; value?: 'extra-small' | 'small' | 'medium' | 'large'; }; - /** - * 自定义组件样式 - * @default '' - */ - style?: { - type: StringConstructor; - value?: string; - }; /** * 按钮标签id * @default '' diff --git a/packages/products/tdesign-miniprogram/src/cell-group/README.en-US.md b/packages/products/tdesign-miniprogram/src/cell-group/README.en-US.md deleted file mode 100644 index 3a7b191d3..000000000 --- a/packages/products/tdesign-miniprogram/src/cell-group/README.en-US.md +++ /dev/null @@ -1,19 +0,0 @@ -:: BASE_DOC :: - -## API - -### CellGroup Props - -name | type | default | description | required --- | -- | -- | -- | -- -style | Object | - | CSS(Cascading Style Sheets) | N -custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N -bordered | Boolean | - | \- | N -theme | String | default | options: default/card | N -title | String | - | \- | N -### CellGroup External Classes - -className | Description --- | -- -t-class | \- -t-class-title | \- diff --git a/packages/products/tdesign-miniprogram/src/cell-group/README.md b/packages/products/tdesign-miniprogram/src/cell-group/README.md deleted file mode 100644 index d20741e07..000000000 --- a/packages/products/tdesign-miniprogram/src/cell-group/README.md +++ /dev/null @@ -1,19 +0,0 @@ -:: BASE_DOC :: - -## API - -### CellGroup Props - -名称 | 类型 | 默认值 | 描述 | 必传 --- | -- | -- | -- | -- -style | Object | - | 样式 | N -custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N -bordered | Boolean | - | 是否显示组边框 | N -theme | String | default | 单元格风格。可选项:default/card | N -title | String | - | 单元格组标题 | N -### CellGroup External Classes - -类名 | 描述 --- | -- -t-class | 根节点样式类 -t-class-title | 标题样式类 diff --git a/packages/products/tdesign-miniprogram/src/cell-group/props.ts b/packages/products/tdesign-miniprogram/src/cell-group/props.ts index 51fe0e8fa..67de5b738 100644 --- a/packages/products/tdesign-miniprogram/src/cell-group/props.ts +++ b/packages/products/tdesign-miniprogram/src/cell-group/props.ts @@ -9,15 +9,12 @@ const props: TdCellGroupProps = { /** 是否显示组边框 */ bordered: { type: Boolean, + value: false, }, - /** 组件类名 */ - externalClasses: { - type: Array, - }, - /** 自定义组件样式 */ - style: { + /** 单元格组风格 */ + theme: { type: String, - value: '', + value: 'default', }, /** 单元格组标题 */ title: { diff --git a/packages/products/tdesign-miniprogram/src/cell-group/type.ts b/packages/products/tdesign-miniprogram/src/cell-group/type.ts index 22fa38acc..657fe4ee7 100644 --- a/packages/products/tdesign-miniprogram/src/cell-group/type.ts +++ b/packages/products/tdesign-miniprogram/src/cell-group/type.ts @@ -7,25 +7,19 @@ export interface TdCellGroupProps { /** * 是否显示组边框 + * @default false */ bordered?: { type: BooleanConstructor; value?: boolean; }; /** - * 组件类名 + * 单元格组风格 + * @default default */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class']; - }; - /** - * 自定义组件样式 - * @default '' - */ - style?: { + theme?: { type: StringConstructor; - value?: string; + value?: 'default' | 'card'; }; /** * 单元格组标题 diff --git a/packages/products/tdesign-miniprogram/src/cell/README.en-US.md b/packages/products/tdesign-miniprogram/src/cell/README.en-US.md index 496b5aed5..283e5b8cb 100644 --- a/packages/products/tdesign-miniprogram/src/cell/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/cell/README.en-US.md @@ -27,6 +27,7 @@ url | String | - | \- | N name | params | description -- | -- | -- click | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) + ### Cell External Classes className | Description @@ -42,3 +43,21 @@ t-class-note | \- t-class-right | \- t-class-right-icon | \- t-class-title | \- + + +### CellGroup Props + +name | type | default | description | required +-- | -- | -- | -- | -- +style | Object | - | CSS(Cascading Style Sheets) | N +custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N +bordered | Boolean | false | \- | N +theme | String | default | options: default/card | N +title | String | - | \- | N + +### CellGroup External Classes + +className | Description +-- | -- +t-class | \- +t-class-title | \- diff --git a/packages/products/tdesign-miniprogram/src/cell/README.md b/packages/products/tdesign-miniprogram/src/cell/README.md index 6963edd8d..4f94f3221 100644 --- a/packages/products/tdesign-miniprogram/src/cell/README.md +++ b/packages/products/tdesign-miniprogram/src/cell/README.md @@ -27,6 +27,7 @@ url | String | - | 点击后跳转链接地址。如果值为空,则表示不 名称 | 参数 | 描述 -- | -- | -- click | - | 右侧内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) + ### Cell External Classes 类名 | 描述 @@ -42,3 +43,21 @@ t-class-note | 右侧说明文字样式类 t-class-right | 右侧内容样式类 t-class-right-icon | 右侧图标样式类 t-class-title | 标题样式类 + + +### CellGroup Props + +名称 | 类型 | 默认值 | 描述 | 必传 +-- | -- | -- | -- | -- +style | Object | - | 样式 | N +custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N +bordered | Boolean | false | 是否显示组边框 | N +theme | String | default | 单元格组风格。可选项:default/card | N +title | String | - | 单元格组标题 | N + +### CellGroup External Classes + +类名 | 描述 +-- | -- +t-class | 根节点样式类 +t-class-title | 标题样式类 diff --git a/packages/products/tdesign-miniprogram/src/check-tag/README.en-US.md b/packages/products/tdesign-miniprogram/src/check-tag/README.en-US.md deleted file mode 100644 index 7f4b09476..000000000 --- a/packages/products/tdesign-miniprogram/src/check-tag/README.en-US.md +++ /dev/null @@ -1,32 +0,0 @@ -:: BASE_DOC :: - -## API - -### CheckTag Props - -name | type | default | description | required --- | -- | -- | -- | -- -style | Object | - | CSS(Cascading Style Sheets) | N -custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N -checked | Boolean | undefined | \- | N -default-checked | Boolean | undefined | uncontrolled property | N -closable | Boolean | false | \- | N -content | String / Number / Array / Slot | - | Typescript:`string \| number \| string[]` | N -disabled | Boolean | false | \- | N -icon | String / Object / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -shape | String | square | options: square/round/mark | N -size | String | medium | options: small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -variant | String | dark | `0.26.0`。options: dark/light/outline/light-outline | N - -### CheckTag Events - -name | params | description --- | -- | -- -change | `(checked: boolean)` | \- -click | - | \- -close | \- | \- -### CheckTag External Classes - -className | Description --- | -- -t-class | \- diff --git a/packages/products/tdesign-miniprogram/src/check-tag/README.md b/packages/products/tdesign-miniprogram/src/check-tag/README.md deleted file mode 100644 index c81af0807..000000000 --- a/packages/products/tdesign-miniprogram/src/check-tag/README.md +++ /dev/null @@ -1,32 +0,0 @@ -:: BASE_DOC :: - -## API - -### CheckTag Props - -名称 | 类型 | 默认值 | 描述 | 必传 --- | -- | -- | -- | -- -style | Object | - | 样式 | N -custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N -checked | Boolean | undefined | 标签选中的状态,默认风格(theme=default)才有选中态 | N -default-checked | Boolean | undefined | 标签选中的状态,默认风格(theme=default)才有选中态。非受控属性 | N -closable | Boolean | false | 标签是否可关闭 | N -content | String / Number / Array / Slot | - | 组件子元素;传入数组时:[选中内容,非选中内容]。TS 类型:`string \| number \| string[]` | N -disabled | Boolean | false | 标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态 | N -icon | String / Object / Slot | - | 标签图标。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -shape | String | square | 标签类型,有三种:方形、圆角方形、标记型。可选项:square/round/mark | N -size | String | medium | 标签尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -variant | String | dark | `0.26.0`。标签风格变体。可选项:dark/light/outline/light-outline | N - -### CheckTag Events - -名称 | 参数 | 描述 --- | -- | -- -change | `(checked: boolean)` | 状态切换时触发 -click | - | 点击标签时触发 -close | \- | 如果关闭按钮存在,点击关闭按钮时触发 -### CheckTag External Classes - -类名 | 描述 --- | -- -t-class | 根节点样式类 diff --git a/packages/products/tdesign-miniprogram/src/collapse-panel/props.ts b/packages/products/tdesign-miniprogram/src/collapse-panel/props.ts index 238c3a837..78c9a00e3 100644 --- a/packages/products/tdesign-miniprogram/src/collapse-panel/props.ts +++ b/packages/products/tdesign-miniprogram/src/collapse-panel/props.ts @@ -20,10 +20,6 @@ const props: TdCollapsePanelProps = { type: null, value: undefined, }, - /** 组件类名,用于组件外层元素、标题、内容 */ - externalClasses: { - type: Array, - }, /** 面板头内容 */ header: { type: String, diff --git a/packages/products/tdesign-miniprogram/src/collapse-panel/type.ts b/packages/products/tdesign-miniprogram/src/collapse-panel/type.ts index 905e3c98f..74864c621 100644 --- a/packages/products/tdesign-miniprogram/src/collapse-panel/type.ts +++ b/packages/products/tdesign-miniprogram/src/collapse-panel/type.ts @@ -26,13 +26,6 @@ export interface TdCollapsePanelProps { type: BooleanConstructor; value?: boolean; }; - /** - * 组件类名,用于组件外层元素、标题、内容 - */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-header', 't-class-content']; - }; /** * 面板头内容 */ diff --git a/packages/products/tdesign-miniprogram/src/collapse/README.en-US.md b/packages/products/tdesign-miniprogram/src/collapse/README.en-US.md index e8f37ab60..a8919244d 100644 --- a/packages/products/tdesign-miniprogram/src/collapse/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/collapse/README.en-US.md @@ -37,6 +37,7 @@ header-left-icon | String / Slot | - | [see more ts definition](https://github.c header-right-content | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N placement | String | bottom | `0.34.0`。options: bottom/top | N value | String / Number | - | \- | N + ### CollapsePanel External Classes className | Description diff --git a/packages/products/tdesign-miniprogram/src/collapse/README.md b/packages/products/tdesign-miniprogram/src/collapse/README.md index 242dc3290..4d7229e05 100644 --- a/packages/products/tdesign-miniprogram/src/collapse/README.md +++ b/packages/products/tdesign-miniprogram/src/collapse/README.md @@ -37,6 +37,7 @@ header-left-icon | String / Slot | - | 面板头左侧图标。[通用类型定 header-right-content | String / Slot | - | 面板头的右侧区域,一般用于呈现面板操作。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N placement | String | bottom | `0.34.0`。选项卡内容的位置。可选项:bottom/top | N value | String / Number | - | 当前面板唯一标识,如果值为空则取当前面下标兜底作为唯一标识 | N + ### CollapsePanel External Classes 类名 | 描述 diff --git a/packages/products/tdesign-miniprogram/src/collapse/collapse-panel-props.ts b/packages/products/tdesign-miniprogram/src/collapse/collapse-panel-props.ts deleted file mode 100644 index b5df2e00f..000000000 --- a/packages/products/tdesign-miniprogram/src/collapse/collapse-panel-props.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdCollapsePanelProps } from './type'; -const props: TdCollapsePanelProps = { - /** 折叠面板内容 */ - content: { - type: String, - }, - /** 禁止当前面板展开,优先级大于 Collapse 的同名属性 */ - disabled: { - type: Boolean, - value: undefined, - }, - /** 当前折叠面板展开图标,优先级大于 Collapse 的同名属性 */ - expandIcon: { - type: Boolean, - value: undefined, - }, - /** 组件类名,用于组件外层元素、标题、内容 */ - externalClasses: { - type: Array, - }, - /** 面板头内容 */ - header: { - type: String, - }, - /** 面板头的右侧区域,一般用于呈现面板操作 */ - headerRightContent: { - type: String, - }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, - /** 当前面板唯一标识,如果值为空则取当前面下标兜底作为唯一标识 */ - value: { - type: null, - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/color-picker/README.md b/packages/products/tdesign-miniprogram/src/color-picker/README.md index 081ae2f20..7398c2323 100644 --- a/packages/products/tdesign-miniprogram/src/color-picker/README.md +++ b/packages/products/tdesign-miniprogram/src/color-picker/README.md @@ -14,7 +14,7 @@ fixed | Boolean | false | `1.8.5`。如果 color-picker 是在一个 `position:f footer | Slot | - | 底部插槽,仅在 `usePopup` 为 `true` 时有效。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N format | String | RGB | 格式化色值。`enableAlpha` 为真时,`RGBA/HSLA/HSVA` 等值有效。可选项:RGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS | N header | Slot | - | 顶部插槽,仅在 `usePopup` 为 `true` 时有效。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -popup-props | Object | {} | popupProps透传。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/color-picker/type.ts) | N +popup-props | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/color-picker/type.ts) | N swatch-colors | Array | - | 系统预设的颜色样例,值为 `null` 或 `[]` 则不显示系统色,值为 `undefined` 会显示组件内置的系统默认色。TS 类型:`Array \| null` | N type | String | base | 颜色选择器类型。(base 表示仅展示系统预设内容; multiple 表示展示色板和系统预设内容。可选项:base/multiple。TS 类型:`TypeEnum ` `type TypeEnum = 'base' \| 'multiple'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/color-picker/type.ts) | N use-popup | Boolean | false | 是否使用弹出层包裹颜色选择器 | N diff --git a/packages/products/tdesign-miniprogram/src/color-picker/props.ts b/packages/products/tdesign-miniprogram/src/color-picker/props.ts index d5389acf1..4e6b459c2 100644 --- a/packages/products/tdesign-miniprogram/src/color-picker/props.ts +++ b/packages/products/tdesign-miniprogram/src/color-picker/props.ts @@ -26,7 +26,7 @@ const props: TdColorPickerProps = { type: String, value: 'RGB', }, - /** popupProps透传 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object, value: {}, diff --git a/packages/products/tdesign-miniprogram/src/color-picker/type.ts b/packages/products/tdesign-miniprogram/src/color-picker/type.ts index 1eb6db4ef..969a99bf6 100644 --- a/packages/products/tdesign-miniprogram/src/color-picker/type.ts +++ b/packages/products/tdesign-miniprogram/src/color-picker/type.ts @@ -40,7 +40,7 @@ export interface TdColorPickerProps { value?: 'RGB' | 'RGBA' | 'HSL' | 'HSLA' | 'HSB' | 'HSV' | 'HSVA' | 'HEX' | 'CMYK' | 'CSS'; }; /** - * popupProps透传 + * 透传 Popup 组件全部属性 * @default {} */ popupProps?: { diff --git a/packages/products/tdesign-miniprogram/src/date-time-picker/README.md b/packages/products/tdesign-miniprogram/src/date-time-picker/README.md index 331835325..c41418a94 100644 --- a/packages/products/tdesign-miniprogram/src/date-time-picker/README.md +++ b/packages/products/tdesign-miniprogram/src/date-time-picker/README.md @@ -18,7 +18,7 @@ footer | Slot | - | 底部内容。[通用类型定义](https://github.com/Tence format | String | 'YYYY-MM-DD HH:mm:ss' | 用于格式化 pick、change、confirm 事件返回的值,[详细文档](https://day.js.org/docs/en/display/format) | N header | Boolean / Slot | true | 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N mode | String / Array | 'date' | year = 年;month = 年月;date = 年月日;hour = 年月日时; minute = 年月日时分;当类型为数组时,第一个值控制年月日,第二个值控制时分秒。TS 类型:`DateTimePickerMode` `type DateTimePickerMode = TimeModeValues \| Array ` `type TimeModeValues = 'year' \| 'month' \| 'date' \| 'hour' \| 'minute' \| 'second'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/date-time-picker/type.ts) | N -popup-props | Object | {} | 透传 `Popup` 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/date-time-picker/type.ts) | N +popup-props | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/date-time-picker/type.ts) | N show-week | Boolean | false | 【开发中】是否在日期旁边显示周几(如周一,周二,周日等) | N start | String / Number | - | 选择器的最小可选时间,默认为当前时间-10年 | N steps | Object | - | 时间间隔步数,示例:`{ minute: 5 }` | N diff --git a/packages/products/tdesign-miniprogram/src/date-time-picker/props.ts b/packages/products/tdesign-miniprogram/src/date-time-picker/props.ts index fdbd0470d..580ec5c91 100644 --- a/packages/products/tdesign-miniprogram/src/date-time-picker/props.ts +++ b/packages/products/tdesign-miniprogram/src/date-time-picker/props.ts @@ -30,10 +30,6 @@ const props: TdDateTimePickerProps = { end: { type: null, }, - /** 组件类名,分别用于设置组件外层元素、确认按钮、取消按钮、标题等元素类名 */ - externalClasses: { - type: Array, - }, /** 列选项过滤函数,支持自定义列内容。(type 值可为: year, month, date, hour, minute, second) */ filter: { type: null, @@ -53,7 +49,7 @@ const props: TdDateTimePickerProps = { type: null, value: 'date', }, - /** 透传 `Popup` 组件全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object, value: {}, diff --git a/packages/products/tdesign-miniprogram/src/date-time-picker/type.ts b/packages/products/tdesign-miniprogram/src/date-time-picker/type.ts index 060437032..77e63f082 100644 --- a/packages/products/tdesign-miniprogram/src/date-time-picker/type.ts +++ b/packages/products/tdesign-miniprogram/src/date-time-picker/type.ts @@ -46,13 +46,6 @@ export interface TdDateTimePickerProps { type: null; value?: string | number; }; - /** - * 组件类名,分别用于设置组件外层元素、确认按钮、取消按钮、标题等元素类名 - */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-confirm', 't-class-cancel', 't-class-title']; - }; /** * 列选项过滤函数,支持自定义列内容。(type 值可为: year, month, date, hour, minute, second) */ @@ -85,7 +78,7 @@ export interface TdDateTimePickerProps { value?: DateTimePickerMode; }; /** - * 透传 `Popup` 组件全部属性 + * 透传 Popup 组件全部属性 * @default {} */ popupProps?: { diff --git a/packages/products/tdesign-miniprogram/src/dialog/props.ts b/packages/products/tdesign-miniprogram/src/dialog/props.ts index 0688afc13..1f6a47dbe 100644 --- a/packages/products/tdesign-miniprogram/src/dialog/props.ts +++ b/packages/products/tdesign-miniprogram/src/dialog/props.ts @@ -37,10 +37,6 @@ const props: TdDialogProps = { content: { type: String, }, - /** 组件类名,分别用于设置 组件外层元素、组件内容部分、确认按钮、取消按钮 等元素类名 */ - externalClasses: { - type: Array, - }, /** 透传至 Overlay 组件 */ overlayProps: { type: Object, @@ -56,11 +52,6 @@ const props: TdDialogProps = { type: Boolean, value: true, }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, /** 标题 */ title: { type: String, diff --git a/packages/products/tdesign-miniprogram/src/dialog/type.ts b/packages/products/tdesign-miniprogram/src/dialog/type.ts index 779184d13..8fa832fdc 100644 --- a/packages/products/tdesign-miniprogram/src/dialog/type.ts +++ b/packages/products/tdesign-miniprogram/src/dialog/type.ts @@ -61,13 +61,6 @@ export interface TdDialogProps { type: StringConstructor; value?: string; }; - /** - * 组件类名,分别用于设置 组件外层元素、组件内容部分、确认按钮、取消按钮 等元素类名 - */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-content', 't-class-confirm', 't-class-cancel']; - }; /** * 透传至 Overlay 组件 * @default {} @@ -92,14 +85,6 @@ export interface TdDialogProps { type: BooleanConstructor; value?: boolean; }; - /** - * 自定义组件样式 - * @default '' - */ - style?: { - type: StringConstructor; - value?: string; - }; /** * 标题 */ diff --git a/packages/products/tdesign-miniprogram/src/dropdown-item/README.en-US.md b/packages/products/tdesign-miniprogram/src/dropdown-item/README.en-US.md deleted file mode 100644 index 74d88f809..000000000 --- a/packages/products/tdesign-miniprogram/src/dropdown-item/README.en-US.md +++ /dev/null @@ -1,38 +0,0 @@ -:: BASE_DOC :: - -## API - -### DropdownItem Props - -name | type | default | description | required --- | -- | -- | -- | -- -style | Object | - | CSS(Cascading Style Sheets) | N -custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N -disabled | Boolean | false | \- | N -keys | Object | - | Typescript:`KeysType`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -label | String | - | \- | N -multiple | Boolean | false | \- | N -options | Array | [] | Typescript:`Array` `interface DropdownOption { label: string; disabled: boolean; value: DropdownValue; }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/dropdown-item/type.ts) | N -options-columns | String / Number | 1 | \- | N -options-layout | String | columns | `deprecated` | N -value | String / Number / Array | undefined | Typescript:`DropdownValue ` `type DropdownValue = string \| number \| Array;`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/dropdown-item/type.ts) | N -default-value | String / Number / Array | undefined | uncontrolled property。Typescript:`DropdownValue ` `type DropdownValue = string \| number \| Array;`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/dropdown-item/type.ts) | N - -### DropdownItem Events - -name | params | description --- | -- | -- -change | `(value: DropdownValue)` | \- -close | \- | \- -confirm | `(value: DropdownValue)` | \- -reset | \- | \- -### DropdownItem External Classes - -className | Description --- | -- -t-class | \- -t-class-column | \- -t-class-column-item | \- -t-class-column-item-label | \- -t-class-content | \- -t-class-footer | \- diff --git a/packages/products/tdesign-miniprogram/src/dropdown-item/README.md b/packages/products/tdesign-miniprogram/src/dropdown-item/README.md deleted file mode 100644 index 73bd5d904..000000000 --- a/packages/products/tdesign-miniprogram/src/dropdown-item/README.md +++ /dev/null @@ -1,38 +0,0 @@ -:: BASE_DOC :: - -## API - -### DropdownItem Props - -名称 | 类型 | 默认值 | 描述 | 必传 --- | -- | -- | -- | -- -style | Object | - | 样式 | N -custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N -disabled | Boolean | false | 是否禁用 | N -keys | Object | - | 用来定义 value / label 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -label | String | - | 标题 | N -multiple | Boolean | false | 是否多选 | N -options | Array | [] | 选项数据。TS 类型:`Array` `interface DropdownOption { label: string; disabled: boolean; value: DropdownValue; }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/dropdown-item/type.ts) | N -options-columns | String / Number | 1 | 选项分栏(1-3) | N -options-layout | String | columns | 已废弃。选项排列;不再支持 tree 布局,可与 treeSelect 配合使用 | N -value | String / Number / Array | undefined | 选中值。TS 类型:`DropdownValue ` `type DropdownValue = string \| number \| Array;`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/dropdown-item/type.ts) | N -default-value | String / Number / Array | undefined | 选中值。非受控属性。TS 类型:`DropdownValue ` `type DropdownValue = string \| number \| Array;`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/dropdown-item/type.ts) | N - -### DropdownItem Events - -名称 | 参数 | 描述 --- | -- | -- -change | `(value: DropdownValue)` | 值改变时触发 -close | \- | 关闭时触发 -confirm | `(value: DropdownValue)` | 点击确认时触发 -reset | \- | 点击重置时触发 -### DropdownItem External Classes - -类名 | 描述 --- | -- -t-class | 根节点样式类 -t-class-column | 菜单列样式类 -t-class-column-item | 菜单列选项样式类 -t-class-column-item-label | 菜单列选项标签样式类 -t-class-content | 内容样式类 -t-class-footer | 底部样式类 diff --git a/packages/products/tdesign-miniprogram/src/dropdown-item/props.ts b/packages/products/tdesign-miniprogram/src/dropdown-item/props.ts index 3b8cc8d2a..f1da719d6 100644 --- a/packages/products/tdesign-miniprogram/src/dropdown-item/props.ts +++ b/packages/products/tdesign-miniprogram/src/dropdown-item/props.ts @@ -11,10 +11,6 @@ const props: TdDropdownItemProps = { type: Boolean, value: false, }, - /** 组件类名,分别用于设置 组件外层类名、菜单列、菜单列选项、菜单列选项标签、树形菜单、树形菜单列等类名 */ - externalClasses: { - type: Array, - }, /** 用来定义 value / label 在 `options` 中对应的字段别名 */ keys: { type: Object, diff --git a/packages/products/tdesign-miniprogram/src/dropdown-item/type.ts b/packages/products/tdesign-miniprogram/src/dropdown-item/type.ts index 934ec0789..8580d9c41 100644 --- a/packages/products/tdesign-miniprogram/src/dropdown-item/type.ts +++ b/packages/products/tdesign-miniprogram/src/dropdown-item/type.ts @@ -15,20 +15,6 @@ export interface TdDropdownItemProps { type: BooleanConstructor; value?: boolean; }; - /** - * 组件类名,分别用于设置 组件外层类名、菜单列、菜单列选项、菜单列选项标签、树形菜单、树形菜单列等类名 - */ - externalClasses?: { - type: ArrayConstructor; - value?: [ - 't-class', - 't-class-content', - 't-class-column', - 't-class-column-item', - 't-class-column-item-label', - 't-class-footer', - ]; - }; /** * 用来定义 value / label 在 `options` 中对应的字段别名 */ diff --git a/packages/products/tdesign-miniprogram/src/dropdown-menu/dropdown-item-props.ts b/packages/products/tdesign-miniprogram/src/dropdown-menu/dropdown-item-props.ts deleted file mode 100644 index bb999ac69..000000000 --- a/packages/products/tdesign-miniprogram/src/dropdown-menu/dropdown-item-props.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdDropdownItemProps } from './type'; -const props: TdDropdownItemProps = { - /** 自定义组件样式 */ - customStyle: { - type: String, - value: '', - }, - /** 是否禁用 */ - disabled: { - type: Boolean, - value: false, - }, - /** 组件类名,分别用于设置 组件外层类名、菜单列、菜单列选项、菜单列选项标签、树形菜单、树形菜单列等类名 */ - externalClasses: { - type: Array, - }, - /** 用来定义 value / label 在 `options` 中对应的字段别名 */ - keys: { - type: Object, - }, - /** 标题 */ - label: { - type: String, - value: '', - }, - /** 是否多选 */ - multiple: { - type: Boolean, - value: false, - }, - /** 选项数据 */ - options: { - type: Array, - value: [], - }, - /** 选项分栏(1-3) */ - optionsColumns: { - type: null, - value: 1, - }, - /** 选项排列 */ - optionsLayout: { - type: String, - value: 'columns', - }, - /** 选中值 */ - value: { - type: null, - value: undefined, - }, - /** 选中值,非受控属性 */ - defaultValue: { - type: null, - value: undefined, - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/empty/props.ts b/packages/products/tdesign-miniprogram/src/empty/props.ts index f8621f7b5..d539ed3ae 100644 --- a/packages/products/tdesign-miniprogram/src/empty/props.ts +++ b/packages/products/tdesign-miniprogram/src/empty/props.ts @@ -10,10 +10,6 @@ const props: TdEmptyProps = { description: { type: String, }, - /** 组件类名,分别用于设置 组件外层类名、文本描述类名、图片类名、操作按钮类名 */ - externalClasses: { - type: Array, - }, /** 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` */ icon: { type: null, diff --git a/packages/products/tdesign-miniprogram/src/empty/type.ts b/packages/products/tdesign-miniprogram/src/empty/type.ts index 05893b7a9..86b16ea29 100644 --- a/packages/products/tdesign-miniprogram/src/empty/type.ts +++ b/packages/products/tdesign-miniprogram/src/empty/type.ts @@ -12,13 +12,6 @@ export interface TdEmptyProps { type: StringConstructor; value?: string; }; - /** - * 组件类名,分别用于设置 组件外层类名、文本描述类名、图片类名、操作按钮类名 - */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-description', 't-class-image', 't-class-actions']; - }; /** * 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` */ diff --git a/packages/products/tdesign-miniprogram/src/grid/README.en-US.md b/packages/products/tdesign-miniprogram/src/grid/README.en-US.md index 954679409..65745ef34 100644 --- a/packages/products/tdesign-miniprogram/src/grid/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/grid/README.en-US.md @@ -14,6 +14,7 @@ column | Number | 4 | \- | N gutter | Number | - | \- | N hover | Boolean | false | \- | N theme | String | default | options: default/card | N + ### Grid External Classes className | Description @@ -42,6 +43,7 @@ url | String | - | \- | N name | params | description -- | -- | -- click | \- | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) + ### GridItem External Classes className | Description diff --git a/packages/products/tdesign-miniprogram/src/grid/README.md b/packages/products/tdesign-miniprogram/src/grid/README.md index f474e16b0..88c05b349 100644 --- a/packages/products/tdesign-miniprogram/src/grid/README.md +++ b/packages/products/tdesign-miniprogram/src/grid/README.md @@ -14,6 +14,7 @@ column | Number | 4 | 每一行的列数量;为 0 时等于固定大小 | N gutter | Number | - | 间隔大小 | N hover | Boolean | false | 是否开启点击反馈 | N theme | String | default | 宫格的风格。可选项:default/card | N + ### Grid External Classes 类名 | 描述 @@ -42,6 +43,7 @@ url | String | - | 点击后的跳转链接 | N 名称 | 参数 | 描述 -- | -- | -- click | \- | 点击子项后触发。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) + ### GridItem External Classes 类名 | 描述 diff --git a/packages/products/tdesign-miniprogram/src/grid/grid-item-props.ts b/packages/products/tdesign-miniprogram/src/grid/grid-item-props.ts deleted file mode 100644 index 936fe236a..000000000 --- a/packages/products/tdesign-miniprogram/src/grid/grid-item-props.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdGridItemProps } from './type'; -const props: TdGridItemProps = { - /** 头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字 */ - badgeProps: { - type: Object, - }, - /** 文本以外的更多描述,辅助信息。可以通过 Props 传入文本,也可以自定义标题节点 */ - description: { - type: String, - }, - /** 组件类名,分别用于设置组件外层元素、图片、文本、描述等元素类名 */ - externalClasses: { - type: Array, - }, - /** 图片,可以是图片地址,也可以自定义图片节点 */ - image: { - type: String, - }, - /** 链接跳转类型 */ - jumpType: { - type: String, - value: 'navigate-to', - }, - /** 内容布局方式 */ - layout: { - type: String, - value: 'vertical', - }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, - /** 文本,可以通过 Props 传入文本,也可以自定义标题节点 */ - text: { - type: String, - }, - /** 点击后的跳转链接 */ - url: { - type: String, - value: '', - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/indexes-anchor/README.en-US.md b/packages/products/tdesign-miniprogram/src/indexes-anchor/README.en-US.md deleted file mode 100644 index 67fd2b969..000000000 --- a/packages/products/tdesign-miniprogram/src/indexes-anchor/README.en-US.md +++ /dev/null @@ -1,18 +0,0 @@ -:: BASE_DOC :: - -## API - -### IndexesAnchor Props - -name | type | default | description | required --- | -- | -- | -- | -- -style | Object | - | CSS(Cascading Style Sheets) | N -custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N -index | String / Number | - | \- | N -### IndexesAnchor External Classes - -className | Description --- | -- -t-class | class name of root node -t-class-sidebar | \- -t-class-sidebar-item | \- diff --git a/packages/products/tdesign-miniprogram/src/indexes-anchor/README.md b/packages/products/tdesign-miniprogram/src/indexes-anchor/README.md deleted file mode 100644 index 181b808d6..000000000 --- a/packages/products/tdesign-miniprogram/src/indexes-anchor/README.md +++ /dev/null @@ -1,18 +0,0 @@ -:: BASE_DOC :: - -## API - -### IndexesAnchor Props - -名称 | 类型 | 默认值 | 描述 | 必传 --- | -- | -- | -- | -- -style | Object | - | 样式 | N -custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N -index | String / Number | - | 索引字符 | N -### IndexesAnchor External Classes - -类名 | 描述 --- | -- -t-class | 根节点样式类 -t-class-sidebar | 侧边栏样式类 -t-class-sidebar-item | 侧边栏选项样式类 diff --git a/packages/products/tdesign-miniprogram/src/loading/README.en-US.md b/packages/products/tdesign-miniprogram/src/loading/README.en-US.md index cad1df634..bf512a82d 100644 --- a/packages/products/tdesign-miniprogram/src/loading/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/loading/README.en-US.md @@ -10,6 +10,7 @@ style | Object | - | CSS(Cascading Style Sheets) | N custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N delay | Number | 0 | \- | N duration | Number | 800 | \- | N +fullscreen | Boolean | false | `1.8.5` | N indicator | Boolean / Slot | true | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N inherit-color | Boolean | false | \- | N layout | String | horizontal | options: horizontal/vertical | N @@ -20,6 +21,7 @@ reverse | Boolean | - | \- | N size | String | '20px' | \- | N text | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N theme | String | circular | options: circular/spinner/dots | N + ### Loading External Classes className | Description diff --git a/packages/products/tdesign-miniprogram/src/loading/README.md b/packages/products/tdesign-miniprogram/src/loading/README.md index 5a7fec43e..c93452a65 100644 --- a/packages/products/tdesign-miniprogram/src/loading/README.md +++ b/packages/products/tdesign-miniprogram/src/loading/README.md @@ -10,6 +10,7 @@ style | Object | - | 样式 | N custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N delay | Number | 0 | 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 | N duration | Number | 800 | 加载动画执行完成一次的时间,单位:毫秒 | N +fullscreen | Boolean | false | `1.8.5`。是否显示为全屏加载 | N indicator | Boolean / Slot | true | 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N inherit-color | Boolean | false | 是否继承父元素颜色 | N layout | String | horizontal | 对齐方式。可选项:horizontal/vertical | N @@ -20,6 +21,7 @@ reverse | Boolean | - | 加载动画是否反向 | N size | String | '20px' | 尺寸,示例:20px | N text | String / Slot | - | 加载提示文案。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N theme | String | circular | 加载组件类型。可选项:circular/spinner/dots | N + ### Loading External Classes 类名 | 描述 diff --git a/packages/products/tdesign-miniprogram/src/loading/props.ts b/packages/products/tdesign-miniprogram/src/loading/props.ts index 7d7576adc..69952a840 100644 --- a/packages/products/tdesign-miniprogram/src/loading/props.ts +++ b/packages/products/tdesign-miniprogram/src/loading/props.ts @@ -16,9 +16,10 @@ const props: TdLoadingProps = { type: Number, value: 800, }, - /** 组件类名,分别用于设置加载组件外层元素,加载组件文本,加载组件指示符,加载指示符内侧同心圆等元素类名 */ - externalClasses: { - type: Array, + /** 是否显示为全屏加载 */ + fullscreen: { + type: Boolean, + value: false, }, /** 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符 */ indicator: { diff --git a/packages/products/tdesign-miniprogram/src/loading/type.ts b/packages/products/tdesign-miniprogram/src/loading/type.ts index 8d44c4e42..0a55d4592 100644 --- a/packages/products/tdesign-miniprogram/src/loading/type.ts +++ b/packages/products/tdesign-miniprogram/src/loading/type.ts @@ -22,11 +22,12 @@ export interface TdLoadingProps { value?: number; }; /** - * 组件类名,分别用于设置加载组件外层元素,加载组件文本,加载组件指示符,加载指示符内侧同心圆等元素类名 + * 是否显示为全屏加载 + * @default false */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-text', 't-class-indicator']; + fullscreen?: { + type: BooleanConstructor; + value?: boolean; }; /** * 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符 diff --git a/packages/products/tdesign-miniprogram/src/picker/README.md b/packages/products/tdesign-miniprogram/src/picker/README.md index c1a51459e..dd2e1a427 100644 --- a/packages/products/tdesign-miniprogram/src/picker/README.md +++ b/packages/products/tdesign-miniprogram/src/picker/README.md @@ -15,7 +15,7 @@ footer | Slot | - | 底部内容。[通用类型定义](https://github.com/Tence header | Boolean / Slot | true | 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N item-height | Number | 80 | PickerItem 的子项高度,单位 rpx | N keys | Object | - | 用来定义 value / label 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -popup-props | Object | {} | 透传 `Popup` 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/picker/type.ts) | N +popup-props | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/picker/type.ts) | N title | String | '' | 标题 | N use-popup | Boolean | true | 是否使用弹出层包裹 | N using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N diff --git a/packages/products/tdesign-miniprogram/src/picker/props.ts b/packages/products/tdesign-miniprogram/src/picker/props.ts index 3110e6a42..665f41e2e 100644 --- a/packages/products/tdesign-miniprogram/src/picker/props.ts +++ b/packages/products/tdesign-miniprogram/src/picker/props.ts @@ -35,7 +35,7 @@ const props: TdPickerProps = { keys: { type: Object, }, - /** 透传 `Popup` 组件全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object, value: {}, diff --git a/packages/products/tdesign-miniprogram/src/picker/type.ts b/packages/products/tdesign-miniprogram/src/picker/type.ts index 5668b38ef..2d9181d86 100644 --- a/packages/products/tdesign-miniprogram/src/picker/type.ts +++ b/packages/products/tdesign-miniprogram/src/picker/type.ts @@ -57,7 +57,7 @@ export interface TdPickerProps { value?: KeysType; }; /** - * 透传 `Popup` 组件全部属性 + * 透传 Popup 组件全部属性 * @default {} */ popupProps?: { diff --git a/packages/products/tdesign-miniprogram/src/popconfirm/README.en-US.md b/packages/products/tdesign-miniprogram/src/popconfirm/README.en-US.md deleted file mode 100644 index 9446d93b1..000000000 --- a/packages/products/tdesign-miniprogram/src/popconfirm/README.en-US.md +++ /dev/null @@ -1,23 +0,0 @@ -:: BASE_DOC :: - -## API - -### Popconfirm Props - -name | type | default | description | required --- | -- | -- | -- | -- -style | Object | - | CSS(Cascading Style Sheets) | N -custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N -confirm-btn | String / Object / Slot | '' | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -destroy-on-close | Boolean | true | \- | N -popup-props | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/popconfirm/type.ts) | N -theme | String | default | options: default/warning/danger | N -trigger-element | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N - -### Popconfirm Events - -name | params | description --- | -- | -- -cancel | `(options: {})` | \- -confirm | `(options: {})` | \- -visible-change | `(visible: boolean, context?: PopconfirmVisibleChangeContext)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/popconfirm/type.ts)。
`interface PopconfirmVisibleChangeContext { trigger?: TriggerSource; e?: MouseEvent }`

`type TriggerSource = 'cancel' \| 'confirm' \| 'document' \| 'trigger-element-click'`
diff --git a/packages/products/tdesign-miniprogram/src/popconfirm/README.md b/packages/products/tdesign-miniprogram/src/popconfirm/README.md deleted file mode 100644 index 7ace348f7..000000000 --- a/packages/products/tdesign-miniprogram/src/popconfirm/README.md +++ /dev/null @@ -1,23 +0,0 @@ -:: BASE_DOC :: - -## API - -### Popconfirm Props - -名称 | 类型 | 默认值 | 描述 | 必传 --- | -- | -- | -- | -- -style | Object | - | 样式 | N -custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N -confirm-btn | String / Object / Slot | '' | 确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -destroy-on-close | Boolean | true | 是否在关闭浮层时销毁浮层 | N -popup-props | Object | - | 透传 Popup 组件属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/popconfirm/type.ts) | N -theme | String | default | 文字提示风格。如果期望不显示文本前方的主题图标,请更为设置 `icon` 为 `null`。可选项:default/warning/danger | N -trigger-element | String / Slot | - | 触发元素。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N - -### Popconfirm Events - -名称 | 参数 | 描述 --- | -- | -- -cancel | `(options: {})` | 点击取消按钮时触发 -confirm | `(options: {})` | 点击确认按钮时触发 -visible-change | `(visible: boolean, context?: PopconfirmVisibleChangeContext)` | 确认框显示或隐藏时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/popconfirm/type.ts)。
`interface PopconfirmVisibleChangeContext { trigger?: TriggerSource; e?: MouseEvent }`

`type TriggerSource = 'cancel' \| 'confirm' \| 'document' \| 'trigger-element-click'`
diff --git a/packages/products/tdesign-miniprogram/src/popup/README.en-US.md b/packages/products/tdesign-miniprogram/src/popup/README.en-US.md index 681963dc6..86d56869c 100644 --- a/packages/products/tdesign-miniprogram/src/popup/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/popup/README.en-US.md @@ -26,6 +26,7 @@ z-index | Number | 11500 | \- | N name | params | description -- | -- | -- visible-change | `(visible: boolean, trigger: PopupSource) ` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/popup/type.ts)。
`type PopupSource = 'close-btn' \| 'overlay'`
+ ### Popup External Classes className | Description diff --git a/packages/products/tdesign-miniprogram/src/popup/README.md b/packages/products/tdesign-miniprogram/src/popup/README.md index c5966faba..596654161 100644 --- a/packages/products/tdesign-miniprogram/src/popup/README.md +++ b/packages/products/tdesign-miniprogram/src/popup/README.md @@ -26,6 +26,7 @@ z-index | Number | 11500 | 组件层级,Web 侧样式默认为 5500,移动 名称 | 参数 | 描述 -- | -- | -- visible-change | `(visible: boolean, trigger: PopupSource) ` | 当浮层隐藏或显示时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/popup/type.ts)。
`type PopupSource = 'close-btn' \| 'overlay'`
+ ### Popup External Classes 类名 | 描述 diff --git a/packages/products/tdesign-miniprogram/src/popup/props.ts b/packages/products/tdesign-miniprogram/src/popup/props.ts index c369dd416..4cac93a7c 100644 --- a/packages/products/tdesign-miniprogram/src/popup/props.ts +++ b/packages/products/tdesign-miniprogram/src/popup/props.ts @@ -24,10 +24,6 @@ const props: TdPopupProps = { type: Number, value: 240, }, - /** 组件类名,分别用于设置 组件外层元素、遮罩层、浮层内容 等元素类名 */ - externalClasses: { - type: Array, - }, /** 遮罩层的属性,透传至 overlay */ overlayProps: { type: Object, diff --git a/packages/products/tdesign-miniprogram/src/popup/type.ts b/packages/products/tdesign-miniprogram/src/popup/type.ts index f0cf384f4..af820af3b 100644 --- a/packages/products/tdesign-miniprogram/src/popup/type.ts +++ b/packages/products/tdesign-miniprogram/src/popup/type.ts @@ -37,13 +37,6 @@ export interface TdPopupProps { type: NumberConstructor; value?: number; }; - /** - * 组件类名,分别用于设置 组件外层元素、遮罩层、浮层内容 等元素类名 - */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-overlay', 't-class-content']; - }; /** * 遮罩层的属性,透传至 overlay * @default {} diff --git a/packages/products/tdesign-miniprogram/src/progress/README.en-US.md b/packages/products/tdesign-miniprogram/src/progress/README.en-US.md index 9e278f47e..b5b42a05c 100644 --- a/packages/products/tdesign-miniprogram/src/progress/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/progress/README.en-US.md @@ -15,6 +15,7 @@ status | String | - | options: success/error/warning/active。Typescript:`Prog stroke-width | String / Number | - | \- | N theme | String | line | options: line/plump/circle。Typescript:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/progress/type.ts) | N track-color | String | '' | \- | N + ### Progress External Classes className | Description diff --git a/packages/products/tdesign-miniprogram/src/progress/README.md b/packages/products/tdesign-miniprogram/src/progress/README.md index 868e51ab6..cb5704944 100644 --- a/packages/products/tdesign-miniprogram/src/progress/README.md +++ b/packages/products/tdesign-miniprogram/src/progress/README.md @@ -15,6 +15,7 @@ status | String | - | 进度条状态。可选项:success/error/warning/active stroke-width | String / Number | - | 进度条线宽,默认单位 `px` | N theme | String | line | 进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间。可选项:line/plump/circle。TS 类型:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/progress/type.ts) | N track-color | String | '' | 进度条未完成部分颜色 | N + ### Progress External Classes 类名 | 描述 diff --git a/packages/products/tdesign-miniprogram/src/progress/props.ts b/packages/products/tdesign-miniprogram/src/progress/props.ts index ebc6aeebc..c3934bd98 100644 --- a/packages/products/tdesign-miniprogram/src/progress/props.ts +++ b/packages/products/tdesign-miniprogram/src/progress/props.ts @@ -29,11 +29,6 @@ const props: TdProgressProps = { strokeWidth: { type: null, }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, /** 进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间 */ theme: { type: String, diff --git a/packages/products/tdesign-miniprogram/src/progress/type.ts b/packages/products/tdesign-miniprogram/src/progress/type.ts index 8e6493f3d..6b0e0996e 100644 --- a/packages/products/tdesign-miniprogram/src/progress/type.ts +++ b/packages/products/tdesign-miniprogram/src/progress/type.ts @@ -43,14 +43,6 @@ export interface TdProgressProps { type: null; value?: string | number; }; - /** - * 自定义组件样式 - * @default '' - */ - style?: { - type: StringConstructor; - value?: string; - }; /** * 进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间 * @default line diff --git a/packages/products/tdesign-miniprogram/src/pull-down-refresh/props.ts b/packages/products/tdesign-miniprogram/src/pull-down-refresh/props.ts index d985ec1ad..d4018cee2 100644 --- a/packages/products/tdesign-miniprogram/src/pull-down-refresh/props.ts +++ b/packages/products/tdesign-miniprogram/src/pull-down-refresh/props.ts @@ -21,10 +21,6 @@ const props: TdPullDownRefreshProps = { type: Boolean, value: false, }, - /** 加载loading样式 */ - externalClasses: { - type: Array, - }, /** 加载中下拉高度,如果值为数字则单位是:'px' */ loadingBarHeight: { type: null, @@ -69,6 +65,11 @@ const props: TdPullDownRefreshProps = { type: null, value: 50, }, + /** 是否使用了自定义导航栏 */ + usingCustomNavbar: { + type: Boolean, + value: false, + }, /** 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态 */ value: { type: Boolean, diff --git a/packages/products/tdesign-miniprogram/src/pull-down-refresh/type.ts b/packages/products/tdesign-miniprogram/src/pull-down-refresh/type.ts index afa37e4b1..16ceb5468 100644 --- a/packages/products/tdesign-miniprogram/src/pull-down-refresh/type.ts +++ b/packages/products/tdesign-miniprogram/src/pull-down-refresh/type.ts @@ -31,13 +31,6 @@ export interface TdPullDownRefreshProps { type: BooleanConstructor; value?: boolean; }; - /** - * 加载loading样式 - */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-loading', 't-class-text', 't-class-indicator']; - }; /** * 加载中下拉高度,如果值为数字则单位是:'px' * @default 50 @@ -109,6 +102,14 @@ export interface TdPullDownRefreshProps { type: null; value?: string | number; }; + /** + * 是否使用了自定义导航栏 + * @default false + */ + usingCustomNavbar?: { + type: BooleanConstructor; + value?: boolean; + }; /** * 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态 * @default false diff --git a/packages/products/tdesign-miniprogram/src/search/props.ts b/packages/products/tdesign-miniprogram/src/search/props.ts index 788b36cce..030edbee9 100644 --- a/packages/products/tdesign-miniprogram/src/search/props.ts +++ b/packages/products/tdesign-miniprogram/src/search/props.ts @@ -126,11 +126,6 @@ const props: TdSearchProps = { type: String, value: 'square', }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, /** 拉起键盘的类型 */ type: { type: String, diff --git a/packages/products/tdesign-miniprogram/src/search/type.ts b/packages/products/tdesign-miniprogram/src/search/type.ts index 34a14bf6d..c949f0b7c 100644 --- a/packages/products/tdesign-miniprogram/src/search/type.ts +++ b/packages/products/tdesign-miniprogram/src/search/type.ts @@ -197,14 +197,6 @@ export interface TdSearchProps { type: StringConstructor; value?: 'square' | 'round'; }; - /** - * 自定义组件样式 - * @default '' - */ - style?: { - type: StringConstructor; - value?: string; - }; /** * 拉起键盘的类型 * @default 'text' diff --git a/packages/products/tdesign-miniprogram/src/side-bar/side-bar-item-props.ts b/packages/products/tdesign-miniprogram/src/side-bar/side-bar-item-props.ts deleted file mode 100644 index c7900da04..000000000 --- a/packages/products/tdesign-miniprogram/src/side-bar/side-bar-item-props.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdSideBarItemProps } from './type'; -const props: TdSideBarItemProps = { - /** 透传至 Badge 组件 */ - badgeProps: { - type: Object, - }, - /** 是否禁用 */ - disabled: { - type: Boolean, - value: false, - }, - /** `1.0.0-rc.1`。图标,传对象则透传至 Icon */ - icon: { - type: null, - }, - /** 展示的标签 */ - label: { - type: String, - value: '', - }, - /** 当前选项的值 */ - value: { - type: null, - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/stepper/props.ts b/packages/products/tdesign-miniprogram/src/stepper/props.ts index 6fa8b3fc1..1b0c81074 100644 --- a/packages/products/tdesign-miniprogram/src/stepper/props.ts +++ b/packages/products/tdesign-miniprogram/src/stepper/props.ts @@ -16,10 +16,6 @@ const props: TdStepperProps = { type: null, value: undefined, }, - /** 组件类名,分别用于表示组件外层元素、输入框、右侧递增号、左侧递减号等元素类名 */ - externalClasses: { - type: Array, - }, /** 输入框宽度,默认单位 `px` */ inputWidth: { type: Number, diff --git a/packages/products/tdesign-miniprogram/src/stepper/type.ts b/packages/products/tdesign-miniprogram/src/stepper/type.ts index aba93b3b6..dc5f7380b 100644 --- a/packages/products/tdesign-miniprogram/src/stepper/type.ts +++ b/packages/products/tdesign-miniprogram/src/stepper/type.ts @@ -22,13 +22,6 @@ export interface TdStepperProps { type: BooleanConstructor; value?: boolean; }; - /** - * 组件类名,分别用于表示组件外层元素、输入框、右侧递增号、左侧递减号等元素类名 - */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-input', 't-class-add', 't-class-minus']; - }; /** * 输入框宽度,默认单位 `px` */ diff --git a/packages/products/tdesign-miniprogram/src/steps/step-item-props.ts b/packages/products/tdesign-miniprogram/src/steps/step-item-props.ts deleted file mode 100644 index 801805d46..000000000 --- a/packages/products/tdesign-miniprogram/src/steps/step-item-props.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdStepItemProps } from './type'; -const props: TdStepItemProps = { - /** 步骤描述 */ - content: { - type: String, - value: '', - }, - /** 组件类名,用于设置组件外层元素元素类名 */ - externalClasses: { - type: Array, - }, - /** 图标。传入 slot 代表使用插槽,其他字符串代表使用内置图标 */ - icon: { - type: String, - }, - /** 当前步骤的状态:默认状态(未开始)、进行中状态、完成状态、错误状态 */ - status: { - type: String, - value: 'default', - }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, - /** 子步骤条,仅支持 layout = 'vertical' 时 */ - subStepItems: { - type: Array, - value: [], - }, - /** 标题 */ - title: { - type: String, - value: '', - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/swipe-cell/props.ts b/packages/products/tdesign-miniprogram/src/swipe-cell/props.ts index 4270414f8..1c482f5ca 100644 --- a/packages/products/tdesign-miniprogram/src/swipe-cell/props.ts +++ b/packages/products/tdesign-miniprogram/src/swipe-cell/props.ts @@ -23,11 +23,6 @@ const props: TdSwipeCellProps = { right: { type: Array, }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, }; export default props; diff --git a/packages/products/tdesign-miniprogram/src/swipe-cell/type.ts b/packages/products/tdesign-miniprogram/src/swipe-cell/type.ts index fe4e7402f..38494f3f1 100644 --- a/packages/products/tdesign-miniprogram/src/swipe-cell/type.ts +++ b/packages/products/tdesign-miniprogram/src/swipe-cell/type.ts @@ -34,14 +34,6 @@ export interface TdSwipeCellProps { type: ArrayConstructor; value?: Array; }; - /** - * 自定义组件样式 - * @default '' - */ - style?: { - type: StringConstructor; - value?: string; - }; } export interface SwipeActionItem { diff --git a/packages/products/tdesign-miniprogram/src/swiper/README.en-US.md b/packages/products/tdesign-miniprogram/src/swiper/README.en-US.md index f09765f88..9d7920f7a 100644 --- a/packages/products/tdesign-miniprogram/src/swiper/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/swiper/README.en-US.md @@ -2,7 +2,6 @@ ## API - ### Swiper Props name | type | default | description | required @@ -33,6 +32,7 @@ name | params | description change | `(current: number, source: SwiperChangeSource)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/swiper/type.ts)。
`type SwiperChangeSource = 'autoplay' \| 'touch' \| 'nav'`
click | `(index: number)` | `0.34.0` image-load | `(index: number)` | `1.1.4` + ### Swiper External Classes className | Description @@ -57,6 +57,7 @@ pagination-position | String | bottom | `0.34.0`。options: top-left/top/top-rig show-controls | Boolean | false | `0.32.0` | N total | Number | 0 | `0.34.0` | N type | String | dots | Typescript:`SwiperNavigationType` `type SwiperNavigationType = 'dots' \| 'dots-bar' \| 'fraction'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/swiper-nav/type.ts) | N + ### SwiperNav External Classes className | Description diff --git a/packages/products/tdesign-miniprogram/src/swiper/README.md b/packages/products/tdesign-miniprogram/src/swiper/README.md index e61caca2f..e032993f0 100644 --- a/packages/products/tdesign-miniprogram/src/swiper/README.md +++ b/packages/products/tdesign-miniprogram/src/swiper/README.md @@ -2,7 +2,6 @@ ## API - ### Swiper Props 名称 | 类型 | 默认值 | 描述 | 必传 @@ -33,6 +32,7 @@ snap-to-edge | Boolean | false | `0.32.0`。当 swiper-item 的个数大于等 change | `(current: number, source: SwiperChangeSource)` | 轮播切换时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/swiper/type.ts)。
`type SwiperChangeSource = 'autoplay' \| 'touch' \| 'nav'`
click | `(index: number)` | `0.34.0`。点击轮播项时触发 image-load | `(index: number)` | `1.1.4`。图片加载时触发 + ### Swiper External Classes 类名 | 描述 @@ -57,6 +57,7 @@ pagination-position | String | bottom | `0.34.0`。页码信息展示位置。 show-controls | Boolean | false | `0.32.0`。是否显示两侧的控制按钮 | N total | Number | 0 | `0.34.0`。总共的项数 | N type | String | dots | 导航器类型,点状(dots)、点条状(dots-bar)、分式(fraction)等。TS 类型:`SwiperNavigationType` `type SwiperNavigationType = 'dots' \| 'dots-bar' \| 'fraction'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/swiper-nav/type.ts) | N + ### SwiperNav External Classes 类名 | 描述 diff --git a/packages/products/tdesign-miniprogram/src/tab-bar/README.en-US.md b/packages/products/tdesign-miniprogram/src/tab-bar/README.en-US.md index 885077d5a..8bc140cae 100644 --- a/packages/products/tdesign-miniprogram/src/tab-bar/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/tab-bar/README.en-US.md @@ -22,6 +22,7 @@ default-value | String / Number / Array | undefined | uncontrolled property。Ty name | params | description -- | -- | -- change | `(value: string \| number)` | \- + ### TabBar External Classes className | Description diff --git a/packages/products/tdesign-miniprogram/src/tab-bar/README.md b/packages/products/tdesign-miniprogram/src/tab-bar/README.md index 0f9c44a82..91d7ddffa 100644 --- a/packages/products/tdesign-miniprogram/src/tab-bar/README.md +++ b/packages/products/tdesign-miniprogram/src/tab-bar/README.md @@ -22,6 +22,7 @@ default-value | String / Number / Array | undefined | 当前选中标签的索 名称 | 参数 | 描述 -- | -- | -- change | `(value: string \| number)` | 选中标签切换时触发 + ### TabBar External Classes 类名 | 描述 diff --git a/packages/products/tdesign-miniprogram/src/tab-bar/props.ts b/packages/products/tdesign-miniprogram/src/tab-bar/props.ts index 637eee00f..e2799c665 100644 --- a/packages/products/tdesign-miniprogram/src/tab-bar/props.ts +++ b/packages/products/tdesign-miniprogram/src/tab-bar/props.ts @@ -11,10 +11,6 @@ const props: TdTabBarProps = { type: Boolean, value: true, }, - /** 组件类名,用于设置外层元素类名 */ - externalClasses: { - type: Array, - }, /** 是否固定在底部 */ fixed: { type: Boolean, diff --git a/packages/products/tdesign-miniprogram/src/tab-bar/tab-bar-item-props.ts b/packages/products/tdesign-miniprogram/src/tab-bar/tab-bar-item-props.ts deleted file mode 100644 index 740b515f5..000000000 --- a/packages/products/tdesign-miniprogram/src/tab-bar/tab-bar-item-props.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdTabBarItemProps } from './type'; -const props: TdTabBarItemProps = { - /** 图标右上角提示信息 */ - badgeProps: { - type: Object, - }, - /** 图标名称 */ - icon: { - type: String, - }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, - /** 二级菜单 */ - subTabBar: { - type: Array, - }, - /** 标识符 */ - value: { - type: null, - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/tab-bar/type.ts b/packages/products/tdesign-miniprogram/src/tab-bar/type.ts index 3565afd4a..20d28370a 100644 --- a/packages/products/tdesign-miniprogram/src/tab-bar/type.ts +++ b/packages/products/tdesign-miniprogram/src/tab-bar/type.ts @@ -13,13 +13,6 @@ export interface TdTabBarProps { type: BooleanConstructor; value?: boolean; }; - /** - * 组件类名,用于设置外层元素类名 - */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class']; - }; /** * 是否固定在底部 * @default true diff --git a/packages/products/tdesign-miniprogram/src/tab-panel/props.ts b/packages/products/tdesign-miniprogram/src/tab-panel/props.ts index 45642a3d6..01dc5aa3a 100644 --- a/packages/products/tdesign-miniprogram/src/tab-panel/props.ts +++ b/packages/products/tdesign-miniprogram/src/tab-panel/props.ts @@ -24,6 +24,11 @@ const props: TdTabPanelProps = { type: String, value: '', }, + /** 是否启用选项卡懒加载 */ + lazy: { + type: Boolean, + value: false, + }, /** 用于自定义选项卡面板内容 */ panel: { type: String, diff --git a/packages/products/tdesign-miniprogram/src/tab-panel/type.ts b/packages/products/tdesign-miniprogram/src/tab-panel/type.ts index ce1394b22..f1737624c 100644 --- a/packages/products/tdesign-miniprogram/src/tab-panel/type.ts +++ b/packages/products/tdesign-miniprogram/src/tab-panel/type.ts @@ -37,6 +37,14 @@ export interface TdTabPanelProps { type: StringConstructor; value?: string; }; + /** + * 是否启用选项卡懒加载 + * @default false + */ + lazy?: { + type: BooleanConstructor; + value?: boolean; + }; /** * 用于自定义选项卡面板内容 */ diff --git a/packages/products/tdesign-miniprogram/src/tabs/README.en-US.md b/packages/products/tdesign-miniprogram/src/tabs/README.en-US.md index fa7efdfad..975c147a8 100644 --- a/packages/products/tdesign-miniprogram/src/tabs/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/tabs/README.en-US.md @@ -9,6 +9,7 @@ name | type | default | description | required style | Object | - | CSS(Cascading Style Sheets) | N custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N animation | Object | - | Typescript:`TabAnimation` `type TabAnimation = { duration: number } & Record`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/tabs/type.ts) | N +bottom-line-mode | String | fixed | options: fixed/auto/full | N middle | Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N show-bottom-line | Boolean | true | \- | N space-evenly | Boolean | true | \- | N @@ -49,5 +50,6 @@ badge-props | Object | - | \- | N disabled | Boolean | false | \- | N icon | String / Object | - | \- | N label | String | - | \- | N +lazy | Boolean | false | Enable tab lazy loading | N panel | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N value | String / Number | - | Typescript:`TabValue`,[Tabs API Documents](./tabs?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/tab-panel/type.ts) | N diff --git a/packages/products/tdesign-miniprogram/src/tabs/README.md b/packages/products/tdesign-miniprogram/src/tabs/README.md index 37e6bccf8..7257e7b1c 100644 --- a/packages/products/tdesign-miniprogram/src/tabs/README.md +++ b/packages/products/tdesign-miniprogram/src/tabs/README.md @@ -9,6 +9,7 @@ style | Object | - | 样式 | N custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N animation | Object | - | 动画效果设置。其中 duration 表示动画时长。(单位:秒)。TS 类型:`TabAnimation` `type TabAnimation = { duration: number } & Record`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/tabs/type.ts) | N +bottom-line-mode | String | fixed | 激活下划线的模式。可选项:fixed/auto/full | N middle | Slot | - | 中间内容,介于头部和内容之间。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N show-bottom-line | Boolean | true | 是否展示底部激活线条 | N space-evenly | Boolean | true | 选项卡头部空间是否均分 | N @@ -49,5 +50,6 @@ badge-props | Object | - | 透传至 Badge 组件 | N disabled | Boolean | false | 是否禁用当前选项卡 | N icon | String / Object | - | `1.0.0-rc.1`。图标,传对象则透传至 Icon | N label | String | - | 选项卡名称 | N +lazy | Boolean | false | 是否启用选项卡懒加载 | N panel | String / Slot | - | 用于自定义选项卡面板内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N value | String / Number | - | 选项卡的值,唯一标识。TS 类型:`TabValue`,[Tabs API Documents](./tabs?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/tab-panel/type.ts) | N diff --git a/packages/products/tdesign-miniprogram/src/tabs/props.ts b/packages/products/tdesign-miniprogram/src/tabs/props.ts index 183032b1e..5657c41a9 100644 --- a/packages/products/tdesign-miniprogram/src/tabs/props.ts +++ b/packages/products/tdesign-miniprogram/src/tabs/props.ts @@ -10,9 +10,10 @@ const props: TdTabsProps = { animation: { type: Object, }, - /** 组件类名,分别用于设置 组件外层元素、选项卡单项、选项卡激活态、滚动条样式类名 等类名 */ - externalClasses: { - type: Array, + /** 激活下划线的模式 */ + bottomLineMode: { + type: String, + value: 'fixed', }, /** 是否展示底部激活线条 */ showBottomLine: { diff --git a/packages/products/tdesign-miniprogram/src/tabs/tab-panel-props.ts b/packages/products/tdesign-miniprogram/src/tabs/tab-panel-props.ts deleted file mode 100644 index ac7b06e0c..000000000 --- a/packages/products/tdesign-miniprogram/src/tabs/tab-panel-props.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdTabPanelProps } from './type'; -const props: TdTabPanelProps = { - /** 选项卡内容隐藏时是否销毁 */ - destroyOnHide: { - type: Boolean, - value: true, - }, - /** 是否禁用当前选项卡 */ - disabled: { - type: Boolean, - value: false, - }, - /** 选项卡名称 */ - label: { - type: String, - value: '', - }, - /** 用于自定义选项卡面板内容 */ - panel: { - type: String, - }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, - /** 选项卡的值,唯一标识 */ - value: { - type: null, - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/tabs/type.ts b/packages/products/tdesign-miniprogram/src/tabs/type.ts index af17c0fb9..90daa5026 100644 --- a/packages/products/tdesign-miniprogram/src/tabs/type.ts +++ b/packages/products/tdesign-miniprogram/src/tabs/type.ts @@ -15,11 +15,12 @@ export interface TdTabsProps { value?: TabAnimation; }; /** - * 组件类名,分别用于设置 组件外层元素、选项卡单项、选项卡激活态、滚动条样式类名 等类名 + * 激活下划线的模式 + * @default fixed */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-item', 't-class-active', 't-class-track']; + bottomLineMode?: { + type: StringConstructor; + value?: 'fixed' | 'auto' | 'full'; }; /** * 是否展示底部激活线条 diff --git a/packages/products/tdesign-miniprogram/src/tag/check-tag-props.ts b/packages/products/tdesign-miniprogram/src/tag/check-tag-props.ts deleted file mode 100644 index 95eb545ca..000000000 --- a/packages/products/tdesign-miniprogram/src/tag/check-tag-props.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdCheckTagProps } from './type'; -const props: TdCheckTagProps = { - /** 标签选中的状态,默认风格(theme=default)才有选中态 */ - checked: { - type: Boolean, - value: undefined, - }, - /** 标签选中的状态,默认风格(theme=default)才有选中态,非受控属性 */ - defaultChecked: { - type: Boolean, - value: undefined, - }, - /** 标签是否可关闭 */ - closable: { - type: Boolean, - value: false, - }, - /** 组件子元素 */ - content: { - type: null, - }, - /** 标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态 */ - disabled: { - type: Boolean, - value: false, - }, - /** 标签图标 */ - icon: { - type: String, - value: '', - }, - /** 标签类型,有三种:方形、圆角方形、标记型 */ - shape: { - type: String, - value: 'square', - }, - /** 标签尺寸 */ - size: { - type: String, - value: 'medium', - }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/tag/props.ts b/packages/products/tdesign-miniprogram/src/tag/props.ts index ed26df030..31036e985 100644 --- a/packages/products/tdesign-miniprogram/src/tag/props.ts +++ b/packages/products/tdesign-miniprogram/src/tag/props.ts @@ -16,10 +16,6 @@ const props: TdTagProps = { type: Boolean, value: false, }, - /** 组件类名,用于设置 组件外层元素元素类名 */ - externalClasses: { - type: Array, - }, /** 标签中的图标,可自定义图标呈现 */ icon: { type: null, diff --git a/packages/products/tdesign-miniprogram/src/tag/type.ts b/packages/products/tdesign-miniprogram/src/tag/type.ts index 885938876..0b614197e 100644 --- a/packages/products/tdesign-miniprogram/src/tag/type.ts +++ b/packages/products/tdesign-miniprogram/src/tag/type.ts @@ -21,13 +21,6 @@ export interface TdTagProps { type: BooleanConstructor; value?: boolean; }; - /** - * 组件类名,用于设置 组件外层元素元素类名 - */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class']; - }; /** * 标签中的图标,可自定义图标呈现 */ diff --git a/packages/products/tdesign-miniprogram/src/time-line/README.en-US.md b/packages/products/tdesign-miniprogram/src/time-line/README.en-US.md deleted file mode 100644 index 215ca5128..000000000 --- a/packages/products/tdesign-miniprogram/src/time-line/README.en-US.md +++ /dev/null @@ -1 +0,0 @@ -:: BASE_DOC :: diff --git a/packages/products/tdesign-miniprogram/src/time-line/README.md b/packages/products/tdesign-miniprogram/src/time-line/README.md deleted file mode 100644 index 215ca5128..000000000 --- a/packages/products/tdesign-miniprogram/src/time-line/README.md +++ /dev/null @@ -1 +0,0 @@ -:: BASE_DOC :: diff --git a/packages/products/tdesign-miniprogram/src/time-line/props.ts b/packages/products/tdesign-miniprogram/src/time-line/props.ts deleted file mode 100644 index 6038080ed..000000000 --- a/packages/products/tdesign-miniprogram/src/time-line/props.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdTimeLineProps } from './type'; -const props: TdTimeLineProps = { - /** 标签信息放在时间轴的位置,`mode='alternate'` 时生效。纵向时间轴信息位置:左侧、右侧或两侧,默认信息在时间轴右侧。横向时间轴信息位置:上方、下方、两侧 */ - labelAlign: { - type: String, - value: 'right', - }, - /** 时间轴方向:水平方向、垂直方向 */ - layout: { - type: String, - value: 'vertical', - }, - /** 标签与内容文本的位置关系,`alternate` 为展示在轴两侧,`same` 为展示在同一侧 */ - mode: { - type: String, - value: 'alternate', - }, - /** 时间轴是否表现为倒序 */ - reverse: { - type: Boolean, - value: false, - }, - /** 步骤条风格 */ - theme: { - type: String, - value: 'default', - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/time-line/time-line-item-props.ts b/packages/products/tdesign-miniprogram/src/time-line/time-line-item-props.ts deleted file mode 100644 index a37dc3842..000000000 --- a/packages/products/tdesign-miniprogram/src/time-line/time-line-item-props.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdTimeLineItemProps } from './type'; -const props: TdTimeLineItemProps = { - /** 描述内容 */ - content: { - type: String, - }, - /** 时间轴颜色,内置 `primary/warning/error/default` 四种色值,可传入 16 进制颜色码或 RGB 颜色值. */ - dotColor: { - type: String, - value: 'default', - }, - /** 标签文本内容,可完全自定义 */ - label: { - type: String, - }, - /** 标签信息相对于时间轴的位置,在 `mode='alternate'` 时生效,优先级高于 `TimeLine.labelAlign` */ - labelAlign: { - type: String, - }, - /** 当前步骤状态:默认状态(未开始)、进行中状态、完成状态 */ - status: { - type: String, - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/time-line/type.ts b/packages/products/tdesign-miniprogram/src/time-line/type.ts deleted file mode 100644 index e86816eda..000000000 --- a/packages/products/tdesign-miniprogram/src/time-line/type.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -export interface TdTimeLineProps { - /** - * 标签信息放在时间轴的位置,`mode='alternate'` 时生效。纵向时间轴信息位置:左侧、右侧或两侧,默认信息在时间轴右侧。横向时间轴信息位置:上方、下方、两侧 - * @default right - */ - labelAlign?: { - type: StringConstructor; - value?: 'left' | 'right' | 'alternate' | 'top' | 'bottom'; - }; - /** - * 时间轴方向:水平方向、垂直方向 - * @default vertical - */ - layout?: { - type: StringConstructor; - value?: 'horizontal' | 'vertical'; - }; - /** - * 标签与内容文本的位置关系,`alternate` 为展示在轴两侧,`same` 为展示在同一侧 - * @default alternate - */ - mode?: { - type: StringConstructor; - value?: 'alternate' | 'same'; - }; - /** - * 时间轴是否表现为倒序 - * @default false - */ - reverse?: { - type: BooleanConstructor; - value?: boolean; - }; - /** - * 步骤条风格 - * @default default - */ - theme?: { - type: StringConstructor; - value?: 'default' | 'dot'; - }; -} - -export interface TdTimeLineItemProps { - /** - * 描述内容 - */ - content?: { - type: StringConstructor; - value?: string; - }; - /** - * 时间轴颜色,内置 `primary/warning/error/default` 四种色值,可传入 16 进制颜色码或 RGB 颜色值. - * @default default - */ - dotColor?: { - type: StringConstructor; - value?: string; - }; - /** - * 标签文本内容,可完全自定义 - */ - label?: { - type: StringConstructor; - value?: string; - }; - /** - * 标签信息相对于时间轴的位置,在 `mode='alternate'` 时生效,优先级高于 `TimeLine.labelAlign` - */ - labelAlign?: { - type: StringConstructor; - value?: 'left' | 'right' | 'top' | 'bottom'; - }; - /** - * 当前步骤状态:默认状态(未开始)、进行中状态、完成状态 - */ - status?: { - type: StringConstructor; - value?: 'default' | 'process' | 'finish'; - }; -} diff --git a/packages/products/tdesign-miniprogram/src/timeline/README.en-US.md b/packages/products/tdesign-miniprogram/src/timeline/README.en-US.md deleted file mode 100644 index 779d2b6cb..000000000 --- a/packages/products/tdesign-miniprogram/src/timeline/README.en-US.md +++ /dev/null @@ -1,34 +0,0 @@ -:: BASE_DOC :: - -## API - -### Timeline Props - -name | type | default | description | required --- | -- | -- | -- | -- -style | Object | - | CSS(Cascading Style Sheets) | N -custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N -label-align | String | left | label info placement。options: left/right/alternate/top/bottom | N -layout | String | vertical | time line layout。options: horizontal/vertical | N -mode | String | alternate | The position relationship between the label and the content text, 'alternate' is displayed on both sides of the axis, and 'same' is displayed on the same side。options: alternate/same | N -reverse | Boolean | false | \- | N -theme | String | default | options: default/dot | N - - -### TimelineItem Props - -name | type | default | description | required --- | -- | -- | -- | -- -style | Object | - | CSS(Cascading Style Sheets) | N -custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N -content | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -dot | Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -dot-color | String | primary | Typescript:`string` | N -label | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -label-align | String | - | options: left/right/top/bottom | N - -### TimelineItem Events - -name | params | description --- | -- | -- -click | `(detail: { e: MouseEvent; item: TdTimelineItemProps })` | trigger on click diff --git a/packages/products/tdesign-miniprogram/src/timeline/README.md b/packages/products/tdesign-miniprogram/src/timeline/README.md deleted file mode 100644 index c863c262f..000000000 --- a/packages/products/tdesign-miniprogram/src/timeline/README.md +++ /dev/null @@ -1,34 +0,0 @@ -:: BASE_DOC :: - -## API - -### Timeline Props - -名称 | 类型 | 默认值 | 描述 | 必传 --- | -- | -- | -- | -- -style | Object | - | 样式 | N -custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N -label-align | String | left | 标签信息放在时间轴的位置,`mode='alternate'` 时生效。纵向时间轴信息位置:左侧、右侧或两侧,默认信息在时间轴右侧。横向时间轴信息位置:上方、下方、两侧。可选项:left/right/alternate/top/bottom | N -layout | String | vertical | 时间轴方向:水平方向、垂直方向。可选项:horizontal/vertical | N -mode | String | alternate | 标签与内容文本的位置关系,`alternate` 为展示在轴两侧,`same` 为展示在同一侧。可选项:alternate/same | N -reverse | Boolean | false | 时间轴是否表现为倒序 | N -theme | String | default | 时间轴风格。可选项:default/dot | N - - -### TimelineItem Props - -名称 | 类型 | 默认值 | 描述 | 必传 --- | -- | -- | -- | -- -style | Object | - | 样式 | N -custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N -content | String / Slot | - | 描述内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -dot | Slot | - | 用于自定义时间轴节点元素。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -dot-color | String | primary | 时间轴颜色,内置 `primary/warning/error/default` 四种色值,可传入 16 进制颜色码或 RGB 颜色值。TS 类型:`string` | N -label | String / Slot | - | 标签文本内容,可完全自定义。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -label-align | String | - | 标签信息相对于时间轴的位置,在 `mode='alternate'` 时生效,优先级高于 `Timeline.labelAlign`。可选项:left/right/top/bottom | N - -### TimelineItem Events - -名称 | 参数 | 描述 --- | -- | -- -click | `(detail: { e: MouseEvent; item: TdTimelineItemProps })` | 点击时触发 diff --git a/packages/products/tdesign-miniprogram/src/timeline/props.ts b/packages/products/tdesign-miniprogram/src/timeline/props.ts deleted file mode 100644 index 7febbc1b2..000000000 --- a/packages/products/tdesign-miniprogram/src/timeline/props.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdTimelineProps } from './type'; -const props: TdTimelineProps = { - /** 标签信息放在时间轴的位置,`mode='alternate'` 时生效。纵向时间轴信息位置:左侧、右侧或两侧,默认信息在时间轴右侧。横向时间轴信息位置:上方、下方、两侧 */ - labelAlign: { - type: String, - value: 'left', - }, - /** 时间轴方向:水平方向、垂直方向 */ - layout: { - type: String, - value: 'vertical', - }, - /** 标签与内容文本的位置关系,`alternate` 为展示在轴两侧,`same` 为展示在同一侧 */ - mode: { - type: String, - value: 'alternate', - }, - /** 时间轴是否表现为倒序 */ - reverse: { - type: Boolean, - value: false, - }, - /** 时间轴风格 */ - theme: { - type: String, - value: 'default', - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/timeline/timeline-item-props.ts b/packages/products/tdesign-miniprogram/src/timeline/timeline-item-props.ts deleted file mode 100644 index d14c3ce41..000000000 --- a/packages/products/tdesign-miniprogram/src/timeline/timeline-item-props.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -import { TdTimelineItemProps } from './type'; -const props: TdTimelineItemProps = { - /** 描述内容 */ - content: { - type: String, - }, - /** 时间轴颜色,内置 `primary/warning/error/default` 四种色值,可传入 16 进制颜色码或 RGB 颜色值 */ - dotColor: { - type: String, - value: 'primary', - }, - /** 标签文本内容,可完全自定义 */ - label: { - type: String, - }, - /** 标签信息相对于时间轴的位置,在 `mode='alternate'` 时生效,优先级高于 `Timeline.labelAlign` */ - labelAlign: { - type: String, - }, -}; - -export default props; diff --git a/packages/products/tdesign-miniprogram/src/timeline/type.ts b/packages/products/tdesign-miniprogram/src/timeline/type.ts deleted file mode 100644 index be568b49b..000000000 --- a/packages/products/tdesign-miniprogram/src/timeline/type.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* eslint-disable */ - -/** - * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC - * */ - -export interface TdTimelineProps { - /** - * 标签信息放在时间轴的位置,`mode='alternate'` 时生效。纵向时间轴信息位置:左侧、右侧或两侧,默认信息在时间轴右侧。横向时间轴信息位置:上方、下方、两侧 - * @default left - */ - labelAlign?: { - type: StringConstructor; - value?: 'left' | 'right' | 'alternate' | 'top' | 'bottom'; - }; - /** - * 时间轴方向:水平方向、垂直方向 - * @default vertical - */ - layout?: { - type: StringConstructor; - value?: 'horizontal' | 'vertical'; - }; - /** - * 标签与内容文本的位置关系,`alternate` 为展示在轴两侧,`same` 为展示在同一侧 - * @default alternate - */ - mode?: { - type: StringConstructor; - value?: 'alternate' | 'same'; - }; - /** - * 时间轴是否表现为倒序 - * @default false - */ - reverse?: { - type: BooleanConstructor; - value?: boolean; - }; - /** - * 时间轴风格 - * @default default - */ - theme?: { - type: StringConstructor; - value?: 'default' | 'dot'; - }; -} - -export interface TdTimelineItemProps { - /** - * 描述内容 - */ - content?: { - type: StringConstructor; - value?: string; - }; - /** - * 时间轴颜色,内置 `primary/warning/error/default` 四种色值,可传入 16 进制颜色码或 RGB 颜色值 - * @default primary - */ - dotColor?: { - type: StringConstructor; - value?: string; - }; - /** - * 标签文本内容,可完全自定义 - */ - label?: { - type: StringConstructor; - value?: string; - }; - /** - * 标签信息相对于时间轴的位置,在 `mode='alternate'` 时生效,优先级高于 `Timeline.labelAlign` - */ - labelAlign?: { - type: StringConstructor; - value?: 'left' | 'right' | 'top' | 'bottom'; - }; -} diff --git a/packages/products/tdesign-mobile-react/src/action-sheet/action-sheet.en-US.md b/packages/products/tdesign-mobile-react/src/action-sheet/action-sheet.en-US.md index 9e60a21cc..4e7c16aab 100644 --- a/packages/products/tdesign-mobile-react/src/action-sheet/action-sheet.en-US.md +++ b/packages/products/tdesign-mobile-react/src/action-sheet/action-sheet.en-US.md @@ -13,7 +13,9 @@ cancelText | String | - | \- | N count | Number | 8 | \- | N description | String | - | \- | N items | Array | - | Typescript:`Array` `interface ActionSheetItem { label: string; color?: string; disabled?: boolean; icon?: TNode; badge?: BadgeProps }`,[Badge API Documents](./badge?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts) | N +popupProps | Object | {} | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts) | N showCancel | Boolean | true | \- | N +showOverlay | Boolean | true | \- | N theme | String | list | options: list/grid | N visible | Boolean | false | required | Y defaultVisible | Boolean | false | required。uncontrolled property | Y diff --git a/packages/products/tdesign-mobile-react/src/action-sheet/action-sheet.md b/packages/products/tdesign-mobile-react/src/action-sheet/action-sheet.md index c7914fffe..bf79f79d5 100644 --- a/packages/products/tdesign-mobile-react/src/action-sheet/action-sheet.md +++ b/packages/products/tdesign-mobile-react/src/action-sheet/action-sheet.md @@ -13,7 +13,9 @@ cancelText | String | - | 设置取消按钮的文本 | N count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N description | String | - | 动作面板描述文字 | N items | Array | - | 菜单项。TS 类型:`Array` `interface ActionSheetItem { label: string; color?: string; disabled?: boolean; icon?: TNode; badge?: BadgeProps }`,[Badge API Documents](./badge?tab=api)。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts) | N +popupProps | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts) | N showCancel | Boolean | true | 是否显示取消按钮 | N +showOverlay | Boolean | true | 是否显示遮罩层 | N theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N visible | Boolean | false | 必需。显示与隐藏 | Y defaultVisible | Boolean | false | 必需。显示与隐藏。非受控属性 | Y diff --git a/packages/products/tdesign-mobile-react/src/action-sheet/defaultProps.ts b/packages/products/tdesign-mobile-react/src/action-sheet/defaultProps.ts index f5f62934f..0e140fece 100644 --- a/packages/products/tdesign-mobile-react/src/action-sheet/defaultProps.ts +++ b/packages/products/tdesign-mobile-react/src/action-sheet/defaultProps.ts @@ -7,7 +7,9 @@ import { TdActionSheetProps } from './type'; export const actionSheetDefaultProps: TdActionSheetProps = { align: 'center', count: 8, + popupProps: {}, showCancel: true, + showOverlay: true, theme: 'list', defaultVisible: false, }; diff --git a/packages/products/tdesign-mobile-react/src/action-sheet/type.ts b/packages/products/tdesign-mobile-react/src/action-sheet/type.ts index d927b5ff6..4908df202 100644 --- a/packages/products/tdesign-mobile-react/src/action-sheet/type.ts +++ b/packages/products/tdesign-mobile-react/src/action-sheet/type.ts @@ -5,6 +5,7 @@ * */ import { BadgeProps } from '../badge'; +import { PopupProps } from '../popup'; import { TNode } from '../common'; import { MouseEvent } from 'react'; @@ -33,11 +34,21 @@ export interface TdActionSheetProps { * 菜单项 */ items?: Array; + /** + * 透传 Popup 组件全部属性 + * @default {} + */ + popupProps?: PopupProps; /** * 是否显示取消按钮 * @default true */ showCancel?: boolean; + /** + * 是否显示遮罩层 + * @default true + */ + showOverlay?: boolean; /** * 展示类型,列表和表格形式展示 * @default list diff --git a/packages/products/tdesign-mobile-react/src/color-picker/color-picker.en-US.md b/packages/products/tdesign-mobile-react/src/color-picker/color-picker.en-US.md index 64279b825..60c782f52 100644 --- a/packages/products/tdesign-mobile-react/src/color-picker/color-picker.en-US.md +++ b/packages/products/tdesign-mobile-react/src/color-picker/color-picker.en-US.md @@ -2,7 +2,6 @@ ## API - ### ColorPicker Props name | type | default | description | required diff --git a/packages/products/tdesign-mobile-react/src/color-picker/color-picker.md b/packages/products/tdesign-mobile-react/src/color-picker/color-picker.md index 83d9c35cc..9ce93848f 100644 --- a/packages/products/tdesign-mobile-react/src/color-picker/color-picker.md +++ b/packages/products/tdesign-mobile-react/src/color-picker/color-picker.md @@ -2,7 +2,6 @@ ## API - ### ColorPicker Props 名称 | 类型 | 默认值 | 描述 | 必传 @@ -13,7 +12,7 @@ autoClose | Boolean | true | 自动关闭。在点击遮罩层时自动关闭, clearable | Boolean | false | 是否可清空 | N footer | TElement | - | 底部插槽,仅在 `usePopup` 为 `true` 时有效。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N header | TElement | - | 顶部插槽,仅在 `usePopup` 为 `true` 时有效。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N -popupProps | Object | {} | popupProps透传。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/color-picker/type.ts) | N +popupProps | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/color-picker/type.ts) | N usePopup | Boolean | false | 是否使用弹出层包裹颜色选择器 | N visible | Boolean | false | 是否显示颜色选择器。`usePopup` 为 true 时有效 | N onClose | Function | | TS 类型:`(trigger: ColorPickerTrigger) => void`
关闭按钮时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/color-picker/type.ts)。
`type ColorPickerTrigger = 'overlay'`
| N diff --git a/packages/products/tdesign-mobile-react/src/color-picker/type.ts b/packages/products/tdesign-mobile-react/src/color-picker/type.ts index d36814a81..bab972043 100644 --- a/packages/products/tdesign-mobile-react/src/color-picker/type.ts +++ b/packages/products/tdesign-mobile-react/src/color-picker/type.ts @@ -27,7 +27,7 @@ export interface TdColorPickerProps { */ header?: TElement; /** - * popupProps透传 + * 透传 Popup 组件全部属性 * @default {} */ popupProps?: PopupProps; diff --git a/packages/products/tdesign-mobile-vue/src/action-sheet/action-sheet.en-US.md b/packages/products/tdesign-mobile-vue/src/action-sheet/action-sheet.en-US.md index 09156973c..c9c639159 100644 --- a/packages/products/tdesign-mobile-vue/src/action-sheet/action-sheet.en-US.md +++ b/packages/products/tdesign-mobile-vue/src/action-sheet/action-sheet.en-US.md @@ -11,7 +11,9 @@ cancelText | String | - | \- | N count | Number | 8 | \- | N description | String | - | \- | N items | Array | - | Typescript:`Array` `interface ActionSheetItem { label: string; color?: string; disabled?: boolean; icon?: TNode; badge?: BadgeProps }`,[Badge API Documents](./badge?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts) | N +popupProps | Object | {} | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts) | N showCancel | Boolean | true | \- | N +showOverlay | Boolean | true | \- | N theme | String | list | options: list/grid | N visible | Boolean | false | required。`v-model` and `v-model:visible` is supported | Y defaultVisible | Boolean | false | required。uncontrolled property | Y diff --git a/packages/products/tdesign-mobile-vue/src/action-sheet/action-sheet.md b/packages/products/tdesign-mobile-vue/src/action-sheet/action-sheet.md index 9abb0d9ce..4f58e2488 100644 --- a/packages/products/tdesign-mobile-vue/src/action-sheet/action-sheet.md +++ b/packages/products/tdesign-mobile-vue/src/action-sheet/action-sheet.md @@ -11,7 +11,9 @@ cancelText | String | - | 设置取消按钮的文本 | N count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N description | String | - | 动作面板描述文字 | N items | Array | - | 菜单项。TS 类型:`Array` `interface ActionSheetItem { label: string; color?: string; disabled?: boolean; icon?: TNode; badge?: BadgeProps }`,[Badge API Documents](./badge?tab=api)。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts) | N +popupProps | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts) | N showCancel | Boolean | true | 是否显示取消按钮 | N +showOverlay | Boolean | true | 是否显示遮罩层 | N theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N visible | Boolean | false | 必需。显示与隐藏。支持语法糖 `v-model` 或 `v-model:visible` | Y defaultVisible | Boolean | false | 必需。显示与隐藏。非受控属性 | Y diff --git a/packages/products/tdesign-mobile-vue/src/action-sheet/props.ts b/packages/products/tdesign-mobile-vue/src/action-sheet/props.ts index 14226ede9..e5c43c5b0 100644 --- a/packages/products/tdesign-mobile-vue/src/action-sheet/props.ts +++ b/packages/products/tdesign-mobile-vue/src/action-sheet/props.ts @@ -36,11 +36,21 @@ export default { items: { type: Array as PropType, }, + /** 透传 Popup 组件全部属性 */ + popupProps: { + type: Object as PropType, + default: () => ({}), + }, /** 是否显示取消按钮 */ showCancel: { type: Boolean, default: true, }, + /** 是否显示遮罩层 */ + showOverlay: { + type: Boolean, + default: true, + }, /** 展示类型,列表和表格形式展示 */ theme: { type: String as PropType, diff --git a/packages/products/tdesign-mobile-vue/src/action-sheet/type.ts b/packages/products/tdesign-mobile-vue/src/action-sheet/type.ts index c296b5f9d..822849002 100644 --- a/packages/products/tdesign-mobile-vue/src/action-sheet/type.ts +++ b/packages/products/tdesign-mobile-vue/src/action-sheet/type.ts @@ -5,6 +5,7 @@ * */ import { BadgeProps } from '../badge'; +import { PopupProps } from '../popup'; import { TNode } from '../common'; export interface TdActionSheetProps { @@ -32,11 +33,21 @@ export interface TdActionSheetProps { * 菜单项 */ items?: Array; + /** + * 透传 Popup 组件全部属性 + * @default {} + */ + popupProps?: PopupProps; /** * 是否显示取消按钮 * @default true */ showCancel?: boolean; + /** + * 是否显示遮罩层 + * @default true + */ + showOverlay?: boolean; /** * 展示类型,列表和表格形式展示 * @default list diff --git a/packages/products/tdesign-mobile-vue/src/color-picker/color-picker.md b/packages/products/tdesign-mobile-vue/src/color-picker/color-picker.md index e02eaba38..104570298 100644 --- a/packages/products/tdesign-mobile-vue/src/color-picker/color-picker.md +++ b/packages/products/tdesign-mobile-vue/src/color-picker/color-picker.md @@ -10,7 +10,7 @@ autoClose | Boolean | true | 自动关闭。在点击遮罩层时自动关闭, clearable | Boolean | false | 是否可清空 | N footer | Slot / Function | - | 底部插槽,仅在 `usePopup` 为 `true` 时有效。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N header | Slot / Function | - | 顶部插槽,仅在 `usePopup` 为 `true` 时有效。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -popupProps | Object | {} | popupProps透传。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/color-picker/type.ts) | N +popupProps | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/color-picker/type.ts) | N usePopup | Boolean | false | 是否使用弹出层包裹颜色选择器 | N visible | Boolean | false | 是否显示颜色选择器。`usePopup` 为 true 时有效 | N onClose | Function | | TS 类型:`(trigger: ColorPickerTrigger) => void`
关闭按钮时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/color-picker/type.ts)。
`type ColorPickerTrigger = 'overlay'`
| N diff --git a/packages/products/tdesign-mobile-vue/src/color-picker/props.ts b/packages/products/tdesign-mobile-vue/src/color-picker/props.ts index bf5dc8bd4..d88b70405 100644 --- a/packages/products/tdesign-mobile-vue/src/color-picker/props.ts +++ b/packages/products/tdesign-mobile-vue/src/color-picker/props.ts @@ -23,7 +23,7 @@ export default { header: { type: Function as PropType, }, - /** popupProps透传 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, default: () => ({}), diff --git a/packages/products/tdesign-mobile-vue/src/color-picker/type.ts b/packages/products/tdesign-mobile-vue/src/color-picker/type.ts index 91b526099..736f58574 100644 --- a/packages/products/tdesign-mobile-vue/src/color-picker/type.ts +++ b/packages/products/tdesign-mobile-vue/src/color-picker/type.ts @@ -27,7 +27,7 @@ export interface TdColorPickerProps { */ header?: TNode; /** - * popupProps透传 + * 透传 Popup 组件全部属性 * @default {} */ popupProps?: PopupProps; diff --git a/packages/products/tdesign-react/src/auto-complete/auto-complete.md b/packages/products/tdesign-react/src/auto-complete/auto-complete.md index 80b484004..c4791d731 100644 --- a/packages/products/tdesign-react/src/auto-complete/auto-complete.md +++ b/packages/products/tdesign-react/src/auto-complete/auto-complete.md @@ -21,7 +21,7 @@ options | Array | - | 下拉联想词列表。示例一:`['联想词一', '联 panelBottomContent | TNode | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N panelTopContent | TNode | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N placeholder | String | undefined | 输入框为空时的占位提示。组件本身默认值为 `undefined`,但全局配置存在默认值,不同语言全局默认值不同 | N -popupProps | Object | - | 透传 Popup 组件全部特性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/auto-complete/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/auto-complete/type.ts) | N readonly | Boolean | undefined | 是否只读 | N size | String | medium | 组件尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N status | String | default | 输入框状态。可选项:default/success/warning/error | N diff --git a/packages/products/tdesign-react/src/auto-complete/type.ts b/packages/products/tdesign-react/src/auto-complete/type.ts index b67866c94..996b5a491 100644 --- a/packages/products/tdesign-react/src/auto-complete/type.ts +++ b/packages/products/tdesign-react/src/auto-complete/type.ts @@ -67,7 +67,7 @@ export interface TdAutoCompleteProps` panelBottomContent | TNode | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N panelTopContent | TNode | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 参考 popup 组件 API。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/cascader/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/cascader/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框 | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N prefixIcon | TElement | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-react/src/cascader/type.ts b/packages/products/tdesign-react/src/cascader/type.ts index c5ef33bcb..2bb7fc263 100644 --- a/packages/products/tdesign-react/src/cascader/type.ts +++ b/packages/products/tdesign-react/src/cascader/type.ts @@ -132,7 +132,7 @@ export interface TdCascaderProps` | N -disabled | Boolean | - | \- | N +disabled | Boolean | undefined | \- | N enableAlpha | Boolean | false | \- | N enableMultipleGradient | Boolean | true | \- | N format | String | RGB | options: RGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS | N diff --git a/packages/products/tdesign-react/src/color-picker/color-picker.md b/packages/products/tdesign-react/src/color-picker/color-picker.md index e5b4e0bf2..146dff16b 100644 --- a/packages/products/tdesign-react/src/color-picker/color-picker.md +++ b/packages/products/tdesign-react/src/color-picker/color-picker.md @@ -12,7 +12,7 @@ borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否可清空 | N closeBtn | TNode | true | 关闭按钮,值为 `true` 显示默认关闭按钮;值为 `false` 或 `undefined` 则不显示关闭按钮;值类型为函数,则表示自定义关闭按钮。TS 类型:`string \| boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N colorModes | Array | ["monochrome", "linear-gradient"] | 颜色模式选择。同时支持单色和渐变两种模式,可仅使用单色或者渐变其中一种模式,也可以同时使用。`monochrome` 表示单色,`linear-gradient` 表示渐变色。TS 类型:`Array<'monochrome' \| 'linear-gradient'>` | N -disabled | Boolean | - | 是否禁用组件 | N +disabled | Boolean | undefined | 是否禁用组件 | N enableAlpha | Boolean | false | 是否开启透明通道 | N enableMultipleGradient | Boolean | true | 是否允许开启通过点击渐变轴增加渐变梯度,默认开启,关闭时只会存在起始和结束两个颜色 | N format | String | RGB | 格式化色值。`enableAlpha` 为真时,`RGBA/HSLA/HSVA` 等值有效。可选项:RGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS | N diff --git a/packages/products/tdesign-react/src/color-picker/defaultProps.ts b/packages/products/tdesign-react/src/color-picker/defaultProps.ts index d404303d1..a965cae7d 100644 --- a/packages/products/tdesign-react/src/color-picker/defaultProps.ts +++ b/packages/products/tdesign-react/src/color-picker/defaultProps.ts @@ -9,6 +9,7 @@ export const colorPickerDefaultProps: TdColorPickerProps = { clearable: false, closeBtn: true, colorModes: ['monochrome', 'linear-gradient'], + disabled: undefined, enableAlpha: false, enableMultipleGradient: true, format: 'RGB', diff --git a/packages/products/tdesign-react/src/date-picker/date-picker.md b/packages/products/tdesign-react/src/date-picker/date-picker.md index 5b0e23811..ab5c5e137 100644 --- a/packages/products/tdesign-react/src/date-picker/date-picker.md +++ b/packages/products/tdesign-react/src/date-picker/date-picker.md @@ -24,7 +24,7 @@ mode | String | date | 选择器模式。可选项:year/quarter/month/week/dat multiple | Boolean | false | 支持多选日期,但不支持在range-picker中,或与enableTimePicker、allowInput 一起使用。TS 类型:`boolean` | N needConfirm | Boolean | true | 决定在日期时间选择器的场景下是否需要点击确认按钮才完成选择动作,默认为`true` | N placeholder | String / Array | undefined | 占位符。TS 类型:`string` | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts) | N prefixIcon | TElement | - | 用于自定义组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N presets | Object | - | 预设快捷日期选择,示例:`{ '元旦': '2021-01-01', '昨天': dayjs().subtract(1, 'day').format('YYYY-MM-DD'), '特定日期': () => ['2021-02-01'] }`。TS 类型:`PresetDate` `interface PresetDate { [name: string]: DateValue \| (() => DateValue) }`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts) | N presetsPlacement | String | bottom | 预设面板展示区域(包含确定按钮)。可选项:left/top/right/bottom | N @@ -68,7 +68,7 @@ mode | String | date | 选择器模式。可选项:year/quarter/month/week/dat needConfirm | Boolean | true | 决定在日期时间区间选择器的场景下是否需要点击确认按钮才完成选择动作,默认为 `true` | N panelPreselection | Boolean | true | 在开始日期选中之前,面板是否显示预选状态,即是否高亮预选日期 | N placeholder | String / Array | - | 占位符,值为数组表示可分别为开始日期和结束日期设置占位符。TS 类型:`string \| Array` | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts) | N prefixIcon | TElement | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N presets | Object | - | 预设快捷日期选择,示例:{ '特定日期范围': ['2021-01-01', '2022-01-01'], '本月': [dayjs().startOf('month'), dayjs().endOf('month')] }。TS 类型:`PresetRange` `interface PresetRange { [range: string]: DateRange \| (() => DateRange)}` `type DateRange = [DateValue, DateValue]`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts) | N presetsPlacement | String | bottom | 预设面板展示区域(包含确定按钮)。可选项:left/top/right/bottom | N diff --git a/packages/products/tdesign-react/src/date-picker/type.ts b/packages/products/tdesign-react/src/date-picker/type.ts index ccfea4247..1f556ede4 100644 --- a/packages/products/tdesign-react/src/date-picker/type.ts +++ b/packages/products/tdesign-react/src/date-picker/type.ts @@ -89,7 +89,7 @@ export interface TdDatePickerProps { */ placeholder?: string; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** @@ -258,7 +258,7 @@ export interface TdDateRangePickerProps { */ placeholder?: string | Array; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-react/src/dropdown-menu/defaultProps.ts b/packages/products/tdesign-react/src/dropdown-menu/defaultProps.ts new file mode 100644 index 000000000..c772d6aa6 --- /dev/null +++ b/packages/products/tdesign-react/src/dropdown-menu/defaultProps.ts @@ -0,0 +1,13 @@ +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdDropdownItemProps } from './type'; + +export const dropdownItemDefaultProps: TdDropdownItemProps = { + active: false, + content: '', + disabled: false, + divider: false, + theme: 'default', +}; diff --git a/packages/products/tdesign-react/src/dropdown/defaultProps.ts b/packages/products/tdesign-react/src/dropdown/defaultProps.ts index a9c9197ea..dced15787 100644 --- a/packages/products/tdesign-react/src/dropdown/defaultProps.ts +++ b/packages/products/tdesign-react/src/dropdown/defaultProps.ts @@ -2,7 +2,7 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ -import { TdDropdownProps, TdDropdownItemProps } from './type'; +import { TdDropdownProps } from './type'; export const dropdownDefaultProps: TdDropdownProps = { direction: 'right', @@ -15,10 +15,3 @@ export const dropdownDefaultProps: TdDropdownProps = { placement: 'bottom-left', trigger: 'hover', }; - -export const dropdownItemDefaultProps: TdDropdownItemProps = { - active: false, - disabled: false, - divider: false, - theme: 'default', -}; diff --git a/packages/products/tdesign-react/src/dropdown/dropdown.en-US.md b/packages/products/tdesign-react/src/dropdown/dropdown.en-US.md index 121b17d41..afd423635 100644 --- a/packages/products/tdesign-react/src/dropdown/dropdown.en-US.md +++ b/packages/products/tdesign-react/src/dropdown/dropdown.en-US.md @@ -1,19 +1,20 @@ :: BASE_DOC :: ## API + ### Dropdown Props name | type | default | description | required -- | -- | -- | -- | -- -className | String | - | 类名 | N -style | Object | - | 样式,Typescript:`React.CSSProperties` | N +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N direction | String | right | options: left/right | N disabled | Boolean | false | \- | N hideAfterItemClick | Boolean | true | \- | N maxColumnWidth | String / Number | 100 | \- | N maxHeight | Number | 300 | \- | N minColumnWidth | String / Number | 10 | \- | N -options | Array | [] | Typescript:`Array` `type DropdownOption = { children?: Array } & TdDropdownItemProps & Record`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/dropdown/type.ts) | N +options | Array | [] | Typescript:`Array` `type DropdownOption = { children?: DropdownOption[] } & TdDropdownItemProps & Record`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/dropdown/type.ts) | N panelBottomContent | TNode | - | bottom content of the dropdown panel。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N panelTopContent | TNode | - | top content of the dropdown panel。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N placement | String | bottom-left | options: top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N @@ -21,12 +22,13 @@ popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./po trigger | String | hover | options: hover/click/focus/context-menu | N onClick | Function | | Typescript:`(dropdownItem: DropdownOption, context: { e: MouseEvent }) => void`
| N + ### DropdownItem Props name | type | default | description | required -- | -- | -- | -- | -- -className | String | - | 类名 | N -style | Object | - | 样式,Typescript:`React.CSSProperties` | N +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N active | Boolean | false | \- | N content | TNode | '' | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N disabled | Boolean | false | \- | N diff --git a/packages/products/tdesign-react/src/dropdown/dropdown.md b/packages/products/tdesign-react/src/dropdown/dropdown.md index d6fb0e88b..7685aadba 100644 --- a/packages/products/tdesign-react/src/dropdown/dropdown.md +++ b/packages/products/tdesign-react/src/dropdown/dropdown.md @@ -1,9 +1,10 @@ :: BASE_DOC :: ## API + ### Dropdown Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N @@ -13,17 +14,18 @@ hideAfterItemClick | Boolean | true | 点击选项后是否自动隐藏弹窗 | maxColumnWidth | String / Number | 100 | 选项最大宽度,内容超出时,显示为省略号。值为字符串时,值就是最大宽度;值为数字时,单位:px | N maxHeight | Number | 300 | 弹窗最大高度,单位:px 。统一控制每一列的高度 | N minColumnWidth | String / Number | 10 | 选项最小宽度。值为字符串时,值就是最小宽度;值为数字时,单位:px | N -options | Array | [] | 下拉操作项。TS 类型:`Array` `type DropdownOption = { children?: Array } & TdDropdownItemProps & Record`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/dropdown/type.ts) | N +options | Array | [] | 下拉操作项。TS 类型:`Array` `type DropdownOption = { children?: DropdownOption[] } & TdDropdownItemProps & Record`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/dropdown/type.ts) | N panelBottomContent | TNode | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N panelTopContent | TNode | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N placement | String | bottom-left | 弹窗定位方式,可选值同 Popup 组件。可选项:top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N -popupProps | Object | - | 透传 Popup 组件属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/dropdown/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/dropdown/type.ts) | N trigger | String | hover | 触发下拉显示的方式。可选项:hover/click/focus/context-menu | N onClick | Function | | TS 类型:`(dropdownItem: DropdownOption, context: { e: MouseEvent }) => void`
下拉操作项点击时触发 | N + ### DropdownItem Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N diff --git a/packages/products/tdesign-react/src/dropdown/type.ts b/packages/products/tdesign-react/src/dropdown/type.ts index bf10b66f7..9f5f03b9a 100644 --- a/packages/products/tdesign-react/src/dropdown/type.ts +++ b/packages/products/tdesign-react/src/dropdown/type.ts @@ -44,6 +44,14 @@ export interface TdDropdownProps { * @default [] */ options?: Array; + /** + * 面板内的底部内容 + */ + panelBottomContent?: TNode; + /** + * 面板内的顶部内容 + */ + panelTopContent?: TNode; /** * 弹窗定位方式,可选值同 Popup 组件 * @default bottom-left @@ -62,7 +70,7 @@ export interface TdDropdownProps { | 'right-top' | 'right-bottom'; /** - * 透传 Popup 组件属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式 + * 透传 Popup 组件全部属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式 */ popupProps?: PopupProps; /** @@ -116,6 +124,6 @@ export interface TdDropdownItemProps { onClick?: (dropdownItem: DropdownOption, context: { e: MouseEvent }) => void; } -export type DropdownOption = { children?: Array } & TdDropdownItemProps & Record; +export type DropdownOption = { children?: DropdownOption[] } & TdDropdownItemProps & Record; export type DropdownItemTheme = 'default' | 'success' | 'warning' | 'error'; diff --git a/packages/products/tdesign-react/src/guide/guide.md b/packages/products/tdesign-react/src/guide/guide.md index 84951ce20..9dd449c00 100644 --- a/packages/products/tdesign-react/src/guide/guide.md +++ b/packages/products/tdesign-react/src/guide/guide.md @@ -11,7 +11,7 @@ style | Object | - | 样式,TS 类型:`React.CSSProperties` | N counter | TElement | - | 用于自定义渲染计数部分。TS 类型:`TNode<{ current: number; total: number }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N current | Number | - | 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景 | N defaultCurrent | Number | - | 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景。非受控属性 | N -finishButtonProps | Object | - | 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }`。TS 类型:`ButtonProps` | N +finishButtonProps | Object | - | 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }`。TS 类型:`ButtonProps` | N hideCounter | Boolean | false | 是否隐藏计数 | N hidePrev | Boolean | false | 是否隐藏上一步按钮 | N hideSkip | Boolean | false | 是否隐藏跳过按钮 | N @@ -43,7 +43,7 @@ mode | String | - | 引导框的类型。可选项:popup/dialog | N nextButtonProps | Object | - | 用于自定义当前引导框的下一步按钮的内容。TS 类型:`ButtonProps` | N offset | Array | - | 【讨论确认中】相对于 placement 的偏移量,示例:[-10, 20] 或 ['10px', '8px']。TS 类型:`Array` | N placement | String | 'top' | 引导框相对于高亮元素出现的位置。TS 类型:`StepPopupPlacement \| StepDialogPlacement` `type StepPopupPlacement = 'top'\|'left'\|'right'\|'bottom'\|'top-left'\|'top-right'\|'bottom-left'\|'bottom-right'\|'left-top'\|'left-bottom'\|'right-top'\|'right-bottom'` `type StepDialogPlacement = 'top'\|'center' `。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/guide/type.ts) | N -popupProps | Object | - | 透传全部属性到 Popup 组件。`mode=popup` 时有效。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/guide/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。`mode=popup` 时有效。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/guide/type.ts) | N prevButtonProps | Object | - | 用于自定义当前引导框的上一步按钮的内容。TS 类型:`ButtonProps` | N showOverlay | Boolean | true | 是否出现遮罩层 | N skipButtonProps | Object | - | 用于自定义当前步骤引导框的跳过按钮的内容。TS 类型:`ButtonProps` | N diff --git a/packages/products/tdesign-react/src/guide/type.ts b/packages/products/tdesign-react/src/guide/type.ts index 8bfb9fc5f..e6ba92772 100644 --- a/packages/products/tdesign-react/src/guide/type.ts +++ b/packages/products/tdesign-react/src/guide/type.ts @@ -23,7 +23,7 @@ export interface TdGuideProps { */ defaultCurrent?: number; /** - * 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }` + * 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }` */ finishButtonProps?: ButtonProps; /** @@ -142,7 +142,7 @@ export interface GuideStep { */ placement?: StepPopupPlacement | StepDialogPlacement; /** - * 透传全部属性到 Popup 组件。`mode=popup` 时有效 + * 透传 Popup 组件全部属性。`mode=popup` 时有效 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-react/src/menu/menu.md b/packages/products/tdesign-react/src/menu/menu.md index fe86eb0e6..13c04f9a9 100644 --- a/packages/products/tdesign-react/src/menu/menu.md +++ b/packages/products/tdesign-react/src/menu/menu.md @@ -50,7 +50,7 @@ children | TNode | - | 菜单项内容,同 content。TS 类型:`string \| TN content | TNode | - | 菜单项内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用菜单项展开/收起/跳转等功能 | N icon | TElement | - | 菜单项图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -popupProps | Object | - | 透传 Popup 组件全部特性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/menu/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/menu/type.ts) | N title | TNode | - | 二级菜单内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N value | String / Number | - | 菜单项唯一标识。TS 类型:`MenuValue` | N diff --git a/packages/products/tdesign-react/src/menu/type.ts b/packages/products/tdesign-react/src/menu/type.ts index 4f4c45d2b..836bf4559 100644 --- a/packages/products/tdesign-react/src/menu/type.ts +++ b/packages/products/tdesign-react/src/menu/type.ts @@ -136,7 +136,7 @@ export interface TdSubmenuProps { */ icon?: TElement; /** - * 透传 Popup 组件全部特性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-react/src/popconfirm/defaultProps.ts b/packages/products/tdesign-react/src/popconfirm/defaultProps.ts new file mode 100644 index 000000000..64f7515ce --- /dev/null +++ b/packages/products/tdesign-react/src/popconfirm/defaultProps.ts @@ -0,0 +1,14 @@ +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdPopconfirmProps } from './type'; + +export const popconfirmDefaultProps: TdPopconfirmProps = { + cancelBtn: '', + confirmBtn: '', + destroyOnClose: true, + placement: 'top', + showArrow: true, + theme: 'default', +}; diff --git a/packages/products/tdesign-react/src/popconfirm/popconfirm.en-US.md b/packages/products/tdesign-react/src/popconfirm/popconfirm.en-US.md index 1c616b06c..fa433e517 100644 --- a/packages/products/tdesign-react/src/popconfirm/popconfirm.en-US.md +++ b/packages/products/tdesign-react/src/popconfirm/popconfirm.en-US.md @@ -6,21 +6,18 @@ name | type | default | description | required -- | -- | -- | -- | -- -className | String | - | 类名 | N -style | Object | - | 样式,Typescript:`React.CSSProperties` | N +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N cancelBtn | TNode | '' | Typescript:`string \| ButtonProps \| TNode`,[Button API Documents](./button?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/popconfirm/type.ts) | N children | TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N confirmBtn | TNode | '' | Typescript:`string \| ButtonProps \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -content | TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N destroyOnClose | Boolean | true | \- | N icon | TElement | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -placement | String | top | options:top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N +placement | String | top | options: top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/popconfirm/type.ts) | N showArrow | Boolean | true | \- | N -theme | String | default | options:default/warning/danger | N +theme | String | default | options: default/warning/danger | N triggerElement | TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -visible | Boolean | - | \- | N -defaultVisible | Boolean | - | uncontrolled property | N onCancel | Function | | Typescript:`(options: { e: MouseEvent }) => void`
| N onConfirm | Function | | Typescript:`(options: { e: MouseEvent }) => void`
| N onVisibleChange | Function | | Typescript:`(visible: boolean, context?: PopconfirmVisibleChangeContext) => void`
[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/popconfirm/type.ts)。
`interface PopconfirmVisibleChangeContext { trigger?: TriggerSource; e?: MouseEvent }`

`type TriggerSource = 'cancel' \| 'confirm' \| 'document' \| 'trigger-element-click'`
| N diff --git a/packages/products/tdesign-react/src/popconfirm/popconfirm.md b/packages/products/tdesign-react/src/popconfirm/popconfirm.md index 06235c31a..3724b5411 100644 --- a/packages/products/tdesign-react/src/popconfirm/popconfirm.md +++ b/packages/products/tdesign-react/src/popconfirm/popconfirm.md @@ -4,23 +4,20 @@ ### Popconfirm Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N cancelBtn | TNode | '' | 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件。TS 类型:`string \| ButtonProps \| TNode`,[Button API Documents](./button?tab=api)。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/popconfirm/type.ts) | N children | TNode | - | 触发元素,同 triggerElement。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N confirmBtn | TNode | '' | 确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件。TS 类型:`string \| ButtonProps \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -content | TNode | - | 确认框内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N destroyOnClose | Boolean | true | 是否在关闭浮层时销毁浮层 | N icon | TElement | - | 确认框图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N placement | String | top | 浮层出现位置。可选项:top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N -popupProps | Object | - | 透传 Popup 组件属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/popconfirm/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/popconfirm/type.ts) | N showArrow | Boolean | true | 是否显示浮层箭头 | N theme | String | default | 文字提示风格。如果期望不显示文本前方的主题图标,请更为设置 `icon` 为 `null`。可选项:default/warning/danger | N triggerElement | TNode | - | 触发元素。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -visible | Boolean | - | 是否显示气泡确认框 | N -defaultVisible | Boolean | - | 是否显示气泡确认框。非受控属性 | N onCancel | Function | | TS 类型:`(options: { e: MouseEvent }) => void`
点击取消按钮时触发 | N onConfirm | Function | | TS 类型:`(options: { e: MouseEvent }) => void`
点击确认按钮时触发 | N onVisibleChange | Function | | TS 类型:`(visible: boolean, context?: PopconfirmVisibleChangeContext) => void`
确认框显示或隐藏时触发。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/popconfirm/type.ts)。
`interface PopconfirmVisibleChangeContext { trigger?: TriggerSource; e?: MouseEvent }`

`type TriggerSource = 'cancel' \| 'confirm' \| 'document' \| 'trigger-element-click'`
| N diff --git a/packages/products/tdesign-react/src/popconfirm/type.ts b/packages/products/tdesign-react/src/popconfirm/type.ts new file mode 100644 index 000000000..6819ae0c5 --- /dev/null +++ b/packages/products/tdesign-react/src/popconfirm/type.ts @@ -0,0 +1,90 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { ButtonProps } from '../button'; +import { PopupProps } from '../popup'; +import { TNode, TElement } from '../common'; +import { MouseEvent } from 'react'; + +export interface TdPopconfirmProps { + /** + * 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件 + * @default '' + */ + cancelBtn?: ButtonProps | TNode; + /** + * 触发元素,同 triggerElement + */ + children?: TNode; + /** + * 确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件 + * @default '' + */ + confirmBtn?: ButtonProps | TNode; + /** + * 是否在关闭浮层时销毁浮层 + * @default true + */ + destroyOnClose?: boolean; + /** + * 确认框图标 + */ + icon?: TElement; + /** + * 浮层出现位置 + * @default top + */ + placement?: + | 'top' + | 'left' + | 'right' + | 'bottom' + | 'top-left' + | 'top-right' + | 'bottom-left' + | 'bottom-right' + | 'left-top' + | 'left-bottom' + | 'right-top' + | 'right-bottom'; + /** + * 透传 Popup 组件全部属性 + */ + popupProps?: PopupProps; + /** + * 是否显示浮层箭头 + * @default true + */ + showArrow?: boolean; + /** + * 文字提示风格。如果期望不显示文本前方的主题图标,请更为设置 `icon` 为 `null` + * @default default + */ + theme?: 'default' | 'warning' | 'danger'; + /** + * 触发元素 + */ + triggerElement?: TNode; + /** + * 点击取消按钮时触发 + */ + onCancel?: (options: { e: MouseEvent }) => void; + /** + * 点击确认按钮时触发 + */ + onConfirm?: (options: { e: MouseEvent }) => void; + /** + * 确认框显示或隐藏时触发 + */ + onVisibleChange?: (visible: boolean, context?: PopconfirmVisibleChangeContext) => void; +} + +export interface PopconfirmVisibleChangeContext { + trigger?: TriggerSource; + e?: MouseEvent; +} + +export type TriggerSource = 'cancel' | 'confirm' | 'document' | 'trigger-element-click'; diff --git a/packages/products/tdesign-react/src/radio/radio.en-US.md b/packages/products/tdesign-react/src/radio/radio.en-US.md index 7b6aecc83..1098430d5 100644 --- a/packages/products/tdesign-react/src/radio/radio.en-US.md +++ b/packages/products/tdesign-react/src/radio/radio.en-US.md @@ -33,7 +33,7 @@ name | String | - | \- | N options | Array | - | Typescript:`Array` `type RadioOption = string \| number \| RadioOptionObj` `interface RadioOptionObj { label?: string \| TNode; value?: string \| number \| boolean; disabled?: boolean }`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/radio/type.ts) | N readonly | Boolean | undefined | \- | N size | String | medium | options: small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -theme | String | radio | component Style。options: radio/button | N +theme | String | radio | Determine the style of radio when using options API。options: radio/button | N value | String / Number / Boolean | - | Typescript:`T` `type RadioValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/radio/type.ts) | N defaultValue | String / Number / Boolean | - | uncontrolled property。Typescript:`T` `type RadioValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/radio/type.ts) | N variant | String | outline | options: outline/primary-filled/default-filled | N diff --git a/packages/products/tdesign-react/src/radio/radio.md b/packages/products/tdesign-react/src/radio/radio.md index 6d03e6c3d..40ec09114 100644 --- a/packages/products/tdesign-react/src/radio/radio.md +++ b/packages/products/tdesign-react/src/radio/radio.md @@ -33,7 +33,7 @@ name | String | - | HTML 元素原生属性 | N options | Array | - | 单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同。TS 类型:`Array` `type RadioOption = string \| number \| RadioOptionObj` `interface RadioOptionObj { label?: string \| TNode; value?: string \| number \| boolean; disabled?: boolean }`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/radio/type.ts) | N readonly | Boolean | undefined | 只读状态 | N size | String | medium | 组件尺寸【讨论中】。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -theme | String | radio | 组件风格。可选项:radio/button | N +theme | String | radio | 用于在使用 options 方式渲染时决定组件的风格。可选项:radio/button | N value | String / Number / Boolean | - | 选中的值。TS 类型:`T` `type RadioValue = string \| number \| boolean`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/radio/type.ts) | N defaultValue | String / Number / Boolean | - | 选中的值。非受控属性。TS 类型:`T` `type RadioValue = string \| number \| boolean`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/radio/type.ts) | N variant | String | outline | 单选组件按钮形式。可选项:outline/primary-filled/default-filled | N diff --git a/packages/products/tdesign-react/src/radio/type.ts b/packages/products/tdesign-react/src/radio/type.ts index b09c35285..4aff077e7 100644 --- a/packages/products/tdesign-react/src/radio/type.ts +++ b/packages/products/tdesign-react/src/radio/type.ts @@ -87,7 +87,7 @@ export interface TdRadioGroupProps { */ size?: SizeEnum; /** - * 组件风格 + * 用于在使用 options 方式渲染时决定组件的风格 * @default radio */ theme?: 'radio' | 'button'; diff --git a/packages/products/tdesign-react/src/range-input/defaultProps.ts b/packages/products/tdesign-react/src/range-input/defaultProps.ts index 4eeb3085f..1e99c1f6f 100644 --- a/packages/products/tdesign-react/src/range-input/defaultProps.ts +++ b/packages/products/tdesign-react/src/range-input/defaultProps.ts @@ -2,7 +2,19 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ -import { TdRangeInputPopupProps } from './type'; +import { TdRangeInputProps, TdRangeInputPopupProps } from './type'; + +export const rangeInputDefaultProps: TdRangeInputProps = { + borderless: false, + clearable: false, + disabled: undefined, + readonly: undefined, + separator: '-', + showClearIconOnEmpty: false, + size: 'medium', + status: 'default', + defaultValue: [], +}; export const rangeInputPopupDefaultProps: TdRangeInputPopupProps = { autoWidth: false, diff --git a/packages/products/tdesign-react/src/range-input/range-input.md b/packages/products/tdesign-react/src/range-input/range-input.md index 76253bf78..a7ece7720 100644 --- a/packages/products/tdesign-react/src/range-input/range-input.md +++ b/packages/products/tdesign-react/src/range-input/range-input.md @@ -59,7 +59,7 @@ inputValue | Array | - | 输入框的值。TS 类型:`RangeInputValue` | N defaultInputValue | Array | - | 输入框的值。非受控属性。TS 类型:`RangeInputValue` | N label | TNode | - | 左侧文本。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N panel | TNode | - | 下拉框内容,可完全自定义。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -popupProps | Object | - | 透传 Popup 浮层组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/range-input/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/range-input/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框 | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N rangeInputProps | Object | - | 透传 RangeInput 组件全部属性。TS 类型:`RangeInputProps`,[RangeInput API Documents](./range-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/range-input/type.ts) | N diff --git a/packages/products/tdesign-react/src/range-input/type.ts b/packages/products/tdesign-react/src/range-input/type.ts index 4e1dc3c5a..a29f5ca13 100644 --- a/packages/products/tdesign-react/src/range-input/type.ts +++ b/packages/products/tdesign-react/src/range-input/type.ts @@ -4,11 +4,163 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ +import { InputProps, InputValue, InputFormatType } from '../input'; import { PopupProps } from '../popup'; import { RangeInputProps } from '../range-input'; import { PopupVisibleChangeContext } from '../popup'; -import { TNode } from '../common'; -import { MouseEvent, FormEvent } from 'react'; +import { TNode, TElement } from '../common'; +import { MouseEvent, FocusEvent, FormEvent, CompositionEvent } from 'react'; + +export interface TdRangeInputProps { + /** + * 输入框高亮状态序号 + */ + activeIndex?: number; + /** + * 无边框模式 + * @default false + */ + borderless?: boolean; + /** + * 是否可清空 + * @default false + */ + clearable?: boolean; + /** + * 是否禁用范围输入框 + */ + disabled?: boolean; + /** + * 指定输入框展示值的格式 + */ + format?: InputFormatType | Array; + /** + * 透传 Input 输入框组件全部属性,数组第一项表示第一个输入框属性,第二项表示第二个输入框属性。示例:`[{ label: 'A', name: 'A-name' }, { label: 'B', name: 'B-name' }]` + */ + inputProps?: InputProps | Array; + /** + * 左侧内容 + */ + label?: TNode; + /** + * 占位符,示例:'请输入' 或者 ['开始日期', '结束日期'] + */ + placeholder?: string | Array; + /** + * 组件前置图标 + */ + prefixIcon?: TElement; + /** + * 只读状态 + */ + readonly?: boolean; + /** + * 范围分隔符 + * @default '-' + */ + separator?: TNode; + /** + * 输入框内容为空时,悬浮状态是否显示清空按钮,默认不显示 + * @default false + */ + showClearIconOnEmpty?: boolean; + /** + * 输入框尺寸 + * @default medium + */ + size?: 'small' | 'medium' | 'large'; + /** + * 输入框状态 + * @default default + */ + status?: 'default' | 'success' | 'warning' | 'error'; + /** + * 后置图标前的后置内容 + */ + suffix?: TNode; + /** + * 组件后置图标 + */ + suffixIcon?: TElement; + /** + * 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式 + */ + tips?: TNode; + /** + * 范围输入框的值 + * @default [] + */ + value?: RangeInputValue; + /** + * 范围输入框的值,非受控属性 + * @default [] + */ + defaultValue?: RangeInputValue; + /** + * 范围输入框失去焦点时触发 + */ + onBlur?: ( + value: RangeInputValue, + context?: { e?: FocusEvent; position?: RangeInputPosition }, + ) => void; + /** + * 范围输入框值发生变化时触发 + */ + onChange?: ( + value: RangeInputValue, + context?: { + e?: FormEvent | MouseEvent | CompositionEvent; + position?: RangeInputPosition; + trigger?: 'input' | 'initial' | 'clear'; + }, + ) => void; + /** + * 清空按钮点击时触发 + */ + onClear?: (context: { e: MouseEvent }) => void; + /** + * 范围输入框点击时触发 + */ + onClick?: (context?: { e?: MouseEvent; position?: RangeInputPosition }) => void; + /** + * 回车键按下时触发 + */ + onEnter?: ( + value: RangeInputValue, + context?: { e?: FormEvent | MouseEvent; position?: RangeInputPosition }, + ) => void; + /** + * 范围输入框获得焦点时触发 + */ + onFocus?: ( + value: RangeInputValue, + context?: { e?: FocusEvent; position?: RangeInputPosition }, + ) => void; + /** + * 进入输入框时触发 + */ + onMouseenter?: (context: { e: MouseEvent }) => void; + /** + * 离开输入框时触发 + */ + onMouseleave?: (context: { e: MouseEvent }) => void; +} + +/** 组件实例方法 */ +export interface RangeInputInstanceFunctions { + /** + * 使其中一个输入框失去焦点 + */ + blur?: (options?: { position?: RangeInputPosition }) => void; + /** + * 使其中一个输入框获得焦点 + */ + focus?: (options?: { position?: RangeInputPosition }) => void; + /** + * 使其中一个输入框选中内容 + */ + select?: (options?: { position?: RangeInputPosition }) => void; +} export interface TdRangeInputPopupProps { /** @@ -37,7 +189,7 @@ export interface TdRangeInputPopupProps { */ panel?: TNode; /** - * 透传 Popup 浮层组件全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** @@ -71,6 +223,10 @@ export interface TdRangeInputPopupProps { onPopupVisibleChange?: (visible: boolean, context: PopupVisibleChangeContext) => void; } +export type RangeInputValue = Array; + +export type RangeInputPosition = 'first' | 'second' | 'all'; + export type RangeInputValueChangeContext = { e?: FormEvent | MouseEvent; trigger?: 'input' | 'clear'; diff --git a/packages/products/tdesign-react/src/search/defaultProps.ts b/packages/products/tdesign-react/src/search/defaultProps.ts new file mode 100644 index 000000000..acc6fbab5 --- /dev/null +++ b/packages/products/tdesign-react/src/search/defaultProps.ts @@ -0,0 +1,18 @@ +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdSearchProps } from './type'; + +export const searchDefaultProps: TdSearchProps = { + autoWidth: false, + autofocus: false, + borderless: true, + clearable: true, + disabled: false, + label: '', + multiline: false, + placeholder: '', + readonly: undefined, + suffix: '', +}; diff --git a/packages/products/tdesign-react/src/search/search.en-US.md b/packages/products/tdesign-react/src/search/search.en-US.md index ef12d2b5f..c1fca74a6 100644 --- a/packages/products/tdesign-react/src/search/search.en-US.md +++ b/packages/products/tdesign-react/src/search/search.en-US.md @@ -6,14 +6,14 @@ name | type | default | description | required -- | -- | -- | -- | -- -className | String | - | 类名 | N -style | Object | - | 样式,Typescript:`React.CSSProperties` | N +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N autoWidth | Boolean | false | \- | N autocompleteOptions | Array | - | autocomplete words list。Typescript:`Array` `type AutocompleteOption = string \| { label: string \| TNode; group?: boolean }`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/search/type.ts) | N autofocus | Boolean | false | auto focus as default | N borderless | Boolean | true | \- | N clearable | Boolean | true | \- | N -disabled | Boolean | - | \- | N +disabled | Boolean | false | \- | N filter | Function | - | Typescript:`(keyword: string, option: any) => boolean \| Promise` | N inputProps | Object | - | Typescript:`InputProps`,[Input API Documents](./input?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/search/type.ts) | N label | TNode | '' | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N @@ -21,7 +21,7 @@ multiline | Boolean | false | \- | N placeholder | String | '' | \- | N popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/search/type.ts) | N prefixIcon | TElement | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -readonly | Boolean | false | \- | N +readonly | Boolean | undefined | \- | N selectInputProps | Object | - | Typescript:`SelectInputProps`,[SelectInput API Documents](./select-input?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/search/type.ts) | N suffix | TNode | '' | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N suffixIcon | TElement | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-react/src/search/search.md b/packages/products/tdesign-react/src/search/search.md index a2ace4b4e..9cd1db22f 100644 --- a/packages/products/tdesign-react/src/search/search.md +++ b/packages/products/tdesign-react/src/search/search.md @@ -4,16 +4,16 @@ ### Search Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N autoWidth | Boolean | false | 搜索框宽度自适应 | N -autocompleteOptions | Array | - | 联想词列表,如果不存在或长度为 0 则不显示联想框。支持自定义联想词为任意内容。如果 `group` 值为 `true` 则表示当前项为分组标题。TS 类型:`Array` `type AutocompleteOption = string \| { label: string \| TNode; group?: boolean }`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/search/type.ts) | N +autocompleteOptions | Array | - | 联想词列表,如果不存在或长度为 0 则不显示联想框。可以使用函数 `label` 自定义联想词为任意内容;也可使用插槽 `option` 定义联想词内容,插槽参数为 `{ option: AutocompleteOption; index: number }`。如果 `group` 值为 `true` 则表示当前项为分组标题。TS 类型:`Array` `type AutocompleteOption = string \| { label: string \| TNode; group?: boolean }`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/search/type.ts) | N autofocus | Boolean | false | 是否默认聚焦 | N borderless | Boolean | true | 无边框模式 | N -clearable | Boolean | true | 是否可清空 | N -disabled | Boolean | - | 禁用状态 | N +clearable | Boolean | true | 是否启用清除控件 | N +disabled | Boolean | false | 是否禁用 | N filter | Function | - | 自定义过滤方法,用于对现有数据进行搜索过滤,判断是否过滤某一项数据。其中参数 `keyword` 指当前的搜索词,参数 `option` 指每一项联想词,函数返回 true 则显示当前联想词,函数返回 `false` 则隐藏当前联想词。TS 类型:`(keyword: string, option: any) => boolean \| Promise` | N inputProps | Object | - | 透传 Input 组件全部属性。TS 类型:`InputProps`,[Input API Documents](./input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/search/type.ts) | N label | TNode | '' | 搜索框内部左侧内容,位于 `prefixIcon` 左侧。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N @@ -21,13 +21,13 @@ multiline | Boolean | false | 批量搜索模式,也叫多行搜索,输入 placeholder | String | '' | 占位符 | N popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/search/type.ts) | N prefixIcon | TElement | - | 前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -readonly | Boolean | false | 只读状态 | N +readonly | Boolean | undefined | 只读状态 | N selectInputProps | Object | - | 基于 SelectInput 组件开发,透传组件全部属性。TS 类型:`SelectInputProps`,[SelectInput API Documents](./select-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/search/type.ts) | N suffix | TNode | '' | 搜索框内部右侧内容,位于 `suffixIcon` 右侧。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N suffixIcon | TElement | - | 后置图标,默认为搜索图标。值为 `null` 时则不显示。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N textareaProps | Object | - | 透传 Textarea 组件全部属性。TS 类型:`TextareaProps`,[Textarea API Documents](./textarea?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/search/type.ts) | N -value | String | - | 值,搜索关键词 | N -defaultValue | String | - | 值,搜索关键词。非受控属性 | N +value | String | - | 值 | N +defaultValue | String | - | 值。非受控属性 | N onBlur | Function | | TS 类型:`(context: { value: string; e: FocusEvent }) => void`
失去焦点时触发 | N onChange | Function | | TS 类型:`(value: string, context: { trigger: 'input-change' \| 'option-click'; e?: InputEvent \| MouseEvent }) => void`
搜索关键词发生变化时触发,可能场景有:搜索框内容发生变化、点击联想词 | N onClear | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
点击清除时触发 | N diff --git a/packages/products/tdesign-react/src/search/type.ts b/packages/products/tdesign-react/src/search/type.ts new file mode 100644 index 000000000..fdba00a20 --- /dev/null +++ b/packages/products/tdesign-react/src/search/type.ts @@ -0,0 +1,144 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { InputProps } from '../input'; +import { PopupProps } from '../popup'; +import { SelectInputProps } from '../select-input'; +import { TextareaProps } from '../textarea'; +import { TNode, TElement } from '../common'; +import { MouseEvent, KeyboardEvent, FocusEvent, FormEvent } from 'react'; + +export interface TdSearchProps { + /** + * 搜索框宽度自适应 + * @default false + */ + autoWidth?: boolean; + /** + * 联想词列表,如果不存在或长度为 0 则不显示联想框。可以使用函数 `label` 自定义联想词为任意内容;也可使用插槽 `option` 定义联想词内容,插槽参数为 `{ option: AutocompleteOption; index: number }`。如果 `group` 值为 `true` 则表示当前项为分组标题 + */ + autocompleteOptions?: Array; + /** + * 是否默认聚焦 + * @default false + */ + autofocus?: boolean; + /** + * 无边框模式 + * @default true + */ + borderless?: boolean; + /** + * 是否启用清除控件 + * @default true + */ + clearable?: boolean; + /** + * 是否禁用 + * @default false + */ + disabled?: boolean; + /** + * 自定义过滤方法,用于对现有数据进行搜索过滤,判断是否过滤某一项数据。其中参数 `keyword` 指当前的搜索词,参数 `option` 指每一项联想词,函数返回 true 则显示当前联想词,函数返回 `false` 则隐藏当前联想词 + */ + filter?: (keyword: string, option: any) => boolean | Promise; + /** + * 透传 Input 组件全部属性 + */ + inputProps?: InputProps; + /** + * 搜索框内部左侧内容,位于 `prefixIcon` 左侧 + * @default '' + */ + label?: TNode; + /** + * 批量搜索模式,也叫多行搜索,输入框表现为类似 `textarea`,允许输入多行搜索内容 + * @default false + */ + multiline?: boolean; + /** + * 占位符 + * @default '' + */ + placeholder?: string; + /** + * 透传 Popup 组件全部属性 + */ + popupProps?: PopupProps; + /** + * 前置图标 + */ + prefixIcon?: TElement; + /** + * 只读状态 + */ + readonly?: boolean; + /** + * 基于 SelectInput 组件开发,透传组件全部属性 + */ + selectInputProps?: SelectInputProps; + /** + * 搜索框内部右侧内容,位于 `suffixIcon` 右侧 + * @default '' + */ + suffix?: TNode; + /** + * 后置图标,默认为搜索图标。值为 `null` 时则不显示 + */ + suffixIcon?: TElement; + /** + * 透传 Textarea 组件全部属性 + */ + textareaProps?: TextareaProps; + /** + * 值 + * @default '' + */ + value?: string; + /** + * 值,非受控属性 + * @default '' + */ + defaultValue?: string; + /** + * 失去焦点时触发 + * @default '' + */ + onBlur?: (context: { value: string; e: FocusEvent }) => void; + /** + * 搜索关键词发生变化时触发,可能场景有:搜索框内容发生变化、点击联想词 + * @default '' + */ + onChange?: ( + value: string, + context: { trigger: 'input-change' | 'option-click'; e?: FormEvent | MouseEvent }, + ) => void; + /** + * 点击清除时触发 + * @default '' + */ + onClear?: (context: { e: MouseEvent }) => void; + /** + * 回车键按下时触发 + */ + onEnter?: (context: { value: string; e: KeyboardEvent }) => void; + /** + * 获得焦点时触发 + * @default '' + */ + onFocus?: (context: { value: string; e: FocusEvent }) => void; + /** + * 搜索触发,包含:Enter 键、联想关键词点击、清空按钮点击、搜索框后置内容点击(含后置图标)、搜索框前置内容点击(含前置图标)等 + * @default '' + */ + onSearch?: (context?: { + value: string; + trigger: 'enter' | 'option-click' | 'clear' | 'suffix-click' | 'prefix-click'; + e?: FormEvent | MouseEvent; + }) => void; +} + +export type AutocompleteOption = string | { label: string | TNode; group?: boolean }; diff --git a/packages/products/tdesign-react/src/select-input/select-input.md b/packages/products/tdesign-react/src/select-input/select-input.md index 0957c625f..c2eb4e35f 100644 --- a/packages/products/tdesign-react/src/select-input/select-input.md +++ b/packages/products/tdesign-react/src/select-input/select-input.md @@ -25,7 +25,7 @@ minCollapsedNum | Number | 0 | 最小折叠数量,用于标签数量过多的 multiple | Boolean | false | 是否为多选模式,默认为单选 | N panel | TNode | - | 下拉框内容,可完全自定义。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N placeholder | String | - | 占位符 | N -popupProps | Object | - | 透传 Popup 浮层组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select-input/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select-input/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框 | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N prefixIcon | TElement | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-react/src/select-input/type.ts b/packages/products/tdesign-react/src/select-input/type.ts index 97fbd09e2..e45c94149 100644 --- a/packages/products/tdesign-react/src/select-input/type.ts +++ b/packages/products/tdesign-react/src/select-input/type.ts @@ -96,7 +96,7 @@ export interface TdSelectInputProps { */ placeholder?: string; /** - * 透传 Popup 浮层组件全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-react/src/select/select.md b/packages/products/tdesign-react/src/select/select.md index eeb201955..87f1717ee 100644 --- a/packages/products/tdesign-react/src/select/select.md +++ b/packages/products/tdesign-react/src/select/select.md @@ -33,7 +33,7 @@ optionsLayout | String | vertical | 下拉选项布局方式,有纵向排列 panelBottomContent | TNode | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N panelTopContent | TNode | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 透传给 popup 组件的全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框 | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N prefixIcon | TElement | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-react/src/select/type.ts b/packages/products/tdesign-react/src/select/type.ts index 509e96621..92da155bf 100644 --- a/packages/products/tdesign-react/src/select/type.ts +++ b/packages/products/tdesign-react/src/select/type.ts @@ -131,7 +131,7 @@ export interface TdSelectProps { */ placeholder?: string; /** - * 透传给 popup 组件的全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-react/src/sticky-tool/sticky-tool.en-US.md b/packages/products/tdesign-react/src/sticky-tool/sticky-tool.en-US.md index b5e467077..c175d024f 100644 --- a/packages/products/tdesign-react/src/sticky-tool/sticky-tool.en-US.md +++ b/packages/products/tdesign-react/src/sticky-tool/sticky-tool.en-US.md @@ -1,30 +1,32 @@ :: BASE_DOC :: ## API + ### StickyTool Props name | type | default | description | required -- | -- | -- | -- | -- -className | String | - | 类名 | N -style | Object | - | 样式,Typescript:`React.CSSProperties` | N +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N list | Array | [] | Typescript:`Array` | N offset | Array | - | Typescript:`Array` | N -placement | String | right-bottom | options:right-top/right-center/right-bottom/left-top/left-center/left-bottom | N +placement | String | right-bottom | options: right-top/right-center/right-bottom/left-top/left-center/left-bottom | N popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/sticky-tool/type.ts) | N -shape | String | square | stickytool shape。options:square/round | N -type | String | normal | stickytool type。options:normal/compact | N +shape | String | square | stickytool shape。options: square/round | N +type | String | normal | stickytool type。options: normal/compact | N width | String / Number | - | \- | N onClick | Function | | Typescript:`(context: { e: MouseEvent; item: TdStickyItemProps }) => void`
| N onHover | Function | | Typescript:`(context: { e: MouseEvent; item: TdStickyItemProps }) => void`
| N + ### StickyItem Props name | type | default | description | required -- | -- | -- | -- | -- -className | String | - | 类名 | N -style | Object | - | 样式,Typescript:`React.CSSProperties` | N +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N icon | TElement | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N label | TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N popup | TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/sticky-tool/type.ts) | N -trigger | String | hover | options:hover/click | N +trigger | String | hover | options: hover/click | N diff --git a/packages/products/tdesign-react/src/sticky-tool/sticky-tool.md b/packages/products/tdesign-react/src/sticky-tool/sticky-tool.md index bd4833540..2ebaff806 100644 --- a/packages/products/tdesign-react/src/sticky-tool/sticky-tool.md +++ b/packages/products/tdesign-react/src/sticky-tool/sticky-tool.md @@ -1,30 +1,32 @@ :: BASE_DOC :: ## API + ### StickyTool Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N list | Array | [] | 列表。TS 类型:`Array` | N offset | Array | - | 相对于 placement 的偏移量,示例:[-10, 20] 或 ['10em', '8rem']。TS 类型:`Array` | N placement | String | right-bottom | 固定位置。可选项:right-top/right-center/right-bottom/left-top/left-center/left-bottom | N -popupProps | Object | - | 透传 Popup 组件全部特性,优先级低于 StickyItem.popupProps。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/sticky-tool/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性,优先级低于 StickyItem.popupProps。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/sticky-tool/type.ts) | N shape | String | square | 侧边栏菜单形状,有 2 种:方形、圆形。可选项:square/round | N type | String | normal | 侧边栏菜单类型,有 2 种:常规型和紧凑型。可选项:normal/compact | N width | String / Number | - | 宽度 | N onClick | Function | | TS 类型:`(context: { e: MouseEvent; item: TdStickyItemProps }) => void`
点击某一项时触发 | N onHover | Function | | TS 类型:`(context: { e: MouseEvent; item: TdStickyItemProps }) => void`
悬浮到某一项时触发 | N + ### StickyItem Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N icon | TElement | - | 图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N label | TNode | - | 名称。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N popup | TNode | - | 浮层内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -popupProps | Object | - | 透传浮层组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/sticky-tool/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/sticky-tool/type.ts) | N trigger | String | hover | 触发浮层显示的方式。可选项:hover/click | N diff --git a/packages/products/tdesign-react/src/sticky-tool/type.ts b/packages/products/tdesign-react/src/sticky-tool/type.ts index bb0a4b434..2cbc6c9a9 100644 --- a/packages/products/tdesign-react/src/sticky-tool/type.ts +++ b/packages/products/tdesign-react/src/sticky-tool/type.ts @@ -24,7 +24,7 @@ export interface TdStickyToolProps { */ placement?: 'right-top' | 'right-center' | 'right-bottom' | 'left-top' | 'left-center' | 'left-bottom'; /** - * 透传 Popup 组件全部特性,优先级低于 StickyItem.popupProps + * 透传 Popup 组件全部属性,优先级低于 StickyItem.popupProps */ popupProps?: PopupProps; /** @@ -65,7 +65,7 @@ export interface TdStickyItemProps { */ popup?: TNode; /** - * 透传浮层组件全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-react/src/time-picker/time-picker.md b/packages/products/tdesign-react/src/time-picker/time-picker.md index cc74fe133..c61cb15fd 100644 --- a/packages/products/tdesign-react/src/time-picker/time-picker.md +++ b/packages/products/tdesign-react/src/time-picker/time-picker.md @@ -18,7 +18,7 @@ hideDisabledTime | Boolean | true | 是否隐藏禁用状态的时间项 | N inputProps | Object | - | 透传给输入框(Input)组件的参数。TS 类型:`InputProps`,[Input API Documents](./input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/time-picker/type.ts) | N label | TNode | - | 左侧文本。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/time-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/time-picker/type.ts) | N presets | Object | - | 预设快捷时间选择,示例:`{ '前一小时': '11:00:00' }`。TS 类型:`PresetTime` `interface PresetTime { [presetName: string]: TimePickerValue \| (() => TimePickerValue) }`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/time-picker/type.ts) | N selectInputProps | Object | - | 透传 SelectInput 筛选器输入框组件的全部属性。TS 类型:`SelectInputProps`,[SelectInput API Documents](./select-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/time-picker/type.ts) | N size | String | medium | 尺寸。可选项:small/medium/large | N @@ -53,7 +53,7 @@ format | String | HH:mm:ss | 用于格式化时间,[详细文档](https://day. hideDisabledTime | Boolean | true | 是否隐藏禁用状态的时间项 | N label | TNode | - | 左侧文本。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N placeholder | String / Array | undefined | 占位符,值为数组表示可分别为开始日期和结束日期设置占位符。TS 类型:`string \| Array` | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/time-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/time-picker/type.ts) | N presets | Object | - | 预设快捷时间范围选择,示例:{ '下午': ['13:00:00', '18:00:00'] }。TS 类型:`PresetTimeRange` `interface PresetTimeRange { [presetRageName: string]: TimeRangeValue \| (() => TimeRangeValue)}`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/time-picker/type.ts) | N rangeInputProps | Object | - | 透传给范围输入框 RangeInput 组件的参数。TS 类型:`RangeInputProps`,[RangeInput API Documents](./range-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/time-picker/type.ts) | N size | String | medium | 尺寸。可选项:small/medium/large | N diff --git a/packages/products/tdesign-react/src/time-picker/type.ts b/packages/products/tdesign-react/src/time-picker/type.ts index 966daf573..f3c96bb18 100644 --- a/packages/products/tdesign-react/src/time-picker/type.ts +++ b/packages/products/tdesign-react/src/time-picker/type.ts @@ -64,7 +64,7 @@ export interface TdTimePickerProps { */ placeholder?: string; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** @@ -192,7 +192,7 @@ export interface TdTimeRangePickerProps { */ placeholder?: string | Array; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-react/src/tree-select/tree-select.md b/packages/products/tdesign-react/src/tree-select/tree-select.md index 687184079..f5cc9c071 100644 --- a/packages/products/tdesign-react/src/tree-select/tree-select.md +++ b/packages/products/tdesign-react/src/tree-select/tree-select.md @@ -31,7 +31,7 @@ multiple | Boolean | false | 是否允许多选 | N panelBottomContent | TNode | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N panelTopContent | TNode | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 透传给 popup 组件的全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/tree-select/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/tree-select/type.ts) | N popupVisible | Boolean | undefined | 是否显示下拉框 | N defaultPopupVisible | Boolean | undefined | 是否显示下拉框。非受控属性 | N prefixIcon | TElement | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-react/src/tree-select/type.ts b/packages/products/tdesign-react/src/tree-select/type.ts index fa3e22965..b135a460f 100644 --- a/packages/products/tdesign-react/src/tree-select/type.ts +++ b/packages/products/tdesign-react/src/tree-select/type.ts @@ -125,7 +125,7 @@ export interface TdTreeSelectProps< */ placeholder?: string; /** - * 透传给 popup 组件的全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-react/src/upload/type.ts b/packages/products/tdesign-react/src/upload/type.ts index dfc047f07..380c01468 100644 --- a/packages/products/tdesign-react/src/upload/type.ts +++ b/packages/products/tdesign-react/src/upload/type.ts @@ -59,7 +59,7 @@ export interface TdUploadProps { */ data?: Record | ((files: UploadFile[]) => Record); /** - * 是否禁用 + * 是否禁用组件 */ disabled?: boolean; /** @@ -100,6 +100,10 @@ export interface TdUploadProps { * 设置上传的请求头部,`action` 存在时有效 */ headers?: { [key: string]: string }; + /** + * 用于在上传图片场景下,透传属性配置至 Image 组件 + */ + imageProps?: object; /** * 透传图片预览组件全部属性 */ @@ -208,7 +212,7 @@ export interface TdUploadProps { */ uploadPastedFiles?: boolean; /** - * 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传。 + * 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传 * @default true */ useMockProgress?: boolean; diff --git a/packages/products/tdesign-react/src/upload/upload.en-US.md b/packages/products/tdesign-react/src/upload/upload.en-US.md index ab96b7983..96143638e 100644 --- a/packages/products/tdesign-react/src/upload/upload.en-US.md +++ b/packages/products/tdesign-react/src/upload/upload.en-US.md @@ -28,6 +28,7 @@ format | Function | - | to redefine `UploadFile` data structure。Typescript: formatRequest | Function | - | redefine request data。Typescript:`(requestData: { [key: string]: any }) => { [key: string]: any }` | N formatResponse | Function | - | redefine response data structure。Typescript:`(response: any, context: FormatResponseContext) => ResponseType ` `type ResponseType = { error?: string; url?: string; status?: 'fail' \| 'success'; files?: UploadFile[] } & Record` `interface FormatResponseContext { file: UploadFile; currentFiles?: UploadFile[] }`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/upload/type.ts) | N headers | Object | - | HTTP Request Header。Typescript:`{[key: string]: string}` | N +imageProps | Object | - | \- | N imageViewerProps | Object | - | ImageViewer Component Props。Typescript:`ImageViewerProps`,[ImageViewer API Documents](./image-viewer?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/upload/type.ts) | N inputAttributes | Object | - | add attributes to HTML element `input`。Typescript:`CSSProperties` | N isBatchUpload | Boolean | false | make all files to be a whole package, files can only be replaced or deleted together, can not add more files | N diff --git a/packages/products/tdesign-react/src/upload/upload.md b/packages/products/tdesign-react/src/upload/upload.md index fcefb1658..666da2ef0 100644 --- a/packages/products/tdesign-react/src/upload/upload.md +++ b/packages/products/tdesign-react/src/upload/upload.md @@ -18,7 +18,7 @@ beforeUpload | Function | - | 如果是自动上传模式 `autoUpload=true`, cancelUploadButton | TNode | - | 批量文件/图片上传,`autoUpload=false` 场景下,透传“取消上传”按钮属性。TS 类型:`null \| ButtonProps \| TNode<{ disabled: boolean; cancelUploadText: string; cancelUpload: (ctx: { e: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N children | TNode | - | 非拖拽场景,指触发上传的元素,如:“选择文件”。如果是拖拽场景,则是指拖拽区域。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N data | Object | - | 上传请求所需的额外字段,默认字段有 `file`,表示文件信息。可以添加额外的文件名字段,如:`{file_name: "custom-file-name.txt"}`。`autoUpload=true` 时有效。也可以使用 `formatRequest` 完全自定义上传请求的字段。TS 类型:`Record \| ((files: UploadFile[]) => Record)` | N -disabled | Boolean | undefined | 是否禁用 | N +disabled | Boolean | undefined | 是否禁用组件 | N dragContent | TNode | - | 用于自定义拖拽区域,`theme=custom` 且 `draggable=true` 时有效。TS 类型:`TNode \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N draggable | Boolean | undefined | 是否启用拖拽上传,不同的组件风格默认值不同。`theme=file` 或 `theme=image` 时有效 | N fileListDisplay | TElement | - | 用于完全自定义文件列表界面内容(UI),单文件和多文件均有效。TS 类型:`TNode<{ files: UploadFile[]; dragEvents?: UploadDisplayDragEvents }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N @@ -28,6 +28,7 @@ format | Function | - | 转换文件 `UploadFile` 的数据结构,可新增或 formatRequest | Function | - | 用于新增或修改文件上传请求 参数。`action` 存在时有效。一个请求上传一个文件时,默认请求字段有 `file`。
一个请求上传多个文件时,默认字段有 `file[0]/file[1]/file[2]/.../length`,其中 `length` 表示本次上传的文件数量。
⚠️非常注意,此处的 `file[0]/file[1]` 仅仅是一个字段名,并非表示 `file` 是一个数组,接口获取字段时注意区分。
可以使用 `name` 定义 `file` 字段的别名。
也可以使用 `formatRequest` 自定义任意字段,如添加一个字段 `fileList` ,存储文件数组。TS 类型:`(requestData: { [key: string]: any }) => { [key: string]: any }` | N formatResponse | Function | - | 用于格式化文件上传后的接口响应数据,`response` 便是接口响应的原始数据。`action` 存在时有效。
示例返回值:`{ error, url, status, files }`
此函数的返回值 `error` 会作为错误文本提醒,表示上传失败的原因,如果存在会判定为本次上传失败。
此函数的返回值 `url` 会作为单个文件上传成功后的链接。
`files` 表示一个请求同时上传多个文件后的文件列表。TS 类型:`(response: any, context: FormatResponseContext) => ResponseType ` `type ResponseType = { error?: string; url?: string; status?: 'fail' \| 'success'; files?: UploadFile[] } & Record` `interface FormatResponseContext { file: UploadFile; currentFiles?: UploadFile[] }`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/upload/type.ts) | N headers | Object | - | 设置上传的请求头部,`action` 存在时有效。TS 类型:`{[key: string]: string}` | N +imageProps | Object | - | 用于在上传图片场景下,透传属性配置至 Image 组件 | N imageViewerProps | Object | - | 透传图片预览组件全部属性。TS 类型:`ImageViewerProps`,[ImageViewer API Documents](./image-viewer?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/upload/type.ts) | N inputAttributes | Object | - | 用于添加属性到 HTML 元素 `input`。TS 类型:`CSSProperties` | N isBatchUpload | Boolean | false | 多个文件是否作为一个独立文件包,整体替换,整体删除。不允许追加文件,只允许替换文件。`theme=file-flow` 时有效 | N @@ -51,7 +52,7 @@ triggerButtonProps | Object | - | 透传选择按钮全部属性。TS 类型:` uploadAllFilesInOneRequest | Boolean | false | 是否在同一个请求中上传全部文件,默认一个请求上传一个文件。多文件上传时有效 | N uploadButton | TNode | - | 批量文件/图片上传,`autoUpload=false` 场景下,透传“点击上传”按钮属性。TS 类型:`null \| ButtonProps \| TNode<{ disabled: boolean; uploading: boolean; uploadFiles: () => void; uploadText: string }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N uploadPastedFiles | Boolean | true | 是否允许粘贴上传剪贴板中的文件 | N -useMockProgress | Boolean | true | 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传。 | N +useMockProgress | Boolean | true | 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传 | N withCredentials | Boolean | false | 上传请求时是否携带 cookie | N onCancelUpload | Function | | TS 类型:`() => void`
点击「取消上传」时触发 | N onChange | Function | | TS 类型:`(value: Array, context: UploadChangeContext) => void`
已上传文件列表发生变化时触发,`trigger` 表示触发本次的来源。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/upload/type.ts)。
`interface UploadChangeContext { e?: MouseEvent \| ProgressEvent; response?: any; trigger: UploadChangeTrigger; index?: number; file?: UploadFile; files?: UploadFile[] }`

`type UploadChangeTrigger = 'add' \| 'remove' \| 'abort' \| 'progress-success' \| 'progress' \| 'progress-fail'`
| N diff --git a/packages/products/tdesign-vue-next/src/auto-complete/auto-complete.md b/packages/products/tdesign-vue-next/src/auto-complete/auto-complete.md index 9c7787e2e..e426315ef 100644 --- a/packages/products/tdesign-vue-next/src/auto-complete/auto-complete.md +++ b/packages/products/tdesign-vue-next/src/auto-complete/auto-complete.md @@ -19,7 +19,7 @@ options | Array | - | 下拉联想词列表。示例一:`['联想词一', '联 panelBottomContent | String / Slot / Function | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N placeholder | String | undefined | 输入框为空时的占位提示。组件本身默认值为 `undefined`,但全局配置存在默认值,不同语言全局默认值不同 | N -popupProps | Object | - | 透传 Popup 组件全部特性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/auto-complete/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/auto-complete/type.ts) | N readonly | Boolean | undefined | 是否只读 | N size | String | medium | 组件尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N status | String | default | 输入框状态。可选项:default/success/warning/error | N diff --git a/packages/products/tdesign-vue-next/src/auto-complete/props.ts b/packages/products/tdesign-vue-next/src/auto-complete/props.ts index 060463d93..fec2ab615 100644 --- a/packages/products/tdesign-vue-next/src/auto-complete/props.ts +++ b/packages/products/tdesign-vue-next/src/auto-complete/props.ts @@ -58,7 +58,7 @@ export default { type: String, default: undefined, }, - /** 透传 Popup 组件全部特性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/auto-complete/type.ts b/packages/products/tdesign-vue-next/src/auto-complete/type.ts index 84030da98..e37255d6c 100644 --- a/packages/products/tdesign-vue-next/src/auto-complete/type.ts +++ b/packages/products/tdesign-vue-next/src/auto-complete/type.ts @@ -66,7 +66,7 @@ export interface TdAutoCompleteProps` panelBottomContent | String / Slot / Function | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 参考 popup 组件 API。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/cascader/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/cascader/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框 | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N prefixIcon | Slot / Function | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue-next/src/cascader/props.ts b/packages/products/tdesign-vue-next/src/cascader/props.ts index 309fc9f1e..5801c532a 100644 --- a/packages/products/tdesign-vue-next/src/cascader/props.ts +++ b/packages/products/tdesign-vue-next/src/cascader/props.ts @@ -100,7 +100,7 @@ export default { type: String, default: undefined, }, - /** 参考 popup 组件 API */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/cascader/type.ts b/packages/products/tdesign-vue-next/src/cascader/type.ts index 340bac66b..8d57a37af 100644 --- a/packages/products/tdesign-vue-next/src/cascader/type.ts +++ b/packages/products/tdesign-vue-next/src/cascader/type.ts @@ -131,7 +131,7 @@ export interface TdCascaderProps` | N -disabled | Boolean | - | \- | N +disabled | Boolean | undefined | \- | N enableAlpha | Boolean | false | \- | N enableMultipleGradient | Boolean | true | \- | N format | String | RGB | options: RGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS | N diff --git a/packages/products/tdesign-vue-next/src/color-picker/color-picker.md b/packages/products/tdesign-vue-next/src/color-picker/color-picker.md index b6c77644f..9a0d51e21 100644 --- a/packages/products/tdesign-vue-next/src/color-picker/color-picker.md +++ b/packages/products/tdesign-vue-next/src/color-picker/color-picker.md @@ -10,7 +10,7 @@ borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否可清空 | N closeBtn | String / Boolean / Slot / Function | true | 关闭按钮,值为 `true` 显示默认关闭按钮;值为 `false` 或 `undefined` 则不显示关闭按钮;值类型为函数,则表示自定义关闭按钮。TS 类型:`string \| boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N colorModes | Array | ["monochrome", "linear-gradient"] | 颜色模式选择。同时支持单色和渐变两种模式,可仅使用单色或者渐变其中一种模式,也可以同时使用。`monochrome` 表示单色,`linear-gradient` 表示渐变色。TS 类型:`Array<'monochrome' \| 'linear-gradient'>` | N -disabled | Boolean | - | 是否禁用组件 | N +disabled | Boolean | undefined | 是否禁用组件 | N enableAlpha | Boolean | false | 是否开启透明通道 | N enableMultipleGradient | Boolean | true | 是否允许开启通过点击渐变轴增加渐变梯度,默认开启,关闭时只会存在起始和结束两个颜色 | N format | String | RGB | 格式化色值。`enableAlpha` 为真时,`RGBA/HSLA/HSVA` 等值有效。可选项:RGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS | N diff --git a/packages/products/tdesign-vue-next/src/color-picker/props.ts b/packages/products/tdesign-vue-next/src/color-picker/props.ts index 75d71b1c7..3fd436477 100644 --- a/packages/products/tdesign-vue-next/src/color-picker/props.ts +++ b/packages/products/tdesign-vue-next/src/color-picker/props.ts @@ -23,7 +23,10 @@ export default { default: (): TdColorPickerProps['colorModes'] => ["monochrome", "linear-gradient"], }, /** 是否禁用组件 */ - disabled: Boolean, + disabled: { + type: Boolean, + default: undefined, + }, /** 是否开启透明通道 */ enableAlpha: Boolean, /** 是否允许开启通过点击渐变轴增加渐变梯度,默认开启,关闭时只会存在起始和结束两个颜色 */ diff --git a/packages/products/tdesign-vue-next/src/date-picker/date-picker.md b/packages/products/tdesign-vue-next/src/date-picker/date-picker.md index 492d5113c..84f6cb53f 100644 --- a/packages/products/tdesign-vue-next/src/date-picker/date-picker.md +++ b/packages/products/tdesign-vue-next/src/date-picker/date-picker.md @@ -22,7 +22,7 @@ mode | String | date | 选择器模式。可选项:year/quarter/month/week/dat multiple | Boolean | false | 支持多选日期,但不支持在range-picker中,或与enableTimePicker、allowInput 一起使用。TS 类型:`boolean` | N needConfirm | Boolean | true | 决定在日期时间选择器的场景下是否需要点击确认按钮才完成选择动作,默认为`true` | N placeholder | String / Array | undefined | 占位符。TS 类型:`string` | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/date-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/date-picker/type.ts) | N prefixIcon | Slot / Function | - | 用于自定义组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N presets | Object | - | 预设快捷日期选择,示例:`{ '元旦': '2021-01-01', '昨天': dayjs().subtract(1, 'day').format('YYYY-MM-DD'), '特定日期': () => ['2021-02-01'] }`。TS 类型:`PresetDate` `interface PresetDate { [name: string]: DateValue \| (() => DateValue) }`。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/date-picker/type.ts) | N presetsPlacement | String | bottom | 预设面板展示区域(包含确定按钮)。可选项:left/top/right/bottom | N @@ -75,7 +75,7 @@ mode | String | date | 选择器模式。可选项:year/quarter/month/week/dat needConfirm | Boolean | true | 决定在日期时间区间选择器的场景下是否需要点击确认按钮才完成选择动作,默认为 `true` | N panelPreselection | Boolean | true | 在开始日期选中之前,面板是否显示预选状态,即是否高亮预选日期 | N placeholder | String / Array | - | 占位符,值为数组表示可分别为开始日期和结束日期设置占位符。TS 类型:`string \| Array` | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/date-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/date-picker/type.ts) | N prefixIcon | Slot / Function | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N presets | Object | - | 预设快捷日期选择,示例:{ '特定日期范围': ['2021-01-01', '2022-01-01'], '本月': [dayjs().startOf('month'), dayjs().endOf('month')] }。TS 类型:`PresetRange` `interface PresetRange { [range: string]: DateRange \| (() => DateRange)}` `type DateRange = [DateValue, DateValue]`。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/date-picker/type.ts) | N presetsPlacement | String | bottom | 预设面板展示区域(包含确定按钮)。可选项:left/top/right/bottom | N diff --git a/packages/products/tdesign-vue-next/src/date-picker/date-range-picker-props.ts b/packages/products/tdesign-vue-next/src/date-picker/date-range-picker-props.ts index 01597f41c..2f845306c 100644 --- a/packages/products/tdesign-vue-next/src/date-picker/date-range-picker-props.ts +++ b/packages/products/tdesign-vue-next/src/date-picker/date-range-picker-props.ts @@ -76,7 +76,7 @@ export default { placeholder: { type: [String, Array] as PropType, }, - /** 透传给 popup 组件的参数 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/date-picker/props.ts b/packages/products/tdesign-vue-next/src/date-picker/props.ts index 0bfaafd13..18336d5aa 100644 --- a/packages/products/tdesign-vue-next/src/date-picker/props.ts +++ b/packages/products/tdesign-vue-next/src/date-picker/props.ts @@ -76,7 +76,7 @@ export default { type: [String, Array] as PropType, default: undefined as TdDatePickerProps['placeholder'], }, - /** 透传给 popup 组件的参数 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/date-picker/type.ts b/packages/products/tdesign-vue-next/src/date-picker/type.ts index 3a647f7e3..bbde4f006 100644 --- a/packages/products/tdesign-vue-next/src/date-picker/type.ts +++ b/packages/products/tdesign-vue-next/src/date-picker/type.ts @@ -88,7 +88,7 @@ export interface TdDatePickerProps { */ placeholder?: string; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** @@ -262,7 +262,7 @@ export interface TdDateRangePickerProps { */ placeholder?: string | Array; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue-next/src/dropdown/dropdown.en-US.md b/packages/products/tdesign-vue-next/src/dropdown/dropdown.en-US.md index e890b83d9..fa733be5e 100644 --- a/packages/products/tdesign-vue-next/src/dropdown/dropdown.en-US.md +++ b/packages/products/tdesign-vue-next/src/dropdown/dropdown.en-US.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Dropdown Props name | type | default | description | required @@ -11,7 +12,7 @@ hideAfterItemClick | Boolean | true | \- | N maxColumnWidth | String / Number | 100 | \- | N maxHeight | Number | 300 | \- | N minColumnWidth | String / Number | 10 | \- | N -options | Array | [] | Typescript:`Array` `type DropdownOption = { children?: Array } & TdDropdownItemProps & Record`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/dropdown/type.ts) | N +options | Array | [] | Typescript:`Array` `type DropdownOption = { children?: DropdownOption[] } & TdDropdownItemProps & Record`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/dropdown/type.ts) | N panelBottomContent | String / Slot / Function | - | bottom content of the dropdown panel。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | top content of the dropdown panel。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N placement | String | bottom-left | options: top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N @@ -25,6 +26,7 @@ name | params | description -- | -- | -- click | `(dropdownItem: DropdownOption, context: { e: MouseEvent })` | \- + ### DropdownItem Props name | type | default | description | required diff --git a/packages/products/tdesign-vue-next/src/dropdown/dropdown.md b/packages/products/tdesign-vue-next/src/dropdown/dropdown.md index 69eee0d1f..faaeb13bf 100644 --- a/packages/products/tdesign-vue-next/src/dropdown/dropdown.md +++ b/packages/products/tdesign-vue-next/src/dropdown/dropdown.md @@ -1,9 +1,10 @@ :: BASE_DOC :: ## API + ### Dropdown Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- direction | String | right | 多层级操作时,子层级展开方向。可选项:left/right | N disabled | Boolean | false | 是否禁用组件 | N @@ -11,11 +12,11 @@ hideAfterItemClick | Boolean | true | 点击选项后是否自动隐藏弹窗 | maxColumnWidth | String / Number | 100 | 选项最大宽度,内容超出时,显示为省略号。值为字符串时,值就是最大宽度;值为数字时,单位:px | N maxHeight | Number | 300 | 弹窗最大高度,单位:px 。统一控制每一列的高度 | N minColumnWidth | String / Number | 10 | 选项最小宽度。值为字符串时,值就是最小宽度;值为数字时,单位:px | N -options | Array | [] | 下拉操作项。TS 类型:`Array` `type DropdownOption = { children?: Array } & TdDropdownItemProps & Record`。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/dropdown/type.ts) | N +options | Array | [] | 下拉操作项。TS 类型:`Array` `type DropdownOption = { children?: DropdownOption[] } & TdDropdownItemProps & Record`。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/dropdown/type.ts) | N panelBottomContent | String / Slot / Function | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N placement | String | bottom-left | 弹窗定位方式,可选值同 Popup 组件。可选项:top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N -popupProps | Object | - | 透传 Popup 组件属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/dropdown/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/dropdown/type.ts) | N trigger | String | hover | 触发下拉显示的方式。可选项:hover/click/focus/context-menu | N onClick | Function | | TS 类型:`(dropdownItem: DropdownOption, context: { e: MouseEvent }) => void`
下拉操作项点击时触发 | N @@ -25,9 +26,10 @@ onClick | Function | | TS 类型:`(dropdownItem: DropdownOption, context: { e -- | -- | -- click | `(dropdownItem: DropdownOption, context: { e: MouseEvent })` | 下拉操作项点击时触发 + ### DropdownItem Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- active | Boolean | false | 是否高亮当前操作项 | N content | String / Slot / Function | '' | 下拉操作项内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue-next/src/dropdown/props.ts b/packages/products/tdesign-vue-next/src/dropdown/props.ts index 208f6b1b9..aede85ed2 100644 --- a/packages/products/tdesign-vue-next/src/dropdown/props.ts +++ b/packages/products/tdesign-vue-next/src/dropdown/props.ts @@ -27,7 +27,7 @@ export default { /** 选项最大宽度,内容超出时,显示为省略号。值为字符串时,值就是最大宽度;值为数字时,单位:px */ maxColumnWidth: { type: [String, Number] as PropType, - default: 100, + default: 100 as TdDropdownProps['maxColumnWidth'], }, /** 弹窗最大高度,单位:px 。统一控制每一列的高度 */ maxHeight: { @@ -37,13 +37,21 @@ export default { /** 选项最小宽度。值为字符串时,值就是最小宽度;值为数字时,单位:px */ minColumnWidth: { type: [String, Number] as PropType, - default: 10, + default: 10 as TdDropdownProps['minColumnWidth'], }, /** 下拉操作项 */ options: { type: Array as PropType, default: (): TdDropdownProps['options'] => [], }, + /** 面板内的底部内容 */ + panelBottomContent: { + type: [String, Function] as PropType, + }, + /** 面板内的顶部内容 */ + panelTopContent: { + type: [String, Function] as PropType, + }, /** 弹窗定位方式,可选值同 Popup 组件 */ placement: { type: String as PropType, @@ -53,7 +61,7 @@ export default { return ['top', 'left', 'right', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right', 'left-top', 'left-bottom', 'right-top', 'right-bottom'].includes(val); }, }, - /** 透传 Popup 组件属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式 */ + /** 透传 Popup 组件全部属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/dropdown/type.ts b/packages/products/tdesign-vue-next/src/dropdown/type.ts index 489d3e66d..d2fbd5cfd 100644 --- a/packages/products/tdesign-vue-next/src/dropdown/type.ts +++ b/packages/products/tdesign-vue-next/src/dropdown/type.ts @@ -43,6 +43,14 @@ export interface TdDropdownProps { * @default [] */ options?: Array; + /** + * 面板内的底部内容 + */ + panelBottomContent?: string | TNode; + /** + * 面板内的顶部内容 + */ + panelTopContent?: string | TNode; /** * 弹窗定位方式,可选值同 Popup 组件 * @default bottom-left @@ -61,7 +69,7 @@ export interface TdDropdownProps { | 'right-top' | 'right-bottom'; /** - * 透传 Popup 组件属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式 + * 透传 Popup 组件全部属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式 */ popupProps?: PopupProps; /** @@ -115,6 +123,6 @@ export interface TdDropdownItemProps { onClick?: (dropdownItem: DropdownOption, context: { e: MouseEvent }) => void; } -export type DropdownOption = { children?: Array } & TdDropdownItemProps & Record; +export type DropdownOption = { children?: DropdownOption[] } & TdDropdownItemProps & Record; export type DropdownItemTheme = 'default' | 'success' | 'warning' | 'error'; diff --git a/packages/products/tdesign-vue-next/src/guide/guide.md b/packages/products/tdesign-vue-next/src/guide/guide.md index 90c677ee9..f6338534f 100644 --- a/packages/products/tdesign-vue-next/src/guide/guide.md +++ b/packages/products/tdesign-vue-next/src/guide/guide.md @@ -9,7 +9,7 @@ counter | Slot / Function | - | 用于自定义渲染计数部分。TS 类型:`TNode<{ current: number; total: number }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N current | Number | - | 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景。支持语法糖 `v-model` 或 `v-model:current` | N defaultCurrent | Number | - | 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景。非受控属性 | N -finishButtonProps | Object | - | 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }`。TS 类型:`ButtonProps` | N +finishButtonProps | Object | - | 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }`。TS 类型:`ButtonProps` | N hideCounter | Boolean | false | 是否隐藏计数 | N hidePrev | Boolean | false | 是否隐藏上一步按钮 | N hideSkip | Boolean | false | 是否隐藏跳过按钮 | N @@ -50,7 +50,7 @@ mode | String | - | 引导框的类型。可选项:popup/dialog | N nextButtonProps | Object | - | 用于自定义当前引导框的下一步按钮的内容。TS 类型:`ButtonProps` | N offset | Array | - | 【讨论确认中】相对于 placement 的偏移量,示例:[-10, 20] 或 ['10px', '8px']。TS 类型:`Array` | N placement | String | 'top' | 引导框相对于高亮元素出现的位置。TS 类型:`StepPopupPlacement \| StepDialogPlacement` `type StepPopupPlacement = 'top'\|'left'\|'right'\|'bottom'\|'top-left'\|'top-right'\|'bottom-left'\|'bottom-right'\|'left-top'\|'left-bottom'\|'right-top'\|'right-bottom'` `type StepDialogPlacement = 'top'\|'center' `。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/guide/type.ts) | N -popupProps | Object | - | 透传全部属性到 Popup 组件。`mode=popup` 时有效。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/guide/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。`mode=popup` 时有效。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/guide/type.ts) | N prevButtonProps | Object | - | 用于自定义当前引导框的上一步按钮的内容。TS 类型:`ButtonProps` | N showOverlay | Boolean | true | 是否出现遮罩层 | N skipButtonProps | Object | - | 用于自定义当前步骤引导框的跳过按钮的内容。TS 类型:`ButtonProps` | N diff --git a/packages/products/tdesign-vue-next/src/guide/props.ts b/packages/products/tdesign-vue-next/src/guide/props.ts index 261f76e11..11639fe5d 100644 --- a/packages/products/tdesign-vue-next/src/guide/props.ts +++ b/packages/products/tdesign-vue-next/src/guide/props.ts @@ -25,7 +25,7 @@ export default { defaultCurrent: { type: Number, }, - /** 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }` */ + /** 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }` */ finishButtonProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/guide/type.ts b/packages/products/tdesign-vue-next/src/guide/type.ts index 908836669..eda5d2158 100644 --- a/packages/products/tdesign-vue-next/src/guide/type.ts +++ b/packages/products/tdesign-vue-next/src/guide/type.ts @@ -26,7 +26,7 @@ export interface TdGuideProps { */ modelValue?: number; /** - * 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }` + * 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }` */ finishButtonProps?: ButtonProps; /** @@ -141,7 +141,7 @@ export interface GuideStep { */ placement?: StepPopupPlacement | StepDialogPlacement; /** - * 透传全部属性到 Popup 组件。`mode=popup` 时有效 + * 透传 Popup 组件全部属性。`mode=popup` 时有效 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue-next/src/menu/menu.md b/packages/products/tdesign-vue-next/src/menu/menu.md index dc4261311..cd6fe1b0a 100644 --- a/packages/products/tdesign-vue-next/src/menu/menu.md +++ b/packages/products/tdesign-vue-next/src/menu/menu.md @@ -58,7 +58,7 @@ content | String / Slot / Function | - | 菜单项内容。TS 类型:`string \ default | String / Slot / Function | - | 菜单项内容,同 content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用菜单项展开/收起/跳转等功能 | N icon | Slot / Function | - | 菜单项图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N -popupProps | Object | - | 透传 Popup 组件全部特性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/menu/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/menu/type.ts) | N title | String / Slot / Function | - | 二级菜单内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N value | String / Number | - | 菜单项唯一标识。TS 类型:`MenuValue` | N diff --git a/packages/products/tdesign-vue-next/src/menu/submenu-props.ts b/packages/products/tdesign-vue-next/src/menu/submenu-props.ts index 563a68321..4fc46a57a 100644 --- a/packages/products/tdesign-vue-next/src/menu/submenu-props.ts +++ b/packages/products/tdesign-vue-next/src/menu/submenu-props.ts @@ -22,7 +22,7 @@ export default { icon: { type: Function as PropType, }, - /** 透传 Popup 组件全部特性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/menu/type.ts b/packages/products/tdesign-vue-next/src/menu/type.ts index e53eeed15..fd45b82d1 100644 --- a/packages/products/tdesign-vue-next/src/menu/type.ts +++ b/packages/products/tdesign-vue-next/src/menu/type.ts @@ -143,7 +143,7 @@ export interface TdSubmenuProps { */ icon?: TNode; /** - * 透传 Popup 组件全部特性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue-next/src/radio/radio-group-props.ts b/packages/products/tdesign-vue-next/src/radio/radio-group-props.ts index d297e60c1..936b62a07 100644 --- a/packages/products/tdesign-vue-next/src/radio/radio-group-props.ts +++ b/packages/products/tdesign-vue-next/src/radio/radio-group-props.ts @@ -38,7 +38,7 @@ export default { return ['small', 'medium', 'large'].includes(val); }, }, - /** 组件风格 */ + /** 用于在使用 options 方式渲染时决定组件的风格 */ theme: { type: String as PropType, default: 'radio' as TdRadioGroupProps['theme'], diff --git a/packages/products/tdesign-vue-next/src/radio/radio.en-US.md b/packages/products/tdesign-vue-next/src/radio/radio.en-US.md index 09163b718..8d75c607b 100644 --- a/packages/products/tdesign-vue-next/src/radio/radio.en-US.md +++ b/packages/products/tdesign-vue-next/src/radio/radio.en-US.md @@ -36,7 +36,7 @@ name | String | - | \- | N options | Array | - | Typescript:`Array` `type RadioOption = string \| number \| RadioOptionObj` `interface RadioOptionObj { label?: string \| TNode; value?: string \| number \| boolean; disabled?: boolean }`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/radio/type.ts) | N readonly | Boolean | undefined | \- | N size | String | medium | options: small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N -theme | String | radio | component Style。options: radio/button | N +theme | String | radio | Determine the style of radio when using options API。options: radio/button | N value | String / Number / Boolean | - | `v-model` and `v-model:value` is supported。Typescript:`T` `type RadioValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/radio/type.ts) | N defaultValue | String / Number / Boolean | - | uncontrolled property。Typescript:`T` `type RadioValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/radio/type.ts) | N variant | String | outline | options: outline/primary-filled/default-filled | N diff --git a/packages/products/tdesign-vue-next/src/radio/radio.md b/packages/products/tdesign-vue-next/src/radio/radio.md index 698743dac..e1c4ebb83 100644 --- a/packages/products/tdesign-vue-next/src/radio/radio.md +++ b/packages/products/tdesign-vue-next/src/radio/radio.md @@ -36,7 +36,7 @@ name | String | - | HTML 元素原生属性 | N options | Array | - | 单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同。TS 类型:`Array` `type RadioOption = string \| number \| RadioOptionObj` `interface RadioOptionObj { label?: string \| TNode; value?: string \| number \| boolean; disabled?: boolean }`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/radio/type.ts) | N readonly | Boolean | undefined | 只读状态 | N size | String | medium | 组件尺寸【讨论中】。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N -theme | String | radio | 组件风格。可选项:radio/button | N +theme | String | radio | 用于在使用 options 方式渲染时决定组件的风格。可选项:radio/button | N value | String / Number / Boolean | - | 选中的值。支持语法糖 `v-model` 或 `v-model:value`。TS 类型:`T` `type RadioValue = string \| number \| boolean`。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/radio/type.ts) | N defaultValue | String / Number / Boolean | - | 选中的值。非受控属性。TS 类型:`T` `type RadioValue = string \| number \| boolean`。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/radio/type.ts) | N variant | String | outline | 单选组件按钮形式。可选项:outline/primary-filled/default-filled | N diff --git a/packages/products/tdesign-vue-next/src/radio/type.ts b/packages/products/tdesign-vue-next/src/radio/type.ts index bac6a8165..9ae6332c3 100644 --- a/packages/products/tdesign-vue-next/src/radio/type.ts +++ b/packages/products/tdesign-vue-next/src/radio/type.ts @@ -91,7 +91,7 @@ export interface TdRadioGroupProps { */ size?: SizeEnum; /** - * 组件风格 + * 用于在使用 options 方式渲染时决定组件的风格 * @default radio */ theme?: 'radio' | 'button'; diff --git a/packages/products/tdesign-vue-next/src/range-input/range-input-popup-props.ts b/packages/products/tdesign-vue-next/src/range-input/range-input-popup-props.ts index f933dfffe..082929fb3 100644 --- a/packages/products/tdesign-vue-next/src/range-input/range-input-popup-props.ts +++ b/packages/products/tdesign-vue-next/src/range-input/range-input-popup-props.ts @@ -29,7 +29,7 @@ export default { panel: { type: [String, Function] as PropType, }, - /** 透传 Popup 浮层组件全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/range-input/range-input.md b/packages/products/tdesign-vue-next/src/range-input/range-input.md index 5a2153393..79aa5a699 100644 --- a/packages/products/tdesign-vue-next/src/range-input/range-input.md +++ b/packages/products/tdesign-vue-next/src/range-input/range-input.md @@ -66,7 +66,7 @@ inputValue | Array | - | 输入框的值。支持语法糖 `v-model:inputValue` defaultInputValue | Array | - | 输入框的值。非受控属性。TS 类型:`RangeInputValue` | N label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N panel | String / Slot / Function | - | 下拉框内容,可完全自定义。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N -popupProps | Object | - | 透传 Popup 浮层组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/range-input/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/range-input/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框 | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N rangeInputProps | Object | - | 透传 RangeInput 组件全部属性。TS 类型:`RangeInputProps`,[RangeInput API Documents](./range-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/range-input/type.ts) | N diff --git a/packages/products/tdesign-vue-next/src/range-input/type.ts b/packages/products/tdesign-vue-next/src/range-input/type.ts index aefa71d02..3c1336195 100644 --- a/packages/products/tdesign-vue-next/src/range-input/type.ts +++ b/packages/products/tdesign-vue-next/src/range-input/type.ts @@ -4,11 +4,159 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ +import { InputProps, InputValue, InputFormatType } from '../input'; import { PopupProps } from '../popup'; import { RangeInputProps } from '../range-input'; import { PopupVisibleChangeContext } from '../popup'; import { TNode } from '../common'; +export interface TdRangeInputProps { + /** + * 输入框高亮状态序号 + */ + activeIndex?: number; + /** + * 无边框模式 + * @default false + */ + borderless?: boolean; + /** + * 是否可清空 + * @default false + */ + clearable?: boolean; + /** + * 是否禁用范围输入框 + */ + disabled?: boolean; + /** + * 指定输入框展示值的格式 + */ + format?: InputFormatType | Array; + /** + * 透传 Input 输入框组件全部属性,数组第一项表示第一个输入框属性,第二项表示第二个输入框属性。示例:`[{ label: 'A', name: 'A-name' }, { label: 'B', name: 'B-name' }]` + */ + inputProps?: InputProps | Array; + /** + * 左侧内容 + */ + label?: string | TNode; + /** + * 占位符,示例:'请输入' 或者 ['开始日期', '结束日期'] + */ + placeholder?: string | Array; + /** + * 组件前置图标 + */ + prefixIcon?: TNode; + /** + * 只读状态 + */ + readonly?: boolean; + /** + * 范围分隔符 + * @default '-' + */ + separator?: string | TNode; + /** + * 输入框内容为空时,悬浮状态是否显示清空按钮,默认不显示 + * @default false + */ + showClearIconOnEmpty?: boolean; + /** + * 输入框尺寸 + * @default medium + */ + size?: 'small' | 'medium' | 'large'; + /** + * 输入框状态 + * @default default + */ + status?: 'default' | 'success' | 'warning' | 'error'; + /** + * 后置图标前的后置内容 + */ + suffix?: string | TNode; + /** + * 组件后置图标 + */ + suffixIcon?: TNode; + /** + * 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式 + */ + tips?: string | TNode; + /** + * 范围输入框的值 + * @default [] + */ + value?: RangeInputValue; + /** + * 范围输入框的值,非受控属性 + * @default [] + */ + defaultValue?: RangeInputValue; + /** + * 范围输入框的值 + * @default [] + */ + modelValue?: RangeInputValue; + /** + * 范围输入框失去焦点时触发 + */ + onBlur?: (value: RangeInputValue, context?: { e?: FocusEvent; position?: RangeInputPosition }) => void; + /** + * 范围输入框值发生变化时触发 + */ + onChange?: ( + value: RangeInputValue, + context?: { + e?: InputEvent | MouseEvent | CompositionEvent; + position?: RangeInputPosition; + trigger?: 'input' | 'initial' | 'clear'; + }, + ) => void; + /** + * 清空按钮点击时触发 + */ + onClear?: (context: { e: MouseEvent }) => void; + /** + * 范围输入框点击时触发 + */ + onClick?: (context?: { e?: MouseEvent; position?: RangeInputPosition }) => void; + /** + * 回车键按下时触发 + */ + onEnter?: (value: RangeInputValue, context?: { e?: InputEvent | MouseEvent; position?: RangeInputPosition }) => void; + /** + * 范围输入框获得焦点时触发 + */ + onFocus?: (value: RangeInputValue, context?: { e?: FocusEvent; position?: RangeInputPosition }) => void; + /** + * 进入输入框时触发 + */ + onMouseenter?: (context: { e: MouseEvent }) => void; + /** + * 离开输入框时触发 + */ + onMouseleave?: (context: { e: MouseEvent }) => void; +} + +/** 组件实例方法 */ +export interface RangeInputInstanceFunctions { + /** + * 使其中一个输入框失去焦点 + */ + blur?: (options?: { position?: RangeInputPosition }) => void; + /** + * 使其中一个输入框获得焦点 + */ + focus?: (options?: { position?: RangeInputPosition }) => void; + /** + * 使其中一个输入框选中内容 + */ + select?: (options?: { position?: RangeInputPosition }) => void; +} + export interface TdRangeInputPopupProps { /** * 宽度随内容自适应 @@ -36,7 +184,7 @@ export interface TdRangeInputPopupProps { */ panel?: string | TNode; /** - * 透传 Popup 浮层组件全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** @@ -70,6 +218,10 @@ export interface TdRangeInputPopupProps { onPopupVisibleChange?: (visible: boolean, context: PopupVisibleChangeContext) => void; } +export type RangeInputValue = Array; + +export type RangeInputPosition = 'first' | 'second' | 'all'; + export type RangeInputValueChangeContext = { e?: InputEvent | MouseEvent; trigger?: 'input' | 'clear'; diff --git a/packages/products/tdesign-vue-next/src/select-input/props.ts b/packages/products/tdesign-vue-next/src/select-input/props.ts index 3571fda58..85cab8a4b 100644 --- a/packages/products/tdesign-vue-next/src/select-input/props.ts +++ b/packages/products/tdesign-vue-next/src/select-input/props.ts @@ -66,7 +66,7 @@ export default { type: String, default: '', }, - /** 透传 Popup 浮层组件全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/select-input/select-input.md b/packages/products/tdesign-vue-next/src/select-input/select-input.md index 658ec646a..e7adb67b5 100644 --- a/packages/products/tdesign-vue-next/src/select-input/select-input.md +++ b/packages/products/tdesign-vue-next/src/select-input/select-input.md @@ -23,7 +23,7 @@ minCollapsedNum | Number | 0 | 最小折叠数量,用于标签数量过多的 multiple | Boolean | false | 是否为多选模式,默认为单选 | N panel | String / Slot / Function | - | 下拉框内容,可完全自定义。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N placeholder | String | - | 占位符 | N -popupProps | Object | - | 透传 Popup 浮层组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/select-input/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/select-input/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框。支持语法糖 `v-model:popupVisible` | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N prefixIcon | Slot / Function | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue-next/src/select-input/type.ts b/packages/products/tdesign-vue-next/src/select-input/type.ts index 758b12781..69f11713f 100644 --- a/packages/products/tdesign-vue-next/src/select-input/type.ts +++ b/packages/products/tdesign-vue-next/src/select-input/type.ts @@ -95,7 +95,7 @@ export interface TdSelectInputProps { */ placeholder?: string; /** - * 透传 Popup 浮层组件全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue-next/src/select/props.ts b/packages/products/tdesign-vue-next/src/select/props.ts index e0498fdb2..93ff143cf 100644 --- a/packages/products/tdesign-vue-next/src/select/props.ts +++ b/packages/products/tdesign-vue-next/src/select/props.ts @@ -98,7 +98,7 @@ export default { type: String, default: undefined, }, - /** 透传给 popup 组件的全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/select/select.md b/packages/products/tdesign-vue-next/src/select/select.md index 492f1d162..a64dad103 100644 --- a/packages/products/tdesign-vue-next/src/select/select.md +++ b/packages/products/tdesign-vue-next/src/select/select.md @@ -31,7 +31,7 @@ optionsLayout | String | vertical | 下拉选项布局方式,有纵向排列 panelBottomContent | String / Slot / Function | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 透传给 popup 组件的全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/select/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/select/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框。支持语法糖 `v-model:popupVisible` | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N prefixIcon | Slot / Function | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue-next/src/select/type.ts b/packages/products/tdesign-vue-next/src/select/type.ts index cc7dd1770..3278e00cc 100644 --- a/packages/products/tdesign-vue-next/src/select/type.ts +++ b/packages/products/tdesign-vue-next/src/select/type.ts @@ -130,7 +130,7 @@ export interface TdSelectProps { */ placeholder?: string; /** - * 透传给 popup 组件的全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue-next/src/sticky-tool/props.ts b/packages/products/tdesign-vue-next/src/sticky-tool/props.ts index 8ef42ef15..6186968d5 100644 --- a/packages/products/tdesign-vue-next/src/sticky-tool/props.ts +++ b/packages/products/tdesign-vue-next/src/sticky-tool/props.ts @@ -26,7 +26,7 @@ export default { return ['right-top', 'right-center', 'right-bottom', 'left-top', 'left-center', 'left-bottom'].includes(val); }, }, - /** 透传 Popup 组件全部特性,优先级低于 StickyItem.popupProps */ + /** 透传 Popup 组件全部属性,优先级低于 StickyItem.popupProps */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/sticky-tool/sticky-item-props.ts b/packages/products/tdesign-vue-next/src/sticky-tool/sticky-item-props.ts index 22331bf25..45c025c7d 100644 --- a/packages/products/tdesign-vue-next/src/sticky-tool/sticky-item-props.ts +++ b/packages/products/tdesign-vue-next/src/sticky-tool/sticky-item-props.ts @@ -20,7 +20,7 @@ export default { popup: { type: [String, Function] as PropType, }, - /** 透传浮层组件全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/sticky-tool/sticky-tool.en-US.md b/packages/products/tdesign-vue-next/src/sticky-tool/sticky-tool.en-US.md index 650db8ae3..4c8921754 100644 --- a/packages/products/tdesign-vue-next/src/sticky-tool/sticky-tool.en-US.md +++ b/packages/products/tdesign-vue-next/src/sticky-tool/sticky-tool.en-US.md @@ -1,16 +1,17 @@ :: BASE_DOC :: ## API + ### StickyTool Props name | type | default | description | required -- | -- | -- | -- | -- list | Array | [] | Typescript:`Array` | N offset | Array | - | Typescript:`Array` | N -placement | String | right-bottom | options:right-top/right-center/right-bottom/left-top/left-center/left-bottom | N +placement | String | right-bottom | options: right-top/right-center/right-bottom/left-top/left-center/left-bottom | N popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/sticky-tool/type.ts) | N -shape | String | square | stickytool shape。options:square/round | N -type | String | normal | stickytool type。options:normal/compact | N +shape | String | square | stickytool shape。options: square/round | N +type | String | normal | stickytool type。options: normal/compact | N width | String / Number | - | \- | N onClick | Function | | Typescript:`(context: { e: MouseEvent; item: TdStickyItemProps }) => void`
| N onHover | Function | | Typescript:`(context: { e: MouseEvent; item: TdStickyItemProps }) => void`
| N @@ -22,6 +23,7 @@ name | params | description click | `(context: { e: MouseEvent; item: TdStickyItemProps })` | \- hover | `(context: { e: MouseEvent; item: TdStickyItemProps })` | \- + ### StickyItem Props name | type | default | description | required @@ -30,4 +32,4 @@ icon | Slot / Function | - | Typescript:`TNode`。[see more ts definition](htt label | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N popup | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/sticky-tool/type.ts) | N -trigger | String | hover | options:hover/click | N +trigger | String | hover | options: hover/click | N diff --git a/packages/products/tdesign-vue-next/src/sticky-tool/sticky-tool.md b/packages/products/tdesign-vue-next/src/sticky-tool/sticky-tool.md index 5b4177137..116bf3361 100644 --- a/packages/products/tdesign-vue-next/src/sticky-tool/sticky-tool.md +++ b/packages/products/tdesign-vue-next/src/sticky-tool/sticky-tool.md @@ -1,14 +1,15 @@ :: BASE_DOC :: ## API + ### StickyTool Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- list | Array | [] | 列表。TS 类型:`Array` | N offset | Array | - | 相对于 placement 的偏移量,示例:[-10, 20] 或 ['10em', '8rem']。TS 类型:`Array` | N placement | String | right-bottom | 固定位置。可选项:right-top/right-center/right-bottom/left-top/left-center/left-bottom | N -popupProps | Object | - | 透传 Popup 组件全部特性,优先级低于 StickyItem.popupProps。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/sticky-tool/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性,优先级低于 StickyItem.popupProps。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/sticky-tool/type.ts) | N shape | String | square | 侧边栏菜单形状,有 2 种:方形、圆形。可选项:square/round | N type | String | normal | 侧边栏菜单类型,有 2 种:常规型和紧凑型。可选项:normal/compact | N width | String / Number | - | 宽度 | N @@ -22,12 +23,13 @@ onHover | Function | | TS 类型:`(context: { e: MouseEvent; item: TdStickyIt click | `(context: { e: MouseEvent; item: TdStickyItemProps })` | 点击某一项时触发 hover | `(context: { e: MouseEvent; item: TdStickyItemProps })` | 悬浮到某一项时触发 + ### StickyItem Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- icon | Slot / Function | - | 图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N label | String / Slot / Function | - | 名称。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N popup | String / Slot / Function | - | 浮层内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N -popupProps | Object | - | 透传浮层组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/sticky-tool/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/sticky-tool/type.ts) | N trigger | String | hover | 触发浮层显示的方式。可选项:hover/click | N diff --git a/packages/products/tdesign-vue-next/src/sticky-tool/type.ts b/packages/products/tdesign-vue-next/src/sticky-tool/type.ts index 3d21d7e98..4adcb37cb 100644 --- a/packages/products/tdesign-vue-next/src/sticky-tool/type.ts +++ b/packages/products/tdesign-vue-next/src/sticky-tool/type.ts @@ -23,7 +23,7 @@ export interface TdStickyToolProps { */ placement?: 'right-top' | 'right-center' | 'right-bottom' | 'left-top' | 'left-center' | 'left-bottom'; /** - * 透传 Popup 组件全部特性,优先级低于 StickyItem.popupProps + * 透传 Popup 组件全部属性,优先级低于 StickyItem.popupProps */ popupProps?: PopupProps; /** @@ -64,7 +64,7 @@ export interface TdStickyItemProps { */ popup?: string | TNode; /** - * 透传浮层组件全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue-next/src/time-picker/props.ts b/packages/products/tdesign-vue-next/src/time-picker/props.ts index b6dd3b66f..51f967f3d 100644 --- a/packages/products/tdesign-vue-next/src/time-picker/props.ts +++ b/packages/products/tdesign-vue-next/src/time-picker/props.ts @@ -46,7 +46,7 @@ export default { type: String, default: undefined, }, - /** 透传给 popup 组件的参数 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/time-picker/time-picker.md b/packages/products/tdesign-vue-next/src/time-picker/time-picker.md index e57301eb1..021144f48 100644 --- a/packages/products/tdesign-vue-next/src/time-picker/time-picker.md +++ b/packages/products/tdesign-vue-next/src/time-picker/time-picker.md @@ -16,7 +16,7 @@ hideDisabledTime | Boolean | true | 是否隐藏禁用状态的时间项 | N inputProps | Object | - | 透传给输入框(Input)组件的参数。TS 类型:`InputProps`,[Input API Documents](./input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/time-picker/type.ts) | N label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/time-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/time-picker/type.ts) | N presets | Object | - | 预设快捷时间选择,示例:`{ '前一小时': '11:00:00' }`。TS 类型:`PresetTime` `interface PresetTime { [presetName: string]: TimePickerValue \| (() => TimePickerValue) }`。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/time-picker/type.ts) | N selectInputProps | Object | - | 透传 SelectInput 筛选器输入框组件的全部属性。TS 类型:`SelectInputProps`,[SelectInput API Documents](./select-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/time-picker/type.ts) | N size | String | medium | 尺寸。可选项:small/medium/large | N @@ -61,7 +61,7 @@ format | String | HH:mm:ss | 用于格式化时间,[详细文档](https://day. hideDisabledTime | Boolean | true | 是否隐藏禁用状态的时间项 | N label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N placeholder | String / Array | undefined | 占位符,值为数组表示可分别为开始日期和结束日期设置占位符。TS 类型:`string \| Array` | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/time-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/time-picker/type.ts) | N presets | Object | - | 预设快捷时间范围选择,示例:{ '下午': ['13:00:00', '18:00:00'] }。TS 类型:`PresetTimeRange` `interface PresetTimeRange { [presetRageName: string]: TimeRangeValue \| (() => TimeRangeValue)}`。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/time-picker/type.ts) | N rangeInputProps | Object | - | 透传给范围输入框 RangeInput 组件的参数。TS 类型:`RangeInputProps`,[RangeInput API Documents](./range-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/time-picker/type.ts) | N size | String | medium | 尺寸。可选项:small/medium/large | N diff --git a/packages/products/tdesign-vue-next/src/time-picker/time-range-picker-props.ts b/packages/products/tdesign-vue-next/src/time-picker/time-range-picker-props.ts index 74d11e984..f1958029e 100644 --- a/packages/products/tdesign-vue-next/src/time-picker/time-range-picker-props.ts +++ b/packages/products/tdesign-vue-next/src/time-picker/time-range-picker-props.ts @@ -47,7 +47,7 @@ export default { type: [String, Array] as PropType, default: undefined as TdTimeRangePickerProps['placeholder'], }, - /** 透传给 popup 组件的参数 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/time-picker/type.ts b/packages/products/tdesign-vue-next/src/time-picker/type.ts index 03fdb0c7f..6f6b41742 100644 --- a/packages/products/tdesign-vue-next/src/time-picker/type.ts +++ b/packages/products/tdesign-vue-next/src/time-picker/type.ts @@ -63,7 +63,7 @@ export interface TdTimePickerProps { */ placeholder?: string; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** @@ -196,7 +196,7 @@ export interface TdTimeRangePickerProps { */ placeholder?: string | Array; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue-next/src/tree-select/props.ts b/packages/products/tdesign-vue-next/src/tree-select/props.ts index b99a33008..52256fb80 100644 --- a/packages/products/tdesign-vue-next/src/tree-select/props.ts +++ b/packages/products/tdesign-vue-next/src/tree-select/props.ts @@ -92,7 +92,7 @@ export default { type: String, default: undefined, }, - /** 透传给 popup 组件的全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue-next/src/tree-select/tree-select.md b/packages/products/tdesign-vue-next/src/tree-select/tree-select.md index b94e4f6eb..25655e5d1 100644 --- a/packages/products/tdesign-vue-next/src/tree-select/tree-select.md +++ b/packages/products/tdesign-vue-next/src/tree-select/tree-select.md @@ -29,7 +29,7 @@ multiple | Boolean | false | 是否允许多选 | N panelBottomContent | String / Slot / Function | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 透传给 popup 组件的全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/tree-select/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/tree-select/type.ts) | N popupVisible | Boolean | undefined | 是否显示下拉框。支持语法糖 `v-model:popupVisible` | N defaultPopupVisible | Boolean | undefined | 是否显示下拉框。非受控属性 | N prefixIcon | Slot / Function | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue-next/src/tree-select/type.ts b/packages/products/tdesign-vue-next/src/tree-select/type.ts index 458318bb5..cb6cd1ad7 100644 --- a/packages/products/tdesign-vue-next/src/tree-select/type.ts +++ b/packages/products/tdesign-vue-next/src/tree-select/type.ts @@ -124,7 +124,7 @@ export interface TdTreeSelectProps< */ placeholder?: string; /** - * 透传给 popup 组件的全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue-next/src/upload/props.ts b/packages/products/tdesign-vue-next/src/upload/props.ts index d78154194..da49dfa10 100644 --- a/packages/products/tdesign-vue-next/src/upload/props.ts +++ b/packages/products/tdesign-vue-next/src/upload/props.ts @@ -49,7 +49,7 @@ export default { default: { type: [String, Function] as PropType, }, - /** 是否禁用 */ + /** 是否禁用组件 */ disabled: { type: Boolean, default: undefined, @@ -93,6 +93,10 @@ export default { headers: { type: Object as PropType, }, + /** 用于在上传图片场景下,透传属性配置至 Image 组件 */ + imageProps: { + type: Object as PropType, + }, /** 透传图片预览组件全部属性 */ imageViewerProps: { type: Object as PropType, @@ -197,7 +201,7 @@ export default { type: Boolean, default: true, }, - /** 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传。 */ + /** 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传 */ useMockProgress: { type: Boolean, default: true, diff --git a/packages/products/tdesign-vue-next/src/upload/type.ts b/packages/products/tdesign-vue-next/src/upload/type.ts index 7bfaa01dd..21a5ad457 100644 --- a/packages/products/tdesign-vue-next/src/upload/type.ts +++ b/packages/products/tdesign-vue-next/src/upload/type.ts @@ -58,7 +58,7 @@ export interface TdUploadProps { */ default?: string | TNode; /** - * 是否禁用 + * 是否禁用组件 */ disabled?: boolean; /** @@ -99,6 +99,10 @@ export interface TdUploadProps { * 设置上传的请求头部,`action` 存在时有效 */ headers?: { [key: string]: string }; + /** + * 用于在上传图片场景下,透传属性配置至 Image 组件 + */ + imageProps?: object; /** * 透传图片预览组件全部属性 */ @@ -207,7 +211,7 @@ export interface TdUploadProps { */ uploadPastedFiles?: boolean; /** - * 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传。 + * 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传 * @default true */ useMockProgress?: boolean; diff --git a/packages/products/tdesign-vue-next/src/upload/upload.en-US.md b/packages/products/tdesign-vue-next/src/upload/upload.en-US.md index 3049f526a..9a43eebd3 100644 --- a/packages/products/tdesign-vue-next/src/upload/upload.en-US.md +++ b/packages/products/tdesign-vue-next/src/upload/upload.en-US.md @@ -26,6 +26,7 @@ format | Function | - | to redefine `UploadFile` data structure。Typescript: formatRequest | Function | - | redefine request data。Typescript:`(requestData: { [key: string]: any }) => { [key: string]: any }` | N formatResponse | Function | - | redefine response data structure。Typescript:`(response: any, context: FormatResponseContext) => ResponseType ` `type ResponseType = { error?: string; url?: string; status?: 'fail' \| 'success'; files?: UploadFile[] } & Record` `interface FormatResponseContext { file: UploadFile; currentFiles?: UploadFile[] }`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/upload/type.ts) | N headers | Object | - | HTTP Request Header。Typescript:`{[key: string]: string}` | N +imageProps | Object | - | \- | N imageViewerProps | Object | - | ImageViewer Component Props。Typescript:`ImageViewerProps`,[ImageViewer API Documents](./image-viewer?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/upload/type.ts) | N inputAttributes | Object | - | add attributes to HTML element `input`。Typescript:`CSSProperties` | N isBatchUpload | Boolean | false | make all files to be a whole package, files can only be replaced or deleted together, can not add more files | N diff --git a/packages/products/tdesign-vue-next/src/upload/upload.md b/packages/products/tdesign-vue-next/src/upload/upload.md index edc7af91e..127e17cb4 100644 --- a/packages/products/tdesign-vue-next/src/upload/upload.md +++ b/packages/products/tdesign-vue-next/src/upload/upload.md @@ -16,7 +16,7 @@ beforeUpload | Function | - | 如果是自动上传模式 `autoUpload=true`, cancelUploadButton | Object / Slot / Function | - | 批量文件/图片上传,`autoUpload=false` 场景下,透传“取消上传”按钮属性。TS 类型:`null \| ButtonProps \| TNode<{ disabled: boolean; cancelUploadText: string; cancelUpload: (ctx: { e: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N data | Object | - | 上传请求所需的额外字段,默认字段有 `file`,表示文件信息。可以添加额外的文件名字段,如:`{file_name: "custom-file-name.txt"}`。`autoUpload=true` 时有效。也可以使用 `formatRequest` 完全自定义上传请求的字段。TS 类型:`Record \| ((files: UploadFile[]) => Record)` | N default | String / Slot / Function | - | 非拖拽场景,指触发上传的元素,如:“选择文件”。如果是拖拽场景,则是指拖拽区域。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N -disabled | Boolean | undefined | 是否禁用 | N +disabled | Boolean | undefined | 是否禁用组件 | N dragContent | String / Slot / Function | - | 用于自定义拖拽区域,`theme=custom` 且 `draggable=true` 时有效。TS 类型:`TNode \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N draggable | Boolean | undefined | 是否启用拖拽上传,不同的组件风格默认值不同。`theme=file` 或 `theme=image` 时有效 | N fileListDisplay | Slot / Function | - | 用于完全自定义文件列表界面内容(UI),单文件和多文件均有效。TS 类型:`TNode<{ files: UploadFile[]; dragEvents?: UploadDisplayDragEvents }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N @@ -26,6 +26,7 @@ format | Function | - | 转换文件 `UploadFile` 的数据结构,可新增或 formatRequest | Function | - | 用于新增或修改文件上传请求 参数。`action` 存在时有效。一个请求上传一个文件时,默认请求字段有 `file`。
一个请求上传多个文件时,默认字段有 `file[0]/file[1]/file[2]/.../length`,其中 `length` 表示本次上传的文件数量。
⚠️非常注意,此处的 `file[0]/file[1]` 仅仅是一个字段名,并非表示 `file` 是一个数组,接口获取字段时注意区分。
可以使用 `name` 定义 `file` 字段的别名。
也可以使用 `formatRequest` 自定义任意字段,如添加一个字段 `fileList` ,存储文件数组。TS 类型:`(requestData: { [key: string]: any }) => { [key: string]: any }` | N formatResponse | Function | - | 用于格式化文件上传后的接口响应数据,`response` 便是接口响应的原始数据。`action` 存在时有效。
示例返回值:`{ error, url, status, files }`
此函数的返回值 `error` 会作为错误文本提醒,表示上传失败的原因,如果存在会判定为本次上传失败。
此函数的返回值 `url` 会作为单个文件上传成功后的链接。
`files` 表示一个请求同时上传多个文件后的文件列表。TS 类型:`(response: any, context: FormatResponseContext) => ResponseType ` `type ResponseType = { error?: string; url?: string; status?: 'fail' \| 'success'; files?: UploadFile[] } & Record` `interface FormatResponseContext { file: UploadFile; currentFiles?: UploadFile[] }`。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/upload/type.ts) | N headers | Object | - | 设置上传的请求头部,`action` 存在时有效。TS 类型:`{[key: string]: string}` | N +imageProps | Object | - | 用于在上传图片场景下,透传属性配置至 Image 组件 | N imageViewerProps | Object | - | 透传图片预览组件全部属性。TS 类型:`ImageViewerProps`,[ImageViewer API Documents](./image-viewer?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/upload/type.ts) | N inputAttributes | Object | - | 用于添加属性到 HTML 元素 `input`。TS 类型:`CSSProperties` | N isBatchUpload | Boolean | false | 多个文件是否作为一个独立文件包,整体替换,整体删除。不允许追加文件,只允许替换文件。`theme=file-flow` 时有效 | N @@ -49,7 +50,7 @@ triggerButtonProps | Object | - | 透传选择按钮全部属性。TS 类型:` uploadAllFilesInOneRequest | Boolean | false | 是否在同一个请求中上传全部文件,默认一个请求上传一个文件。多文件上传时有效 | N uploadButton | Object / Slot / Function | - | 批量文件/图片上传,`autoUpload=false` 场景下,透传“点击上传”按钮属性。TS 类型:`null \| ButtonProps \| TNode<{ disabled: boolean; uploading: boolean; uploadFiles: () => void; uploadText: string }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N uploadPastedFiles | Boolean | true | 是否允许粘贴上传剪贴板中的文件 | N -useMockProgress | Boolean | true | 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传。 | N +useMockProgress | Boolean | true | 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传 | N value | Array | [] | 已上传文件列表,同 `files`。TS 类型:`UploadFile`。支持语法糖 `v-model` 或 `v-model:value`。TS 类型:`Array` | N defaultValue | Array | [] | 已上传文件列表,同 `files`。TS 类型:`UploadFile`。非受控属性。TS 类型:`Array` | N withCredentials | Boolean | false | 上传请求时是否携带 cookie | N diff --git a/packages/products/tdesign-vue/src/auto-complete/auto-complete.md b/packages/products/tdesign-vue/src/auto-complete/auto-complete.md index 7b505c138..bcbb416bc 100644 --- a/packages/products/tdesign-vue/src/auto-complete/auto-complete.md +++ b/packages/products/tdesign-vue/src/auto-complete/auto-complete.md @@ -19,7 +19,7 @@ options | Array | - | 下拉联想词列表。示例一:`['联想词一', '联 panelBottomContent | String / Slot / Function | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N placeholder | String | undefined | 输入框为空时的占位提示。组件本身默认值为 `undefined`,但全局配置存在默认值,不同语言全局默认值不同 | N -popupProps | Object | - | 透传 Popup 组件全部特性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/auto-complete/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/auto-complete/type.ts) | N readonly | Boolean | undefined | 是否只读 | N size | String | medium | 组件尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N status | String | default | 输入框状态。可选项:default/success/warning/error | N diff --git a/packages/products/tdesign-vue/src/auto-complete/props.ts b/packages/products/tdesign-vue/src/auto-complete/props.ts index fa9ab2b3d..467fa4466 100644 --- a/packages/products/tdesign-vue/src/auto-complete/props.ts +++ b/packages/products/tdesign-vue/src/auto-complete/props.ts @@ -58,7 +58,7 @@ export default { type: String, default: undefined, }, - /** 透传 Popup 组件全部特性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/auto-complete/type.ts b/packages/products/tdesign-vue/src/auto-complete/type.ts index be5b1f973..d7eb4869d 100644 --- a/packages/products/tdesign-vue/src/auto-complete/type.ts +++ b/packages/products/tdesign-vue/src/auto-complete/type.ts @@ -66,7 +66,7 @@ export interface TdAutoCompleteProps` panelBottomContent | String / Slot / Function | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 参考 popup 组件 API。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/cascader/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/cascader/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框 | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N prefixIcon | Slot / Function | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue/src/cascader/props.ts b/packages/products/tdesign-vue/src/cascader/props.ts index 799acbf91..3c7ad6a89 100644 --- a/packages/products/tdesign-vue/src/cascader/props.ts +++ b/packages/products/tdesign-vue/src/cascader/props.ts @@ -100,7 +100,7 @@ export default { type: String, default: undefined, }, - /** 参考 popup 组件 API */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/cascader/type.ts b/packages/products/tdesign-vue/src/cascader/type.ts index 442b16e22..782442def 100644 --- a/packages/products/tdesign-vue/src/cascader/type.ts +++ b/packages/products/tdesign-vue/src/cascader/type.ts @@ -131,7 +131,7 @@ export interface TdCascaderProps` | N -disabled | Boolean | - | \- | N +disabled | Boolean | undefined | \- | N enableAlpha | Boolean | false | \- | N enableMultipleGradient | Boolean | true | \- | N format | String | RGB | options: RGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS | N diff --git a/packages/products/tdesign-vue/src/color-picker/color-picker.md b/packages/products/tdesign-vue/src/color-picker/color-picker.md index c93dc42a5..ceead6bc4 100644 --- a/packages/products/tdesign-vue/src/color-picker/color-picker.md +++ b/packages/products/tdesign-vue/src/color-picker/color-picker.md @@ -10,7 +10,7 @@ borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否可清空 | N closeBtn | String / Boolean / Slot / Function | true | 关闭按钮,值为 `true` 显示默认关闭按钮;值为 `false` 或 `undefined` 则不显示关闭按钮;值类型为函数,则表示自定义关闭按钮。TS 类型:`string \| boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N colorModes | Array | ["monochrome", "linear-gradient"] | 颜色模式选择。同时支持单色和渐变两种模式,可仅使用单色或者渐变其中一种模式,也可以同时使用。`monochrome` 表示单色,`linear-gradient` 表示渐变色。TS 类型:`Array<'monochrome' \| 'linear-gradient'>` | N -disabled | Boolean | - | 是否禁用组件 | N +disabled | Boolean | undefined | 是否禁用组件 | N enableAlpha | Boolean | false | 是否开启透明通道 | N enableMultipleGradient | Boolean | true | 是否允许开启通过点击渐变轴增加渐变梯度,默认开启,关闭时只会存在起始和结束两个颜色 | N format | String | RGB | 格式化色值。`enableAlpha` 为真时,`RGBA/HSLA/HSVA` 等值有效。可选项:RGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS | N diff --git a/packages/products/tdesign-vue/src/color-picker/props.ts b/packages/products/tdesign-vue/src/color-picker/props.ts index abb16b3eb..6cef7ff64 100644 --- a/packages/products/tdesign-vue/src/color-picker/props.ts +++ b/packages/products/tdesign-vue/src/color-picker/props.ts @@ -23,7 +23,10 @@ export default { default: (): TdColorPickerProps['colorModes'] => ["monochrome", "linear-gradient"], }, /** 是否禁用组件 */ - disabled: Boolean, + disabled: { + type: Boolean, + default: undefined, + }, /** 是否开启透明通道 */ enableAlpha: Boolean, /** 是否允许开启通过点击渐变轴增加渐变梯度,默认开启,关闭时只会存在起始和结束两个颜色 */ diff --git a/packages/products/tdesign-vue/src/date-picker/date-picker.md b/packages/products/tdesign-vue/src/date-picker/date-picker.md index 6b450c1b9..72346d846 100644 --- a/packages/products/tdesign-vue/src/date-picker/date-picker.md +++ b/packages/products/tdesign-vue/src/date-picker/date-picker.md @@ -22,7 +22,7 @@ mode | String | date | 选择器模式。可选项:year/quarter/month/week/dat multiple | Boolean | false | 支持多选日期,但不支持在range-picker中,或与enableTimePicker、allowInput 一起使用。TS 类型:`boolean` | N needConfirm | Boolean | true | 决定在日期时间选择器的场景下是否需要点击确认按钮才完成选择动作,默认为`true` | N placeholder | String / Array | undefined | 占位符。TS 类型:`string` | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N prefixIcon | Slot / Function | - | 用于自定义组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N presets | Object | - | 预设快捷日期选择,示例:`{ '元旦': '2021-01-01', '昨天': dayjs().subtract(1, 'day').format('YYYY-MM-DD'), '特定日期': () => ['2021-02-01'] }`。TS 类型:`PresetDate` `interface PresetDate { [name: string]: DateValue \| (() => DateValue) }`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N presetsPlacement | String | bottom | 预设面板展示区域(包含确定按钮)。可选项:left/top/right/bottom | N @@ -75,7 +75,7 @@ mode | String | date | 选择器模式。可选项:year/quarter/month/week/dat needConfirm | Boolean | true | 决定在日期时间区间选择器的场景下是否需要点击确认按钮才完成选择动作,默认为 `true` | N panelPreselection | Boolean | true | 在开始日期选中之前,面板是否显示预选状态,即是否高亮预选日期 | N placeholder | String / Array | - | 占位符,值为数组表示可分别为开始日期和结束日期设置占位符。TS 类型:`string \| Array` | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N prefixIcon | Slot / Function | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N presets | Object | - | 预设快捷日期选择,示例:{ '特定日期范围': ['2021-01-01', '2022-01-01'], '本月': [dayjs().startOf('month'), dayjs().endOf('month')] }。TS 类型:`PresetRange` `interface PresetRange { [range: string]: DateRange \| (() => DateRange)}` `type DateRange = [DateValue, DateValue]`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N presetsPlacement | String | bottom | 预设面板展示区域(包含确定按钮)。可选项:left/top/right/bottom | N diff --git a/packages/products/tdesign-vue/src/date-picker/date-range-picker-props.ts b/packages/products/tdesign-vue/src/date-picker/date-range-picker-props.ts index a15a986f8..82b1bb823 100644 --- a/packages/products/tdesign-vue/src/date-picker/date-range-picker-props.ts +++ b/packages/products/tdesign-vue/src/date-picker/date-range-picker-props.ts @@ -76,7 +76,7 @@ export default { placeholder: { type: [String, Array] as PropType, }, - /** 透传给 popup 组件的参数 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/date-picker/props.ts b/packages/products/tdesign-vue/src/date-picker/props.ts index 53011c800..0d546a102 100644 --- a/packages/products/tdesign-vue/src/date-picker/props.ts +++ b/packages/products/tdesign-vue/src/date-picker/props.ts @@ -76,7 +76,7 @@ export default { type: [String, Array] as PropType, default: undefined, }, - /** 透传给 popup 组件的参数 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/date-picker/type.ts b/packages/products/tdesign-vue/src/date-picker/type.ts index 895788151..99217f4da 100644 --- a/packages/products/tdesign-vue/src/date-picker/type.ts +++ b/packages/products/tdesign-vue/src/date-picker/type.ts @@ -88,7 +88,7 @@ export interface TdDatePickerProps { */ placeholder?: string; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** @@ -257,7 +257,7 @@ export interface TdDateRangePickerProps { */ placeholder?: string | Array; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue/src/dropdown/dropdown.en-US.md b/packages/products/tdesign-vue/src/dropdown/dropdown.en-US.md index cbe315162..02b7958f8 100644 --- a/packages/products/tdesign-vue/src/dropdown/dropdown.en-US.md +++ b/packages/products/tdesign-vue/src/dropdown/dropdown.en-US.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Dropdown Props name | type | default | description | required @@ -11,7 +12,7 @@ hideAfterItemClick | Boolean | true | \- | N maxColumnWidth | String / Number | 100 | \- | N maxHeight | Number | 300 | \- | N minColumnWidth | String / Number | 10 | \- | N -options | Array | [] | Typescript:`Array` `type DropdownOption = { children?: Array } & TdDropdownItemProps & Record`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/dropdown/type.ts) | N +options | Array | [] | Typescript:`Array` `type DropdownOption = { children?: DropdownOption[] } & TdDropdownItemProps & Record`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/dropdown/type.ts) | N panelBottomContent | String / Slot / Function | - | bottom content of the dropdown panel。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | top content of the dropdown panel。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N placement | String | bottom-left | options: top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N @@ -25,6 +26,7 @@ name | params | description -- | -- | -- click | `(dropdownItem: DropdownOption, context: { e: MouseEvent })` | \- + ### DropdownItem Props name | type | default | description | required diff --git a/packages/products/tdesign-vue/src/dropdown/dropdown.md b/packages/products/tdesign-vue/src/dropdown/dropdown.md index 635f93915..6fe908681 100644 --- a/packages/products/tdesign-vue/src/dropdown/dropdown.md +++ b/packages/products/tdesign-vue/src/dropdown/dropdown.md @@ -1,9 +1,10 @@ :: BASE_DOC :: ## API + ### Dropdown Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- direction | String | right | 多层级操作时,子层级展开方向。可选项:left/right | N disabled | Boolean | false | 是否禁用组件 | N @@ -11,11 +12,11 @@ hideAfterItemClick | Boolean | true | 点击选项后是否自动隐藏弹窗 | maxColumnWidth | String / Number | 100 | 选项最大宽度,内容超出时,显示为省略号。值为字符串时,值就是最大宽度;值为数字时,单位:px | N maxHeight | Number | 300 | 弹窗最大高度,单位:px 。统一控制每一列的高度 | N minColumnWidth | String / Number | 10 | 选项最小宽度。值为字符串时,值就是最小宽度;值为数字时,单位:px | N -options | Array | [] | 下拉操作项。TS 类型:`Array` `type DropdownOption = { children?: Array } & TdDropdownItemProps & Record`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/dropdown/type.ts) | N +options | Array | [] | 下拉操作项。TS 类型:`Array` `type DropdownOption = { children?: DropdownOption[] } & TdDropdownItemProps & Record`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/dropdown/type.ts) | N panelBottomContent | String / Slot / Function | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N placement | String | bottom-left | 弹窗定位方式,可选值同 Popup 组件。可选项:top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N -popupProps | Object | - | 透传 Popup 组件属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/dropdown/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/dropdown/type.ts) | N trigger | String | hover | 触发下拉显示的方式。可选项:hover/click/focus/context-menu | N onClick | Function | | TS 类型:`(dropdownItem: DropdownOption, context: { e: MouseEvent }) => void`
下拉操作项点击时触发 | N @@ -25,9 +26,10 @@ onClick | Function | | TS 类型:`(dropdownItem: DropdownOption, context: { e -- | -- | -- click | `(dropdownItem: DropdownOption, context: { e: MouseEvent })` | 下拉操作项点击时触发 + ### DropdownItem Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- active | Boolean | false | 是否高亮当前操作项 | N content | String / Slot / Function | '' | 下拉操作项内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue/src/dropdown/props.ts b/packages/products/tdesign-vue/src/dropdown/props.ts index 208f6b1b9..d10d94ff0 100644 --- a/packages/products/tdesign-vue/src/dropdown/props.ts +++ b/packages/products/tdesign-vue/src/dropdown/props.ts @@ -44,6 +44,14 @@ export default { type: Array as PropType, default: (): TdDropdownProps['options'] => [], }, + /** 面板内的底部内容 */ + panelBottomContent: { + type: [String, Function] as PropType, + }, + /** 面板内的顶部内容 */ + panelTopContent: { + type: [String, Function] as PropType, + }, /** 弹窗定位方式,可选值同 Popup 组件 */ placement: { type: String as PropType, @@ -53,7 +61,7 @@ export default { return ['top', 'left', 'right', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right', 'left-top', 'left-bottom', 'right-top', 'right-bottom'].includes(val); }, }, - /** 透传 Popup 组件属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式 */ + /** 透传 Popup 组件全部属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/dropdown/type.ts b/packages/products/tdesign-vue/src/dropdown/type.ts index 489d3e66d..d2fbd5cfd 100644 --- a/packages/products/tdesign-vue/src/dropdown/type.ts +++ b/packages/products/tdesign-vue/src/dropdown/type.ts @@ -43,6 +43,14 @@ export interface TdDropdownProps { * @default [] */ options?: Array; + /** + * 面板内的底部内容 + */ + panelBottomContent?: string | TNode; + /** + * 面板内的顶部内容 + */ + panelTopContent?: string | TNode; /** * 弹窗定位方式,可选值同 Popup 组件 * @default bottom-left @@ -61,7 +69,7 @@ export interface TdDropdownProps { | 'right-top' | 'right-bottom'; /** - * 透传 Popup 组件属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式 + * 透传 Popup 组件全部属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式 */ popupProps?: PopupProps; /** @@ -115,6 +123,6 @@ export interface TdDropdownItemProps { onClick?: (dropdownItem: DropdownOption, context: { e: MouseEvent }) => void; } -export type DropdownOption = { children?: Array } & TdDropdownItemProps & Record; +export type DropdownOption = { children?: DropdownOption[] } & TdDropdownItemProps & Record; export type DropdownItemTheme = 'default' | 'success' | 'warning' | 'error'; diff --git a/packages/products/tdesign-vue/src/guide/guide.md b/packages/products/tdesign-vue/src/guide/guide.md index ea805ea77..68eb401da 100644 --- a/packages/products/tdesign-vue/src/guide/guide.md +++ b/packages/products/tdesign-vue/src/guide/guide.md @@ -9,7 +9,7 @@ counter | Slot / Function | - | 用于自定义渲染计数部分。TS 类型:`TNode<{ current: number; total: number }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N current | Number | - | 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景。支持语法糖 `v-model` | N defaultCurrent | Number | - | 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景。非受控属性 | N -finishButtonProps | Object | - | 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }`。TS 类型:`ButtonProps` | N +finishButtonProps | Object | - | 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }`。TS 类型:`ButtonProps` | N hideCounter | Boolean | false | 是否隐藏计数 | N hidePrev | Boolean | false | 是否隐藏上一步按钮 | N hideSkip | Boolean | false | 是否隐藏跳过按钮 | N @@ -50,7 +50,7 @@ mode | String | - | 引导框的类型。可选项:popup/dialog | N nextButtonProps | Object | - | 用于自定义当前引导框的下一步按钮的内容。TS 类型:`ButtonProps` | N offset | Array | - | 【讨论确认中】相对于 placement 的偏移量,示例:[-10, 20] 或 ['10px', '8px']。TS 类型:`Array` | N placement | String | 'top' | 引导框相对于高亮元素出现的位置。TS 类型:`StepPopupPlacement \| StepDialogPlacement` `type StepPopupPlacement = 'top'\|'left'\|'right'\|'bottom'\|'top-left'\|'top-right'\|'bottom-left'\|'bottom-right'\|'left-top'\|'left-bottom'\|'right-top'\|'right-bottom'` `type StepDialogPlacement = 'top'\|'center' `。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/guide/type.ts) | N -popupProps | Object | - | 透传全部属性到 Popup 组件。`mode=popup` 时有效。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/guide/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。`mode=popup` 时有效。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/guide/type.ts) | N prevButtonProps | Object | - | 用于自定义当前引导框的上一步按钮的内容。TS 类型:`ButtonProps` | N showOverlay | Boolean | true | 是否出现遮罩层 | N skipButtonProps | Object | - | 用于自定义当前步骤引导框的跳过按钮的内容。TS 类型:`ButtonProps` | N diff --git a/packages/products/tdesign-vue/src/guide/props.ts b/packages/products/tdesign-vue/src/guide/props.ts index d15d62a18..369226735 100644 --- a/packages/products/tdesign-vue/src/guide/props.ts +++ b/packages/products/tdesign-vue/src/guide/props.ts @@ -20,7 +20,7 @@ export default { defaultCurrent: { type: Number, }, - /** 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }` */ + /** 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }` */ finishButtonProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/guide/type.ts b/packages/products/tdesign-vue/src/guide/type.ts index f0ac38eb3..d425b07ea 100644 --- a/packages/products/tdesign-vue/src/guide/type.ts +++ b/packages/products/tdesign-vue/src/guide/type.ts @@ -22,7 +22,7 @@ export interface TdGuideProps { */ defaultCurrent?: number; /** - * 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }` + * 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }` */ finishButtonProps?: ButtonProps; /** @@ -137,7 +137,7 @@ export interface GuideStep { */ placement?: StepPopupPlacement | StepDialogPlacement; /** - * 透传全部属性到 Popup 组件。`mode=popup` 时有效 + * 透传 Popup 组件全部属性。`mode=popup` 时有效 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue/src/menu/menu.md b/packages/products/tdesign-vue/src/menu/menu.md index 8d99bdcf1..aeeb96c6e 100644 --- a/packages/products/tdesign-vue/src/menu/menu.md +++ b/packages/products/tdesign-vue/src/menu/menu.md @@ -58,7 +58,7 @@ content | String / Slot / Function | - | 菜单项内容。TS 类型:`string \ default | String / Slot / Function | - | 菜单项内容,同 content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用菜单项展开/收起/跳转等功能 | N icon | Slot / Function | - | 菜单项图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N -popupProps | Object | - | 透传 Popup 组件全部特性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/menu/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/menu/type.ts) | N title | String / Slot / Function | - | 二级菜单内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N value | String / Number | - | 菜单项唯一标识。TS 类型:`MenuValue` | N diff --git a/packages/products/tdesign-vue/src/menu/submenu-props.ts b/packages/products/tdesign-vue/src/menu/submenu-props.ts index 563a68321..4fc46a57a 100644 --- a/packages/products/tdesign-vue/src/menu/submenu-props.ts +++ b/packages/products/tdesign-vue/src/menu/submenu-props.ts @@ -22,7 +22,7 @@ export default { icon: { type: Function as PropType, }, - /** 透传 Popup 组件全部特性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/menu/type.ts b/packages/products/tdesign-vue/src/menu/type.ts index af3cd7ae7..6a5e3e929 100644 --- a/packages/products/tdesign-vue/src/menu/type.ts +++ b/packages/products/tdesign-vue/src/menu/type.ts @@ -135,7 +135,7 @@ export interface TdSubmenuProps { */ icon?: TNode; /** - * 透传 Popup 组件全部特性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue/src/radio/radio-group-props.ts b/packages/products/tdesign-vue/src/radio/radio-group-props.ts index f0745c4e2..63f2f410b 100644 --- a/packages/products/tdesign-vue/src/radio/radio-group-props.ts +++ b/packages/products/tdesign-vue/src/radio/radio-group-props.ts @@ -38,7 +38,7 @@ export default { return ['small', 'medium', 'large'].includes(val); }, }, - /** 组件风格 */ + /** 用于在使用 options 方式渲染时决定组件的风格 */ theme: { type: String as PropType, default: 'radio' as TdRadioGroupProps['theme'], diff --git a/packages/products/tdesign-vue/src/radio/radio.en-US.md b/packages/products/tdesign-vue/src/radio/radio.en-US.md index 62ffaeac2..2300181f7 100644 --- a/packages/products/tdesign-vue/src/radio/radio.en-US.md +++ b/packages/products/tdesign-vue/src/radio/radio.en-US.md @@ -36,7 +36,7 @@ name | String | - | \- | N options | Array | - | Typescript:`Array` `type RadioOption = string \| number \| RadioOptionObj` `interface RadioOptionObj { label?: string \| TNode; value?: string \| number \| boolean; disabled?: boolean }`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/radio/type.ts) | N readonly | Boolean | undefined | \- | N size | String | medium | options: small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N -theme | String | radio | component Style。options: radio/button | N +theme | String | radio | Determine the style of radio when using options API。options: radio/button | N value | String / Number / Boolean | - | `v-model` is supported。Typescript:`T` `type RadioValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/radio/type.ts) | N defaultValue | String / Number / Boolean | - | uncontrolled property。Typescript:`T` `type RadioValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/radio/type.ts) | N variant | String | outline | options: outline/primary-filled/default-filled | N diff --git a/packages/products/tdesign-vue/src/radio/radio.md b/packages/products/tdesign-vue/src/radio/radio.md index 4a6163afa..7eeb8dd15 100644 --- a/packages/products/tdesign-vue/src/radio/radio.md +++ b/packages/products/tdesign-vue/src/radio/radio.md @@ -36,7 +36,7 @@ name | String | - | HTML 元素原生属性 | N options | Array | - | 单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同。TS 类型:`Array` `type RadioOption = string \| number \| RadioOptionObj` `interface RadioOptionObj { label?: string \| TNode; value?: string \| number \| boolean; disabled?: boolean }`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/radio/type.ts) | N readonly | Boolean | undefined | 只读状态 | N size | String | medium | 组件尺寸【讨论中】。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N -theme | String | radio | 组件风格。可选项:radio/button | N +theme | String | radio | 用于在使用 options 方式渲染时决定组件的风格。可选项:radio/button | N value | String / Number / Boolean | - | 选中的值。支持语法糖 `v-model`。TS 类型:`T` `type RadioValue = string \| number \| boolean`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/radio/type.ts) | N defaultValue | String / Number / Boolean | - | 选中的值。非受控属性。TS 类型:`T` `type RadioValue = string \| number \| boolean`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/radio/type.ts) | N variant | String | outline | 单选组件按钮形式。可选项:outline/primary-filled/default-filled | N diff --git a/packages/products/tdesign-vue/src/radio/type.ts b/packages/products/tdesign-vue/src/radio/type.ts index b985787d8..741fec8d0 100644 --- a/packages/products/tdesign-vue/src/radio/type.ts +++ b/packages/products/tdesign-vue/src/radio/type.ts @@ -86,7 +86,7 @@ export interface TdRadioGroupProps { */ size?: SizeEnum; /** - * 组件风格 + * 用于在使用 options 方式渲染时决定组件的风格 * @default radio */ theme?: 'radio' | 'button'; diff --git a/packages/products/tdesign-vue/src/range-input/range-input-popup-props.ts b/packages/products/tdesign-vue/src/range-input/range-input-popup-props.ts index 640650f09..a6aa7e092 100644 --- a/packages/products/tdesign-vue/src/range-input/range-input-popup-props.ts +++ b/packages/products/tdesign-vue/src/range-input/range-input-popup-props.ts @@ -28,7 +28,7 @@ export default { panel: { type: [String, Function] as PropType, }, - /** 透传 Popup 浮层组件全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/range-input/range-input.md b/packages/products/tdesign-vue/src/range-input/range-input.md index 0b9b7b009..cc25c2e0f 100644 --- a/packages/products/tdesign-vue/src/range-input/range-input.md +++ b/packages/products/tdesign-vue/src/range-input/range-input.md @@ -66,7 +66,7 @@ inputValue | Array | - | 输入框的值。支持语法糖 `.sync`。TS 类型 defaultInputValue | Array | - | 输入框的值。非受控属性。TS 类型:`RangeInputValue` | N label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N panel | String / Slot / Function | - | 下拉框内容,可完全自定义。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N -popupProps | Object | - | 透传 Popup 浮层组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/range-input/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/range-input/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框 | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N rangeInputProps | Object | - | 透传 RangeInput 组件全部属性。TS 类型:`RangeInputProps`,[RangeInput API Documents](./range-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/range-input/type.ts) | N diff --git a/packages/products/tdesign-vue/src/range-input/type.ts b/packages/products/tdesign-vue/src/range-input/type.ts index aefa71d02..0aaf42a72 100644 --- a/packages/products/tdesign-vue/src/range-input/type.ts +++ b/packages/products/tdesign-vue/src/range-input/type.ts @@ -4,11 +4,154 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ +import { InputProps, InputValue, InputFormatType } from '../input'; import { PopupProps } from '../popup'; import { RangeInputProps } from '../range-input'; import { PopupVisibleChangeContext } from '../popup'; import { TNode } from '../common'; +export interface TdRangeInputProps { + /** + * 输入框高亮状态序号 + */ + activeIndex?: number; + /** + * 无边框模式 + * @default false + */ + borderless?: boolean; + /** + * 是否可清空 + * @default false + */ + clearable?: boolean; + /** + * 是否禁用范围输入框 + */ + disabled?: boolean; + /** + * 指定输入框展示值的格式 + */ + format?: InputFormatType | Array; + /** + * 透传 Input 输入框组件全部属性,数组第一项表示第一个输入框属性,第二项表示第二个输入框属性。示例:`[{ label: 'A', name: 'A-name' }, { label: 'B', name: 'B-name' }]` + */ + inputProps?: InputProps | Array; + /** + * 左侧内容 + */ + label?: string | TNode; + /** + * 占位符,示例:'请输入' 或者 ['开始日期', '结束日期'] + */ + placeholder?: string | Array; + /** + * 组件前置图标 + */ + prefixIcon?: TNode; + /** + * 只读状态 + */ + readonly?: boolean; + /** + * 范围分隔符 + * @default '-' + */ + separator?: string | TNode; + /** + * 输入框内容为空时,悬浮状态是否显示清空按钮,默认不显示 + * @default false + */ + showClearIconOnEmpty?: boolean; + /** + * 输入框尺寸 + * @default medium + */ + size?: 'small' | 'medium' | 'large'; + /** + * 输入框状态 + * @default default + */ + status?: 'default' | 'success' | 'warning' | 'error'; + /** + * 后置图标前的后置内容 + */ + suffix?: string | TNode; + /** + * 组件后置图标 + */ + suffixIcon?: TNode; + /** + * 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式 + */ + tips?: string | TNode; + /** + * 范围输入框的值 + * @default [] + */ + value?: RangeInputValue; + /** + * 范围输入框的值,非受控属性 + * @default [] + */ + defaultValue?: RangeInputValue; + /** + * 范围输入框失去焦点时触发 + */ + onBlur?: (value: RangeInputValue, context?: { e?: FocusEvent; position?: RangeInputPosition }) => void; + /** + * 范围输入框值发生变化时触发 + */ + onChange?: ( + value: RangeInputValue, + context?: { + e?: InputEvent | MouseEvent | CompositionEvent; + position?: RangeInputPosition; + trigger?: 'input' | 'initial' | 'clear'; + }, + ) => void; + /** + * 清空按钮点击时触发 + */ + onClear?: (context: { e: MouseEvent }) => void; + /** + * 范围输入框点击时触发 + */ + onClick?: (context?: { e?: MouseEvent; position?: RangeInputPosition }) => void; + /** + * 回车键按下时触发 + */ + onEnter?: (value: RangeInputValue, context?: { e?: InputEvent | MouseEvent; position?: RangeInputPosition }) => void; + /** + * 范围输入框获得焦点时触发 + */ + onFocus?: (value: RangeInputValue, context?: { e?: FocusEvent; position?: RangeInputPosition }) => void; + /** + * 进入输入框时触发 + */ + onMouseenter?: (context: { e: MouseEvent }) => void; + /** + * 离开输入框时触发 + */ + onMouseleave?: (context: { e: MouseEvent }) => void; +} + +/** 组件实例方法 */ +export interface RangeInputInstanceFunctions { + /** + * 使其中一个输入框失去焦点 + */ + blur?: (options?: { position?: RangeInputPosition }) => void; + /** + * 使其中一个输入框获得焦点 + */ + focus?: (options?: { position?: RangeInputPosition }) => void; + /** + * 使其中一个输入框选中内容 + */ + select?: (options?: { position?: RangeInputPosition }) => void; +} + export interface TdRangeInputPopupProps { /** * 宽度随内容自适应 @@ -36,7 +179,7 @@ export interface TdRangeInputPopupProps { */ panel?: string | TNode; /** - * 透传 Popup 浮层组件全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** @@ -70,6 +213,10 @@ export interface TdRangeInputPopupProps { onPopupVisibleChange?: (visible: boolean, context: PopupVisibleChangeContext) => void; } +export type RangeInputValue = Array; + +export type RangeInputPosition = 'first' | 'second' | 'all'; + export type RangeInputValueChangeContext = { e?: InputEvent | MouseEvent; trigger?: 'input' | 'clear'; diff --git a/packages/products/tdesign-vue/src/select-input/props.ts b/packages/products/tdesign-vue/src/select-input/props.ts index 095c21f0a..5dc28201b 100644 --- a/packages/products/tdesign-vue/src/select-input/props.ts +++ b/packages/products/tdesign-vue/src/select-input/props.ts @@ -65,7 +65,7 @@ export default { type: String, default: '', }, - /** 透传 Popup 浮层组件全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/select-input/select-input.md b/packages/products/tdesign-vue/src/select-input/select-input.md index a7d6c6916..96f077ca7 100644 --- a/packages/products/tdesign-vue/src/select-input/select-input.md +++ b/packages/products/tdesign-vue/src/select-input/select-input.md @@ -23,7 +23,7 @@ minCollapsedNum | Number | 0 | 最小折叠数量,用于标签数量过多的 multiple | Boolean | false | 是否为多选模式,默认为单选 | N panel | String / Slot / Function | - | 下拉框内容,可完全自定义。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N placeholder | String | - | 占位符 | N -popupProps | Object | - | 透传 Popup 浮层组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/select-input/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/select-input/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框。支持语法糖 `.sync` | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N prefixIcon | Slot / Function | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue/src/select-input/type.ts b/packages/products/tdesign-vue/src/select-input/type.ts index 758b12781..69f11713f 100644 --- a/packages/products/tdesign-vue/src/select-input/type.ts +++ b/packages/products/tdesign-vue/src/select-input/type.ts @@ -95,7 +95,7 @@ export interface TdSelectInputProps { */ placeholder?: string; /** - * 透传 Popup 浮层组件全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue/src/select/props.ts b/packages/products/tdesign-vue/src/select/props.ts index 221a34eb7..f99a734ed 100644 --- a/packages/products/tdesign-vue/src/select/props.ts +++ b/packages/products/tdesign-vue/src/select/props.ts @@ -97,7 +97,7 @@ export default { type: String, default: undefined, }, - /** 透传给 popup 组件的全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/select/select.md b/packages/products/tdesign-vue/src/select/select.md index edda9a10b..79c0c1a5f 100644 --- a/packages/products/tdesign-vue/src/select/select.md +++ b/packages/products/tdesign-vue/src/select/select.md @@ -31,7 +31,7 @@ optionsLayout | String | vertical | 下拉选项布局方式,有纵向排列 panelBottomContent | String / Slot / Function | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 透传给 popup 组件的全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/select/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/select/type.ts) | N popupVisible | Boolean | - | 是否显示下拉框。支持语法糖 `.sync` | N defaultPopupVisible | Boolean | - | 是否显示下拉框。非受控属性 | N prefixIcon | Slot / Function | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue/src/select/type.ts b/packages/products/tdesign-vue/src/select/type.ts index 677b0a851..15e2cb59c 100644 --- a/packages/products/tdesign-vue/src/select/type.ts +++ b/packages/products/tdesign-vue/src/select/type.ts @@ -130,7 +130,7 @@ export interface TdSelectProps { */ placeholder?: string; /** - * 透传给 popup 组件的全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue/src/sticky-tool/props.ts b/packages/products/tdesign-vue/src/sticky-tool/props.ts index 8ef42ef15..6186968d5 100644 --- a/packages/products/tdesign-vue/src/sticky-tool/props.ts +++ b/packages/products/tdesign-vue/src/sticky-tool/props.ts @@ -26,7 +26,7 @@ export default { return ['right-top', 'right-center', 'right-bottom', 'left-top', 'left-center', 'left-bottom'].includes(val); }, }, - /** 透传 Popup 组件全部特性,优先级低于 StickyItem.popupProps */ + /** 透传 Popup 组件全部属性,优先级低于 StickyItem.popupProps */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/sticky-tool/sticky-item-props.ts b/packages/products/tdesign-vue/src/sticky-tool/sticky-item-props.ts index 22331bf25..45c025c7d 100644 --- a/packages/products/tdesign-vue/src/sticky-tool/sticky-item-props.ts +++ b/packages/products/tdesign-vue/src/sticky-tool/sticky-item-props.ts @@ -20,7 +20,7 @@ export default { popup: { type: [String, Function] as PropType, }, - /** 透传浮层组件全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/sticky-tool/sticky-tool.en-US.md b/packages/products/tdesign-vue/src/sticky-tool/sticky-tool.en-US.md index 040549870..6c5125e47 100644 --- a/packages/products/tdesign-vue/src/sticky-tool/sticky-tool.en-US.md +++ b/packages/products/tdesign-vue/src/sticky-tool/sticky-tool.en-US.md @@ -1,16 +1,17 @@ :: BASE_DOC :: ## API + ### StickyTool Props name | type | default | description | required -- | -- | -- | -- | -- list | Array | [] | Typescript:`Array` | N offset | Array | - | Typescript:`Array` | N -placement | String | right-bottom | options:right-top/right-center/right-bottom/left-top/left-center/left-bottom | N +placement | String | right-bottom | options: right-top/right-center/right-bottom/left-top/left-center/left-bottom | N popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/sticky-tool/type.ts) | N -shape | String | square | stickytool shape。options:square/round | N -type | String | normal | stickytool type。options:normal/compact | N +shape | String | square | stickytool shape。options: square/round | N +type | String | normal | stickytool type。options: normal/compact | N width | String / Number | - | \- | N onClick | Function | | Typescript:`(context: { e: MouseEvent; item: TdStickyItemProps }) => void`
| N onHover | Function | | Typescript:`(context: { e: MouseEvent; item: TdStickyItemProps }) => void`
| N @@ -22,6 +23,7 @@ name | params | description click | `(context: { e: MouseEvent; item: TdStickyItemProps })` | \- hover | `(context: { e: MouseEvent; item: TdStickyItemProps })` | \- + ### StickyItem Props name | type | default | description | required @@ -30,4 +32,4 @@ icon | Slot / Function | - | Typescript:`TNode`。[see more ts definition](htt label | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N popup | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/sticky-tool/type.ts) | N -trigger | String | hover | options:hover/click | N +trigger | String | hover | options: hover/click | N diff --git a/packages/products/tdesign-vue/src/sticky-tool/sticky-tool.md b/packages/products/tdesign-vue/src/sticky-tool/sticky-tool.md index f4c613e6f..c7dcacf01 100644 --- a/packages/products/tdesign-vue/src/sticky-tool/sticky-tool.md +++ b/packages/products/tdesign-vue/src/sticky-tool/sticky-tool.md @@ -1,14 +1,15 @@ :: BASE_DOC :: ## API + ### StickyTool Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- list | Array | [] | 列表。TS 类型:`Array` | N offset | Array | - | 相对于 placement 的偏移量,示例:[-10, 20] 或 ['10em', '8rem']。TS 类型:`Array` | N placement | String | right-bottom | 固定位置。可选项:right-top/right-center/right-bottom/left-top/left-center/left-bottom | N -popupProps | Object | - | 透传 Popup 组件全部特性,优先级低于 StickyItem.popupProps。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/sticky-tool/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性,优先级低于 StickyItem.popupProps。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/sticky-tool/type.ts) | N shape | String | square | 侧边栏菜单形状,有 2 种:方形、圆形。可选项:square/round | N type | String | normal | 侧边栏菜单类型,有 2 种:常规型和紧凑型。可选项:normal/compact | N width | String / Number | - | 宽度 | N @@ -22,12 +23,13 @@ onHover | Function | | TS 类型:`(context: { e: MouseEvent; item: TdStickyIt click | `(context: { e: MouseEvent; item: TdStickyItemProps })` | 点击某一项时触发 hover | `(context: { e: MouseEvent; item: TdStickyItemProps })` | 悬浮到某一项时触发 + ### StickyItem Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- icon | Slot / Function | - | 图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N label | String / Slot / Function | - | 名称。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N popup | String / Slot / Function | - | 浮层内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N -popupProps | Object | - | 透传浮层组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/sticky-tool/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/sticky-tool/type.ts) | N trigger | String | hover | 触发浮层显示的方式。可选项:hover/click | N diff --git a/packages/products/tdesign-vue/src/sticky-tool/type.ts b/packages/products/tdesign-vue/src/sticky-tool/type.ts index 3d21d7e98..4adcb37cb 100644 --- a/packages/products/tdesign-vue/src/sticky-tool/type.ts +++ b/packages/products/tdesign-vue/src/sticky-tool/type.ts @@ -23,7 +23,7 @@ export interface TdStickyToolProps { */ placement?: 'right-top' | 'right-center' | 'right-bottom' | 'left-top' | 'left-center' | 'left-bottom'; /** - * 透传 Popup 组件全部特性,优先级低于 StickyItem.popupProps + * 透传 Popup 组件全部属性,优先级低于 StickyItem.popupProps */ popupProps?: PopupProps; /** @@ -64,7 +64,7 @@ export interface TdStickyItemProps { */ popup?: string | TNode; /** - * 透传浮层组件全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue/src/time-picker/props.ts b/packages/products/tdesign-vue/src/time-picker/props.ts index ba67885e7..5fb0da3a9 100644 --- a/packages/products/tdesign-vue/src/time-picker/props.ts +++ b/packages/products/tdesign-vue/src/time-picker/props.ts @@ -46,7 +46,7 @@ export default { type: String, default: undefined, }, - /** 透传给 popup 组件的参数 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/time-picker/time-picker.md b/packages/products/tdesign-vue/src/time-picker/time-picker.md index f23dcb6b3..3299f6a9a 100644 --- a/packages/products/tdesign-vue/src/time-picker/time-picker.md +++ b/packages/products/tdesign-vue/src/time-picker/time-picker.md @@ -16,7 +16,7 @@ hideDisabledTime | Boolean | true | 是否隐藏禁用状态的时间项 | N inputProps | Object | - | 透传给输入框(Input)组件的参数。TS 类型:`InputProps`,[Input API Documents](./input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/time-picker/type.ts) | N label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/time-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/time-picker/type.ts) | N presets | Object | - | 预设快捷时间选择,示例:`{ '前一小时': '11:00:00' }`。TS 类型:`PresetTime` `interface PresetTime { [presetName: string]: TimePickerValue \| (() => TimePickerValue) }`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/time-picker/type.ts) | N selectInputProps | Object | - | 透传 SelectInput 筛选器输入框组件的全部属性。TS 类型:`SelectInputProps`,[SelectInput API Documents](./select-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/time-picker/type.ts) | N size | String | medium | 尺寸。可选项:small/medium/large | N @@ -61,7 +61,7 @@ format | String | HH:mm:ss | 用于格式化时间,[详细文档](https://day. hideDisabledTime | Boolean | true | 是否隐藏禁用状态的时间项 | N label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N placeholder | String / Array | undefined | 占位符,值为数组表示可分别为开始日期和结束日期设置占位符。TS 类型:`string \| Array` | N -popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/time-picker/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/time-picker/type.ts) | N presets | Object | - | 预设快捷时间范围选择,示例:{ '下午': ['13:00:00', '18:00:00'] }。TS 类型:`PresetTimeRange` `interface PresetTimeRange { [presetRageName: string]: TimeRangeValue \| (() => TimeRangeValue)}`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/time-picker/type.ts) | N rangeInputProps | Object | - | 透传给范围输入框 RangeInput 组件的参数。TS 类型:`RangeInputProps`,[RangeInput API Documents](./range-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/time-picker/type.ts) | N size | String | medium | 尺寸。可选项:small/medium/large | N diff --git a/packages/products/tdesign-vue/src/time-picker/time-range-picker-props.ts b/packages/products/tdesign-vue/src/time-picker/time-range-picker-props.ts index e298eb29d..4bbe9da7e 100644 --- a/packages/products/tdesign-vue/src/time-picker/time-range-picker-props.ts +++ b/packages/products/tdesign-vue/src/time-picker/time-range-picker-props.ts @@ -47,7 +47,7 @@ export default { type: [String, Array] as PropType, default: undefined, }, - /** 透传给 popup 组件的参数 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/time-picker/type.ts b/packages/products/tdesign-vue/src/time-picker/type.ts index f5e6651b1..8b0a10678 100644 --- a/packages/products/tdesign-vue/src/time-picker/type.ts +++ b/packages/products/tdesign-vue/src/time-picker/type.ts @@ -63,7 +63,7 @@ export interface TdTimePickerProps { */ placeholder?: string; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** @@ -191,7 +191,7 @@ export interface TdTimeRangePickerProps { */ placeholder?: string | Array; /** - * 透传给 popup 组件的参数 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue/src/tree-select/props.ts b/packages/products/tdesign-vue/src/tree-select/props.ts index 38ccf2e37..d85cd6576 100644 --- a/packages/products/tdesign-vue/src/tree-select/props.ts +++ b/packages/products/tdesign-vue/src/tree-select/props.ts @@ -91,7 +91,7 @@ export default { type: String, default: undefined, }, - /** 透传给 popup 组件的全部属性 */ + /** 透传 Popup 组件全部属性 */ popupProps: { type: Object as PropType, }, diff --git a/packages/products/tdesign-vue/src/tree-select/tree-select.md b/packages/products/tdesign-vue/src/tree-select/tree-select.md index 66b33d2d6..22b628365 100644 --- a/packages/products/tdesign-vue/src/tree-select/tree-select.md +++ b/packages/products/tdesign-vue/src/tree-select/tree-select.md @@ -29,7 +29,7 @@ multiple | Boolean | false | 是否允许多选 | N panelBottomContent | String / Slot / Function | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N panelTopContent | String / Slot / Function | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N placeholder | String | undefined | 占位符 | N -popupProps | Object | - | 透传给 popup 组件的全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/tree-select/type.ts) | N +popupProps | Object | - | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/tree-select/type.ts) | N popupVisible | Boolean | undefined | 是否显示下拉框。支持语法糖 `.sync` | N defaultPopupVisible | Boolean | undefined | 是否显示下拉框。非受控属性 | N prefixIcon | Slot / Function | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue/src/tree-select/type.ts b/packages/products/tdesign-vue/src/tree-select/type.ts index afe25676f..4b14a9228 100644 --- a/packages/products/tdesign-vue/src/tree-select/type.ts +++ b/packages/products/tdesign-vue/src/tree-select/type.ts @@ -124,7 +124,7 @@ export interface TdTreeSelectProps< */ placeholder?: string; /** - * 透传给 popup 组件的全部属性 + * 透传 Popup 组件全部属性 */ popupProps?: PopupProps; /** diff --git a/packages/products/tdesign-vue/src/upload/props.ts b/packages/products/tdesign-vue/src/upload/props.ts index a63840e20..974c2cb9d 100644 --- a/packages/products/tdesign-vue/src/upload/props.ts +++ b/packages/products/tdesign-vue/src/upload/props.ts @@ -49,7 +49,7 @@ export default { default: { type: [String, Function] as PropType, }, - /** 是否禁用 */ + /** 是否禁用组件 */ disabled: { type: Boolean, default: undefined, @@ -93,6 +93,10 @@ export default { headers: { type: Object as PropType, }, + /** 用于在上传图片场景下,透传属性配置至 Image 组件 */ + imageProps: { + type: Object as PropType, + }, /** 透传图片预览组件全部属性 */ imageViewerProps: { type: Object as PropType, @@ -197,7 +201,7 @@ export default { type: Boolean, default: true, }, - /** 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传。 */ + /** 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传 */ useMockProgress: { type: Boolean, default: true, diff --git a/packages/products/tdesign-vue/src/upload/type.ts b/packages/products/tdesign-vue/src/upload/type.ts index be27ad599..047569751 100644 --- a/packages/products/tdesign-vue/src/upload/type.ts +++ b/packages/products/tdesign-vue/src/upload/type.ts @@ -58,7 +58,7 @@ export interface TdUploadProps { */ default?: string | TNode; /** - * 是否禁用 + * 是否禁用组件 */ disabled?: boolean; /** @@ -99,6 +99,10 @@ export interface TdUploadProps { * 设置上传的请求头部,`action` 存在时有效 */ headers?: { [key: string]: string }; + /** + * 用于在上传图片场景下,透传属性配置至 Image 组件 + */ + imageProps?: object; /** * 透传图片预览组件全部属性 */ @@ -207,7 +211,7 @@ export interface TdUploadProps { */ uploadPastedFiles?: boolean; /** - * 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传。 + * 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传 * @default true */ useMockProgress?: boolean; diff --git a/packages/products/tdesign-vue/src/upload/upload.en-US.md b/packages/products/tdesign-vue/src/upload/upload.en-US.md index c09de120b..4eea116cd 100644 --- a/packages/products/tdesign-vue/src/upload/upload.en-US.md +++ b/packages/products/tdesign-vue/src/upload/upload.en-US.md @@ -26,6 +26,7 @@ format | Function | - | to redefine `UploadFile` data structure。Typescript: formatRequest | Function | - | redefine request data。Typescript:`(requestData: { [key: string]: any }) => { [key: string]: any }` | N formatResponse | Function | - | redefine response data structure。Typescript:`(response: any, context: FormatResponseContext) => ResponseType ` `type ResponseType = { error?: string; url?: string; status?: 'fail' \| 'success'; files?: UploadFile[] } & Record` `interface FormatResponseContext { file: UploadFile; currentFiles?: UploadFile[] }`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/upload/type.ts) | N headers | Object | - | HTTP Request Header。Typescript:`{[key: string]: string}` | N +imageProps | Object | - | \- | N imageViewerProps | Object | - | ImageViewer Component Props。Typescript:`ImageViewerProps`,[ImageViewer API Documents](./image-viewer?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/upload/type.ts) | N inputAttributes | Object | - | add attributes to HTML element `input`。Typescript:`CSSProperties` | N isBatchUpload | Boolean | false | make all files to be a whole package, files can only be replaced or deleted together, can not add more files | N diff --git a/packages/products/tdesign-vue/src/upload/upload.md b/packages/products/tdesign-vue/src/upload/upload.md index 16a463086..7f49bdf13 100644 --- a/packages/products/tdesign-vue/src/upload/upload.md +++ b/packages/products/tdesign-vue/src/upload/upload.md @@ -16,7 +16,7 @@ beforeUpload | Function | - | 如果是自动上传模式 `autoUpload=true`, cancelUploadButton | Object / Slot / Function | - | 批量文件/图片上传,`autoUpload=false` 场景下,透传“取消上传”按钮属性。TS 类型:`null \| ButtonProps \| TNode<{ disabled: boolean; cancelUploadText: string; cancelUpload: (ctx: { e: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N data | Object | - | 上传请求所需的额外字段,默认字段有 `file`,表示文件信息。可以添加额外的文件名字段,如:`{file_name: "custom-file-name.txt"}`。`autoUpload=true` 时有效。也可以使用 `formatRequest` 完全自定义上传请求的字段。TS 类型:`Record \| ((files: UploadFile[]) => Record)` | N default | String / Slot / Function | - | 非拖拽场景,指触发上传的元素,如:“选择文件”。如果是拖拽场景,则是指拖拽区域。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N -disabled | Boolean | undefined | 是否禁用 | N +disabled | Boolean | undefined | 是否禁用组件 | N dragContent | String / Slot / Function | - | 用于自定义拖拽区域,`theme=custom` 且 `draggable=true` 时有效。TS 类型:`TNode \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N draggable | Boolean | undefined | 是否启用拖拽上传,不同的组件风格默认值不同。`theme=file` 或 `theme=image` 时有效 | N fileListDisplay | Slot / Function | - | 用于完全自定义文件列表界面内容(UI),单文件和多文件均有效。TS 类型:`TNode<{ files: UploadFile[]; dragEvents?: UploadDisplayDragEvents }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N @@ -26,6 +26,7 @@ format | Function | - | 转换文件 `UploadFile` 的数据结构,可新增或 formatRequest | Function | - | 用于新增或修改文件上传请求 参数。`action` 存在时有效。一个请求上传一个文件时,默认请求字段有 `file`。
一个请求上传多个文件时,默认字段有 `file[0]/file[1]/file[2]/.../length`,其中 `length` 表示本次上传的文件数量。
⚠️非常注意,此处的 `file[0]/file[1]` 仅仅是一个字段名,并非表示 `file` 是一个数组,接口获取字段时注意区分。
可以使用 `name` 定义 `file` 字段的别名。
也可以使用 `formatRequest` 自定义任意字段,如添加一个字段 `fileList` ,存储文件数组。TS 类型:`(requestData: { [key: string]: any }) => { [key: string]: any }` | N formatResponse | Function | - | 用于格式化文件上传后的接口响应数据,`response` 便是接口响应的原始数据。`action` 存在时有效。
示例返回值:`{ error, url, status, files }`
此函数的返回值 `error` 会作为错误文本提醒,表示上传失败的原因,如果存在会判定为本次上传失败。
此函数的返回值 `url` 会作为单个文件上传成功后的链接。
`files` 表示一个请求同时上传多个文件后的文件列表。TS 类型:`(response: any, context: FormatResponseContext) => ResponseType ` `type ResponseType = { error?: string; url?: string; status?: 'fail' \| 'success'; files?: UploadFile[] } & Record` `interface FormatResponseContext { file: UploadFile; currentFiles?: UploadFile[] }`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/upload/type.ts) | N headers | Object | - | 设置上传的请求头部,`action` 存在时有效。TS 类型:`{[key: string]: string}` | N +imageProps | Object | - | 用于在上传图片场景下,透传属性配置至 Image 组件 | N imageViewerProps | Object | - | 透传图片预览组件全部属性。TS 类型:`ImageViewerProps`,[ImageViewer API Documents](./image-viewer?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/upload/type.ts) | N inputAttributes | Object | - | 用于添加属性到 HTML 元素 `input`。TS 类型:`CSSProperties` | N isBatchUpload | Boolean | false | 多个文件是否作为一个独立文件包,整体替换,整体删除。不允许追加文件,只允许替换文件。`theme=file-flow` 时有效 | N @@ -49,7 +50,7 @@ triggerButtonProps | Object | - | 透传选择按钮全部属性。TS 类型:` uploadAllFilesInOneRequest | Boolean | false | 是否在同一个请求中上传全部文件,默认一个请求上传一个文件。多文件上传时有效 | N uploadButton | Object / Slot / Function | - | 批量文件/图片上传,`autoUpload=false` 场景下,透传“点击上传”按钮属性。TS 类型:`null \| ButtonProps \| TNode<{ disabled: boolean; uploading: boolean; uploadFiles: () => void; uploadText: string }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N uploadPastedFiles | Boolean | true | 是否允许粘贴上传剪贴板中的文件 | N -useMockProgress | Boolean | true | 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传。 | N +useMockProgress | Boolean | true | 是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传 | N value | Array | [] | 已上传文件列表,同 `files`。TS 类型:`UploadFile`。支持语法糖 `v-model`。TS 类型:`Array` | N defaultValue | Array | [] | 已上传文件列表,同 `files`。TS 类型:`UploadFile`。非受控属性。TS 类型:`Array` | N withCredentials | Boolean | false | 上传请求时是否携带 cookie | N diff --git a/packages/scripts/api.json b/packages/scripts/api.json index 2336261e5..a0b59fbc5 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -2277,6 +2277,9 @@ { "id": 1712054580, "platform_framework": [ + "8", + "16", + "32", "64" ], "component": "ActionSheet", @@ -2287,7 +2290,7 @@ ], "field_default_value": "{}", "field_enum": "", - "field_desc_zh": "popupProps透传", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -2305,6 +2308,9 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)", "Miniprogram" ], "field_type_text": [ @@ -2357,6 +2363,9 @@ { "id": 1712054606, "platform_framework": [ + "8", + "16", + "32", "64" ], "component": "ActionSheet", @@ -2385,6 +2394,9 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)", "Miniprogram" ], "field_type_text": [ @@ -3273,10 +3285,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32", - "64" + "4" ], "component": "Alert", "field_category": 1, @@ -3308,10 +3317,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(PC)" ], "field_type_text": [ "String", @@ -3404,10 +3410,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32", - "64" + "4" ], "component": "Alert", "field_category": 1, @@ -3437,10 +3440,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(PC)" ], "field_type_text": [ "Number" @@ -3451,10 +3451,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32", - "64" + "4" ], "component": "Alert", "field_category": 1, @@ -3485,10 +3482,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(PC)" ], "field_type_text": [ "String", @@ -3500,10 +3494,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32", - "64" + "4" ], "component": "Alert", "field_category": 1, @@ -3533,10 +3524,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(PC)" ], "field_type_text": [ "TNode" @@ -3547,10 +3535,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32", - "64" + "4" ], "component": "Alert", "field_category": 1, @@ -3580,10 +3565,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(PC)" ], "field_type_text": [ "String" @@ -3594,10 +3576,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32", - "64" + "4" ], "component": "Alert", "field_category": 1, @@ -3628,10 +3607,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(PC)" ], "field_type_text": [ "String", @@ -3643,10 +3619,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32", - "64" + "4" ], "component": "Alert", "field_category": 2, @@ -3674,10 +3647,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(PC)" ], "field_type_text": [] }, @@ -3686,10 +3656,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32", - "64" + "4" ], "component": "Alert", "field_category": 2, @@ -3717,10 +3684,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(PC)" ], "field_type_text": [] }, @@ -5164,7 +5128,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传 Popup 组件全部特性", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -7751,43 +7715,6 @@ "String" ] }, - { - "id": 3096, - "platform_framework": [ - "64" - ], - "component": "BackTop", - "field_category": 1, - "field_name": "style", - "field_type": [ - "1" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "自定义组件样式", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-10-31 11:44:26", - "update_time": "2022-10-31 11:44:26", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "String" - ] - }, { "id": 2336, "platform_framework": [ @@ -8616,43 +8543,6 @@ "Boolean" ] }, - { - "id": 1797, - "platform_framework": [ - "64" - ], - "component": "Badge", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,分别用于设置外层元素、默认内容、右上角内容等元素类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-09-27 02:30:53", - "update_time": "2021-09-27 02:31:46", - "event_output": null, - "custom_field_type": "['t-class', 't-class-content', 't-class-count']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 897, "platform_framework": [ @@ -14962,43 +14852,6 @@ "String" ] }, - { - "id": 3043, - "platform_framework": [ - "64" - ], - "component": "Button", - "field_category": 1, - "field_name": "style", - "field_type": [ - "1" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "自定义组件样式", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-10-31 11:07:49", - "update_time": "2022-10-31 11:07:49", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "String" - ] - }, { "id": 2831, "platform_framework": [ @@ -21165,7 +21018,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "参考 popup 组件 API", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -23848,80 +23701,6 @@ "Boolean" ] }, - { - "id": 1370, - "platform_framework": [ - "64" - ], - "component": "CellGroup", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-07-25 09:20:51", - "update_time": "2021-07-25 09:20:51", - "event_output": null, - "custom_field_type": "['t-class']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": null, - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, - { - "id": 3047, - "platform_framework": [ - "64" - ], - "component": "CellGroup", - "field_category": 1, - "field_name": "style", - "field_type": [ - "1" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "自定义组件样式", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-10-31 11:24:16", - "update_time": "2022-10-31 11:24:16", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "String" - ] - }, { "id": 3427, "platform_framework": [ @@ -28539,43 +28318,6 @@ "TNode" ] }, - { - "id": 2725, - "platform_framework": [ - "64" - ], - "component": "CollapsePanel", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,用于组件外层元素、标题、内容", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-05-31 03:26:48", - "update_time": "2022-05-31 03:26:48", - "event_output": null, - "custom_field_type": "['t-class', 't-class-header', 't-class-content']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 1679, "platform_framework": [ @@ -29594,7 +29336,7 @@ ], "field_default_value": "{}", "field_enum": "", - "field_desc_zh": "popupProps透传", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -31908,7 +31650,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传给 popup 组件的参数", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -34691,7 +34433,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传给 popup 组件的参数", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -36051,43 +35793,6 @@ "Number" ] }, - { - "id": 1658, - "platform_framework": [ - "64" - ], - "component": "DateTimePicker", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,分别用于设置组件外层元素、确认按钮、取消按钮、标题等元素类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-09-09 13:48:12", - "update_time": "2021-09-09 13:48:12", - "event_output": null, - "custom_field_type": "['t-class', 't-class-confirm', 't-class-cancel', 't-class-title']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 1729774456, "platform_framework": [ @@ -36380,7 +36085,7 @@ ], "field_default_value": "{}", "field_enum": "", - "field_desc_zh": "透传 `Popup` 组件全部属性", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": "popup properties", "field_required": 0, "event_input": "", @@ -37330,43 +37035,6 @@ "Function" ] }, - { - "id": 1659, - "platform_framework": [ - "64" - ], - "component": "DateTimeRangePicker", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,分别用于设置组件外层元素、确认按钮、取消按钮、标题等元素类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-09-09 13:48:22", - "update_time": "2021-09-09 13:48:22", - "event_output": null, - "custom_field_type": "['t-class', 't-class-confirm', 't-class-cancel', 't-class-title']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 1577, "platform_framework": [ @@ -39556,43 +39224,6 @@ "Boolean" ] }, - { - "id": 1289, - "platform_framework": [ - "64" - ], - "component": "Dialog", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,分别用于设置 组件外层元素、组件内容部分、确认按钮、取消按钮 等元素类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-07-10 04:38:12", - "update_time": "2022-02-10 02:58:12", - "event_output": null, - "custom_field_type": "['t-class', 't-class-content', 't-class-confirm', 't-class-cancel']", - "syntactic_sugar": "", - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": null, - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 54, "platform_framework": [ @@ -39982,43 +39613,6 @@ "Boolean" ] }, - { - "id": 3097, - "platform_framework": [ - "64" - ], - "component": "Dialog", - "field_category": 1, - "field_name": "style", - "field_type": [ - "1" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "自定义组件样式", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-10-31 11:44:38", - "update_time": "2022-10-31 11:44:38", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "String" - ] - }, { "id": 715, "platform_framework": [ @@ -44911,7 +44505,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传 Popup 组件属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式", + "field_desc_zh": "透传 Popup 组件全部属性,方便更加自由地控制。比如使用 popupProps.overlayStyle 设置浮层样式", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -45189,43 +44783,6 @@ "Boolean" ] }, - { - "id": 3179, - "platform_framework": [ - "64" - ], - "component": "DropdownItem", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,分别用于设置 组件外层类名、菜单列、菜单列选项、菜单列选项标签、树形菜单、树形菜单列等类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-11-07 14:51:02", - "update_time": "2022-11-07 14:51:02", - "event_output": null, - "custom_field_type": "['t-class','t-class-content', 't-class-column', 't-class-column-item', 't-class-column-item-label', 't-class-footer']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 1724827990, "platform_framework": [ @@ -46784,43 +46341,6 @@ "TNode" ] }, - { - "id": 1388, - "platform_framework": [ - "64" - ], - "component": "Empty", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,分别用于设置 组件外层类名、文本描述类名、图片类名、操作按钮类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-08-01 14:37:53", - "update_time": "2021-09-29 06:49:17", - "event_output": null, - "custom_field_type": "['t-class', 't-class-description', 't-class-image', 't-class-actions']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": null, - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 1809, "platform_framework": [ @@ -58448,7 +57968,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传全部属性到 Popup 组件。`mode=popup` 时有效", + "field_desc_zh": "透传 Popup 组件全部属性。`mode=popup` 时有效", "field_desc_en": "Popup component props if `mode = popup`", "field_required": 0, "event_input": "", @@ -71421,43 +70941,6 @@ "Number" ] }, - { - "id": 1281, - "platform_framework": [ - "64" - ], - "component": "Loading", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,分别用于设置加载组件外层元素,加载组件文本,加载组件指示符,加载指示符内侧同心圆等元素类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-07-10 01:15:53", - "update_time": "2021-09-28 09:45:09", - "event_output": null, - "custom_field_type": "['t-class', 't-class-text', 't-class-indicator']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": null, - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 952, "platform_framework": [ @@ -71465,7 +70948,8 @@ "2", "4", "8", - "16" + "16", + "64" ], "component": "Loading", "field_category": 1, @@ -71488,7 +70972,7 @@ "html_attribute": 0, "trigger_elements": "", "deprecated": 0, - "version": null, + "version": "{\"Miniprogram\": \"1.8.5\"}", "test_description": null, "support_default_value": 0, "field_category_text": "Props", @@ -71497,7 +70981,8 @@ "React(PC)", "Angular(PC)", "Vue(Mobile)", - "React(Mobile)" + "React(Mobile)", + "Miniprogram" ], "field_type_text": [ "Boolean" @@ -80516,7 +80001,7 @@ ], "field_default_value": "{}", "field_enum": "", - "field_desc_zh": "透传 `Popup` 组件全部属性", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": "popup properties", "field_required": 0, "event_input": "", @@ -81267,10 +80752,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32", - "64" + "4" ], "component": "Popconfirm", "field_category": 1, @@ -81302,10 +80784,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(PC)" ], "field_type_text": [ "String", @@ -81492,7 +80971,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传 Popup 组件属性", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "(options: { e: MouseEvent })", @@ -81648,10 +81127,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32", - "64" + "4" ], "component": "Popconfirm", "field_category": 2, @@ -81679,10 +81155,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(PC)" ], "field_type_text": [] }, @@ -82777,43 +82250,6 @@ "Number" ] }, - { - "id": 1304, - "platform_framework": [ - "64" - ], - "component": "Popup", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,分别用于设置 组件外层元素、遮罩层、浮层内容 等元素类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-07-16 04:28:10", - "update_time": "2021-07-16 04:32:18", - "event_output": null, - "custom_field_type": "['t-class', 't-class-overlay', 't-class-content']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": null, - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 2250, "platform_framework": [ @@ -87159,43 +86595,6 @@ "Number" ] }, - { - "id": 3107, - "platform_framework": [ - "64" - ], - "component": "Progress", - "field_category": 1, - "field_name": "style", - "field_type": [ - "1" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "自定义组件样式", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-10-31 14:46:19", - "update_time": "2022-10-31 14:46:19", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "String" - ] - }, { "id": 920, "platform_framework": [ @@ -87522,43 +86921,6 @@ "Boolean" ] }, - { - "id": 1761, - "platform_framework": [ - "64" - ], - "component": "PullDownRefresh", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "加载loading样式", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-09-24 02:09:45", - "update_time": "2021-09-24 06:16:47", - "event_output": null, - "custom_field_type": "['t-class', 't-class-loading','t-class-text', 't-class-indicator']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 1712058324, "platform_framework": [ @@ -90435,8 +89797,8 @@ ], "field_default_value": "radio", "field_enum": "radio/button", - "field_desc_zh": "组件风格", - "field_desc_en": "component Style", + "field_desc_zh": "用于在使用 options 方式渲染时决定组件的风格", + "field_desc_en": "Determine the style of radio when using options API", "field_required": 0, "event_input": "", "create_time": "2024-12-28 17:06:22", @@ -92256,7 +91618,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传 Popup 浮层组件全部属性", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -96077,43 +95439,6 @@ "String" ] }, - { - "id": 3072, - "platform_framework": [ - "64" - ], - "component": "Search", - "field_category": 1, - "field_name": "style", - "field_type": [ - "1" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "自定义组件样式", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-10-31 11:37:50", - "update_time": "2022-10-31 11:37:50", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "String" - ] - }, { "id": 2858, "platform_framework": [ @@ -98357,7 +97682,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传给 popup 组件的全部属性", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -100409,7 +99734,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传 Popup 浮层组件全部属性", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -105237,43 +104562,6 @@ "Boolean" ] }, - { - "id": 1804, - "platform_framework": [ - "64" - ], - "component": "Stepper", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,分别用于表示组件外层元素、输入框、右侧递增号、左侧递减号等元素类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-09-28 03:54:10", - "update_time": "2021-11-10 05:56:48", - "event_output": null, - "custom_field_type": "['t-class', 't-class-input', 't-class-add', 't-class-minus']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 1503, "platform_framework": [ @@ -107148,7 +106436,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传浮层组件全部属性", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -107353,7 +106641,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传 Popup 组件全部特性,优先级低于 StickyItem.popupProps", + "field_desc_zh": "透传 Popup 组件全部属性,优先级低于 StickyItem.popupProps", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -107796,7 +107084,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传 Popup 组件全部特性", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": "Transparent all feature props of the Popup", "field_required": 0, "event_input": "", @@ -108242,43 +107530,6 @@ "TNode" ] }, - { - "id": 3109, - "platform_framework": [ - "64" - ], - "component": "SwipeCell", - "field_category": 1, - "field_name": "style", - "field_type": [ - "1" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "自定义组件样式", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-10-31 14:53:18", - "update_time": "2022-10-31 14:53:18", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "String" - ] - }, { "id": 2299, "platform_framework": [ @@ -110425,43 +109676,6 @@ "Number" ] }, - { - "id": 3092, - "platform_framework": [ - "64" - ], - "component": "SwiperNavigation", - "field_category": 1, - "field_name": "customStyle", - "field_type": [ - "1" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "自定义组件样式", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-10-31 11:42:57", - "update_time": "2022-10-31 11:42:57", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "{\"Miniprogram\": \"0.25.0\"}", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "String" - ] - }, { "id": 3251, "platform_framework": [ @@ -111888,43 +111102,6 @@ "TNode" ] }, - { - "id": 1434, - "platform_framework": [ - "64" - ], - "component": "TabBar", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,用于设置外层元素类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-08-12 03:10:09", - "update_time": "2021-08-12 03:10:09", - "event_output": null, - "custom_field_type": "['t-class']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": null, - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 1376, "platform_framework": [ @@ -112861,7 +112038,8 @@ "4", "8", "16", - "32" + "32", + "64" ], "component": "TabPanel", "field_category": 1, @@ -112894,7 +112072,8 @@ "Angular(PC)", "Vue(Mobile)", "React(Mobile)", - "Angular(Mobile)" + "Angular(Mobile)", + "Miniprogram" ], "field_type_text": [ "Boolean" @@ -116178,7 +115357,8 @@ "id": 1712570553, "platform_framework": [ "8", - "16" + "16", + "64" ], "component": "Tabs", "field_category": 1, @@ -116207,7 +115387,8 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(Mobile)", - "React(Mobile)" + "React(Mobile)", + "Miniprogram" ], "field_type_text": [ "String" @@ -116332,43 +115513,6 @@ "Boolean" ] }, - { - "id": 1320, - "platform_framework": [ - "64" - ], - "component": "Tabs", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,分别用于设置 组件外层元素、选项卡单项、选项卡激活态、滚动条样式类名 等类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2021-07-16 05:59:12", - "update_time": "2022-03-04 06:18:14", - "event_output": null, - "custom_field_type": "['t-class', 't-class-item', 't-class-active', 't-class-track']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": null, - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 1312, "platform_framework": [ @@ -117774,43 +116918,6 @@ "Boolean" ] }, - { - "id": 2390, - "platform_framework": [ - "64" - ], - "component": "Tag", - "field_category": 1, - "field_name": "externalClasses", - "field_type": [ - "16" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "组件类名,用于设置 组件外层元素元素类名", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2022-03-08 03:16:23", - "update_time": "2022-03-08 03:16:23", - "event_output": null, - "custom_field_type": "['t-class']", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Miniprogram" - ], - "field_type_text": [ - "Array" - ] - }, { "id": 25, "platform_framework": [ @@ -122733,7 +121840,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传给 popup 组件的参数", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -123986,7 +123093,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传给 popup 组件的参数", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -133359,7 +132466,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传给 popup 组件的全部属性", + "field_desc_zh": "透传 Popup 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -136670,6 +135777,47 @@ "Object" ] }, + { + "id": 1736168020, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Upload", + "field_category": 1, + "field_name": "imageProps", + "field_type": [ + "8" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "用于在上传图片场景下,透传属性配置至 Image 组件", + "field_desc_en": null, + "field_required": 0, + "event_input": "", + "create_time": "2025-01-06 12:53:40", + "update_time": "2025-01-06 12:53:40", + "event_output": null, + "custom_field_type": null, + "syntactic_sugar": null, + "readonly": 1, + "html_attribute": 0, + "trigger_elements": "", + "deprecated": 0, + "version": "", + "test_description": null, + "support_default_value": 0, + "field_category_text": "Props", + "platform_framework_text": [ + "Vue(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Object" + ] + }, { "id": 1699169820, "platform_framework": [ diff --git a/packages/scripts/config/files-combine.js b/packages/scripts/config/files-combine.js index 92e141285..aa3bac97a 100644 --- a/packages/scripts/config/files-combine.js +++ b/packages/scripts/config/files-combine.js @@ -90,10 +90,7 @@ const MOBILE_FRAMES = ['Vue(Mobile)', 'React(Mobile)', 'Miniprogram']; const COMPONENT_API_MD_MAP = { Avatar: ['Avatar', 'AvatarGroup'], Checkbox: ['Checkbox', 'CheckboxGroup'], - Cell: { - list: ['Cell', 'CellGroup'], - excludes: ['Miniprogram'], - }, + Cell: ['Cell', 'CellGroup'], Radio: ['Radio', 'RadioGroup'], Anchor: ['Anchor', 'AnchorItem', 'AnchorTarget'], Descriptions: ['Descriptions', 'DescriptionItem'], @@ -130,10 +127,7 @@ const COMPONENT_API_MD_MAP = { list: ['Dropdown', 'DropdownItem'], includes: ['Vue(PC)', 'VueNext(PC)', 'React(PC)', 'Angular(PC)'], }, - DropdownMenu: { - list: ['DropdownMenu', 'DropdownItem'], - excludes: ['Miniprogram'], - }, + DropdownMenu: ['DropdownMenu', 'DropdownItem'], Dialog: [ 'DialogCard', 'Dialog', @@ -211,9 +205,6 @@ const MOBILE_COMPONENT_API_MD_MAP = { Grid: { list: ['Grid', 'GridItem'], }, - DropdownMenu: { - list: ['DropdownMenu', 'DropdownItem'], - }, }; // 小程序 特殊组件