diff --git a/db/TDesign.db b/db/TDesign.db index 444592be0..ad930bb6e 100644 Binary files a/db/TDesign.db and b/db/TDesign.db differ diff --git a/packages/products/tdesign-react/src/cascader/cascader.md b/packages/products/tdesign-react/src/cascader/cascader.md index 5a78aecb9..5d5f31f90 100644 --- a/packages/products/tdesign-react/src/cascader/cascader.md +++ b/packages/products/tdesign-react/src/cascader/cascader.md @@ -13,7 +13,7 @@ borderless | Boolean | false | 无边框模式 | N checkProps | Object | - | 参考 checkbox 组件 API。TS 类型:`CheckboxProps`,[Checkbox API Documents](./checkbox?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/cascader/type.ts) | N checkStrictly | Boolean | false | 父子节点选中状态不再关联,可各自选中或取消 | N clearable | Boolean | false | 是否支持清空选项 | N -collapsedItems | TElement | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: CascaderOption[]; collapsedSelectedItems: CascaderOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +collapsedItems | TElement | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: CascaderOption[]; collapsedSelectedItems: CascaderOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用组件 | N empty | TNode | - | 无匹配选项时的内容,默认全局配置为 '暂无数据'。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N filter | Function | - | 自定义过滤方法,用于对现有数据进行搜索过滤,判断是否过滤某一项数据。TS 类型:`(filterWords: string, node: TreeNodeModel) => boolean \| Promise` | N diff --git a/packages/products/tdesign-react/src/select-input/select-input.en-US.md b/packages/products/tdesign-react/src/select-input/select-input.en-US.md index 10658bfa6..4647f1192 100644 --- a/packages/products/tdesign-react/src/select-input/select-input.en-US.md +++ b/packages/products/tdesign-react/src/select-input/select-input.en-US.md @@ -13,7 +13,7 @@ autoWidth | Boolean | false | \- | N autofocus | Boolean | false | \- | N borderless | Boolean | false | \- | N clearable | Boolean | false | \- | N -collapsedItems | TElement | - | Typescript:`TNode<{ value: SelectInputValue; collapsedTags: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +collapsedItems | TElement | - | Typescript:`TNode<{ value: SelectInputValue; collapsedSelectedItems: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N disabled | Boolean | - | \- | N inputProps | Object | - | Typescript:`InputProps`,[Input API Documents](./input?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/select-input/type.ts) | N inputValue | String / Number | - | input value。Typescript:`string` | N 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 f347e2fa0..97481ff27 100644 --- a/packages/products/tdesign-react/src/select-input/select-input.md +++ b/packages/products/tdesign-react/src/select-input/select-input.md @@ -13,7 +13,7 @@ autoWidth | Boolean | false | 宽度随内容自适应 | N autofocus | Boolean | false | 自动聚焦 | N borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否可清空 | N -collapsedItems | TElement | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 `collapsedItems` 自定义。`value` 表示所有标签值,`collapsedTags` 表示折叠标签值,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: SelectInputValue; collapsedTags: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +collapsedItems | TElement | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 `collapsedItems` 自定义。`value` 表示所有标签值,`collapsedSelectedItems` 表示折叠标签值,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: SelectInputValue; collapsedSelectedItems: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用 | N inputProps | Object | - | 透传 Input 输入框组件全部属性。TS 类型:`InputProps`,[Input API Documents](./input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select-input/type.ts) | N inputValue | String / Number | - | 输入框的值。TS 类型:`string` | N diff --git a/packages/products/tdesign-react/src/select/select.en-US.md b/packages/products/tdesign-react/src/select/select.en-US.md index dba7db564..ad723533e 100644 --- a/packages/products/tdesign-react/src/select/select.en-US.md +++ b/packages/products/tdesign-react/src/select/select.en-US.md @@ -1,17 +1,18 @@ :: BASE_DOC :: ## API + ### Select 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 autoWidth | Boolean | false | \- | N autofocus | Boolean | false | \- | N borderless | Boolean | false | \- | N clearable | Boolean | false | \- | N -collapsedItems | TElement | - | Typescript:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number, onClose: (index: number) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +collapsedItems | TElement | - | Typescript:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N creatable | Boolean | false | \- | N disabled | Boolean | - | \- | N empty | TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N @@ -63,12 +64,13 @@ onPopupVisibleChange | Function | | Typescript:`(visible: boolean, context: P onRemove | Function | | Typescript:`(options: SelectRemoveContext) => void`
[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/select/type.ts)。
`interface SelectRemoveContext { value: string \| number; data: T; e: MouseEvent \| KeyboardEvent }`
| N onSearch | Function | | Typescript:`(filterWords: string, context: { e: KeyboardEvent }) => void`
| N + ### Option 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 checkAll | Boolean | false | check all option, which can be both top of the panel and bottom of the panel | N children | TNode | - | Typescript:`string \| 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 @@ -77,12 +79,13 @@ label | String | - | \- | N title | String | - | \- | N value | String / Number | - | \- | N + ### OptionGroup 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 divider | Boolean | true | \- | N label | String | - | \- | N diff --git a/packages/products/tdesign-react/src/select/select.md b/packages/products/tdesign-react/src/select/select.md index 44ecdb4bf..a88a1ea5a 100644 --- a/packages/products/tdesign-react/src/select/select.md +++ b/packages/products/tdesign-react/src/select/select.md @@ -1,9 +1,10 @@ :: BASE_DOC :: ## API + ### Select Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N @@ -11,7 +12,7 @@ autoWidth | Boolean | false | 宽度随内容自适应 | N autofocus | Boolean | false | 自动聚焦 | N borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否可以清空选项 | N -collapsedItems | TElement | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,泛型 `T` 继承 `SelectOption`,表示选项数据;`count` 表示折叠的数量, `onClose` 表示移除标签。TS 类型:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number, onClose: (index: number) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +collapsedItems | TElement | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,泛型 `T` 继承 `SelectOption`,表示选项数据;`count` 表示折叠的数量, `onClose` 表示移除标签。TS 类型:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N creatable | Boolean | false | 是否允许用户创建新条目,需配合 filterable 使用 | N disabled | Boolean | - | 是否禁用组件 | N empty | TNode | - | 当下拉列表为空时显示的内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N @@ -63,9 +64,10 @@ onPopupVisibleChange | Function | | TS 类型:`(visible: boolean, context: Po onRemove | Function | | TS 类型:`(options: SelectRemoveContext) => void`
多选模式下,选中数据被移除时触发。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select/type.ts)。
`interface SelectRemoveContext { value: string \| number; data: T; e: MouseEvent \| KeyboardEvent }`
| N onSearch | Function | | TS 类型:`(filterWords: string, context: { e: KeyboardEvent }) => void`
输入值变化时,触发搜索事件。主要用于远程搜索新数据 | N + ### Option Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N @@ -77,9 +79,10 @@ label | String | - | 选项名称 | N title | String | - | 选项标题,在选项过长时hover选项展示 | N value | String / Number | - | 选项值 | N + ### OptionGroup Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N @@ -88,7 +91,7 @@ label | String | - | 分组别名 | N ### TScroll -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- bufferSize | Number | 20 | 表示除可视区域外,额外渲染的行数,避免快速滚动过程中,新出现的内容来不及渲染从而出现空白 | N isFixedRowHeight | Boolean | false | 表示每行内容是否同一个固定高度,仅在 `scroll.type` 为 `virtual` 时有效,该属性设置为 `true` 时,可用于简化虚拟滚动内部计算逻辑,提升性能,此时则需要明确指定 `scroll.rowHeight` 属性的值 | N diff --git a/packages/products/tdesign-react/src/tag-input/tag-input.en-US.md b/packages/products/tdesign-react/src/tag-input/tag-input.en-US.md index 286bae4b5..7d988a7db 100644 --- a/packages/products/tdesign-react/src/tag-input/tag-input.en-US.md +++ b/packages/products/tdesign-react/src/tag-input/tag-input.en-US.md @@ -10,7 +10,7 @@ className | String | - | className of component | N style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N autoWidth | Boolean | false | \- | N clearable | Boolean | false | \- | N -collapsedItems | TElement | - | Typescript:`TNode<{ value: TagInputValue; collapsedTags: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +collapsedItems | TElement | - | Typescript:`TNode<{ value: TagInputValue; collapsedSelectedItems: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N disabled | Boolean | - | \- | N dragSort | Boolean | false | \- | N excessTagsDisplayType | String | break-line | options: scroll/break-line | N diff --git a/packages/products/tdesign-react/src/tag-input/tag-input.md b/packages/products/tdesign-react/src/tag-input/tag-input.md index 2e74170e3..9fea6cba8 100644 --- a/packages/products/tdesign-react/src/tag-input/tag-input.md +++ b/packages/products/tdesign-react/src/tag-input/tag-input.md @@ -10,7 +10,7 @@ className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N autoWidth | Boolean | false | 宽度随内容自适应 | N clearable | Boolean | false | 是否可清空 | N -collapsedItems | TElement | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: TagInputValue; collapsedTags: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +collapsedItems | TElement | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: TagInputValue; collapsedSelectedItems: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用标签输入框 | N dragSort | Boolean | false | 拖拽调整标签顺序 | N excessTagsDisplayType | String | break-line | 标签超出时的呈现方式,有两种:横向滚动显示 和 换行显示。可选项:scroll/break-line | N 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 3d1a19236..e26aa84fb 100644 --- a/packages/products/tdesign-react/src/tree-select/tree-select.md +++ b/packages/products/tdesign-react/src/tree-select/tree-select.md @@ -12,7 +12,7 @@ autoWidth | Boolean | false | 宽度随内容自适应 | N autofocus | Boolean | false | 自动聚焦 | N borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否允许清空 | N -collapsedItems | TElement | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: DataOption[]; collapsedSelectedItems: DataOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +collapsedItems | TElement | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: DataOption[]; collapsedSelectedItems: DataOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N data | Array | [] | 树选择的数据列表。结构:`[{ label: TNode, value: string \| number, text: string, ... }]`,其中 `label` 表示选项呈现的内容,可自定义;`value` 表示选项的唯一值;表示当 `label` 用于选项复杂内容呈现时,`text` 用于搜索功能。
其中 `label` 和 `value` 可以使用 `keys` 属性定义别名。TS 类型:`Array` | N disabled | Boolean | - | 是否禁用组件 | N empty | TNode | - | 当下拉列表为空时显示的内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-vue-next/src/cascader/cascader.md b/packages/products/tdesign-vue-next/src/cascader/cascader.md index 5a545e522..f367c08b7 100644 --- a/packages/products/tdesign-vue-next/src/cascader/cascader.md +++ b/packages/products/tdesign-vue-next/src/cascader/cascader.md @@ -11,7 +11,7 @@ borderless | Boolean | false | 无边框模式 | N checkProps | Object | - | 参考 checkbox 组件 API。TS 类型:`CheckboxProps`,[Checkbox API Documents](./checkbox?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/cascader/type.ts) | N checkStrictly | Boolean | false | 父子节点选中状态不再关联,可各自选中或取消 | N clearable | Boolean | false | 是否支持清空选项 | N -collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: CascaderOption[]; collapsedSelectedItems: CascaderOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: CascaderOption[]; collapsedSelectedItems: CascaderOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用组件 | N empty | String / Slot / Function | - | 无匹配选项时的内容,默认全局配置为 '暂无数据'。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N filter | Function | - | 自定义过滤方法,用于对现有数据进行搜索过滤,判断是否过滤某一项数据。TS 类型:`(filterWords: string, node: TreeNodeModel) => boolean \| Promise` | N diff --git a/packages/products/tdesign-vue-next/src/select-input/select-input.en-US.md b/packages/products/tdesign-vue-next/src/select-input/select-input.en-US.md index 71e1e3172..1376a4733 100644 --- a/packages/products/tdesign-vue-next/src/select-input/select-input.en-US.md +++ b/packages/products/tdesign-vue-next/src/select-input/select-input.en-US.md @@ -11,7 +11,7 @@ autoWidth | Boolean | false | \- | N autofocus | Boolean | false | \- | N borderless | Boolean | false | \- | N clearable | Boolean | false | \- | N -collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: SelectInputValue; collapsedTags: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: SelectInputValue; collapsedSelectedItems: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N disabled | Boolean | - | \- | N inputProps | Object | - | Typescript:`InputProps`,[Input API Documents](./input?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/select-input/type.ts) | N inputValue | String / Number | - | input value。`v-model:inputValue` is supported。Typescript:`string` | N 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 dcfe1205f..809ad0604 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 @@ -11,7 +11,7 @@ autoWidth | Boolean | false | 宽度随内容自适应 | N autofocus | Boolean | false | 自动聚焦 | N borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否可清空 | N -collapsedItems | Slot / Function | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 `collapsedItems` 自定义。`value` 表示所有标签值,`collapsedTags` 表示折叠标签值,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: SelectInputValue; collapsedTags: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 `collapsedItems` 自定义。`value` 表示所有标签值,`collapsedSelectedItems` 表示折叠标签值,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: SelectInputValue; collapsedSelectedItems: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用 | N inputProps | Object | - | 透传 Input 输入框组件全部属性。TS 类型:`InputProps`,[Input API Documents](./input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/select-input/type.ts) | N inputValue | String / Number | - | 输入框的值。支持语法糖 `v-model:inputValue`。TS 类型:`string` | N diff --git a/packages/products/tdesign-vue-next/src/select/select.en-US.md b/packages/products/tdesign-vue-next/src/select/select.en-US.md index b67b2cc0c..e1a29034d 100644 --- a/packages/products/tdesign-vue-next/src/select/select.en-US.md +++ b/packages/products/tdesign-vue-next/src/select/select.en-US.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Select Props name | type | default | description | required @@ -9,7 +10,7 @@ autoWidth | Boolean | false | \- | N autofocus | Boolean | false | \- | N borderless | Boolean | false | \- | N clearable | Boolean | false | \- | N -collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number, onClose: (index: number) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N creatable | Boolean | false | \- | N disabled | Boolean | - | \- | N empty | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N @@ -76,6 +77,7 @@ popup-visible-change | `(visible: boolean, context: PopupVisibleChangeContext)` remove | `(options: SelectRemoveContext)` | [see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/select/type.ts)。
`interface SelectRemoveContext { value: string \| number; data: T; e: MouseEvent \| KeyboardEvent }`
search | `(filterWords: string, context: { e: KeyboardEvent })` | \- + ### Option Props name | type | default | description | required @@ -88,6 +90,7 @@ label | String | - | \- | N title | String | - | \- | N value | String / Number | - | \- | N + ### OptionGroup Props name | type | default | description | required diff --git a/packages/products/tdesign-vue-next/src/select/select.md b/packages/products/tdesign-vue-next/src/select/select.md index 61c82212e..449005a39 100644 --- a/packages/products/tdesign-vue-next/src/select/select.md +++ b/packages/products/tdesign-vue-next/src/select/select.md @@ -1,15 +1,16 @@ :: BASE_DOC :: ## API + ### Select Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- autoWidth | Boolean | false | 宽度随内容自适应 | N autofocus | Boolean | false | 自动聚焦 | N borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否可以清空选项 | N -collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,泛型 `T` 继承 `SelectOption`,表示选项数据;`count` 表示折叠的数量, `onClose` 表示移除标签。TS 类型:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number, onClose: (index: number) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,泛型 `T` 继承 `SelectOption`,表示选项数据;`count` 表示折叠的数量, `onClose` 表示移除标签。TS 类型:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N creatable | Boolean | false | 是否允许用户创建新条目,需配合 filterable 使用 | N disabled | Boolean | - | 是否禁用组件 | N empty | String / Slot / Function | - | 当下拉列表为空时显示的内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N @@ -76,9 +77,10 @@ popup-visible-change | `(visible: boolean, context: PopupVisibleChangeContext)` remove | `(options: SelectRemoveContext)` | 多选模式下,选中数据被移除时触发。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/select/type.ts)。
`interface SelectRemoveContext { value: string \| number; data: T; e: MouseEvent \| KeyboardEvent }`
search | `(filterWords: string, context: { e: KeyboardEvent })` | 输入值变化时,触发搜索事件。主要用于远程搜索新数据 + ### Option Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- checkAll | Boolean | false | 当前选项是否为全选,全选可以在顶部,也可以在底部。点击当前选项会选中禁用态除外的全部选项,即使是分组选择器也会选中全部选项 | N content | String / Slot / Function | - | 用于定义复杂的选项内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N @@ -88,16 +90,17 @@ label | String | - | 选项名称 | N title | String | - | 选项标题,在选项过长时hover选项展示 | N value | String / Number | - | 选项值 | N + ### OptionGroup Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- divider | Boolean | true | 是否显示分隔线 | N label | String | - | 分组别名 | N ### TScroll -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- bufferSize | Number | 20 | 表示除可视区域外,额外渲染的行数,避免快速滚动过程中,新出现的内容来不及渲染从而出现空白 | N isFixedRowHeight | Boolean | false | 表示每行内容是否同一个固定高度,仅在 `scroll.type` 为 `virtual` 时有效,该属性设置为 `true` 时,可用于简化虚拟滚动内部计算逻辑,提升性能,此时则需要明确指定 `scroll.rowHeight` 属性的值 | N diff --git a/packages/products/tdesign-vue-next/src/tag-input/tag-input.en-US.md b/packages/products/tdesign-vue-next/src/tag-input/tag-input.en-US.md index 3a4f35169..c986ae0fa 100644 --- a/packages/products/tdesign-vue-next/src/tag-input/tag-input.en-US.md +++ b/packages/products/tdesign-vue-next/src/tag-input/tag-input.en-US.md @@ -8,7 +8,7 @@ name | type | default | description | required -- | -- | -- | -- | -- autoWidth | Boolean | false | \- | N clearable | Boolean | false | \- | N -collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: TagInputValue; collapsedTags: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: TagInputValue; collapsedSelectedItems: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N disabled | Boolean | - | \- | N dragSort | Boolean | false | \- | N excessTagsDisplayType | String | break-line | options: scroll/break-line | N diff --git a/packages/products/tdesign-vue-next/src/tag-input/tag-input.md b/packages/products/tdesign-vue-next/src/tag-input/tag-input.md index 27b378d2b..f99017a26 100644 --- a/packages/products/tdesign-vue-next/src/tag-input/tag-input.md +++ b/packages/products/tdesign-vue-next/src/tag-input/tag-input.md @@ -8,7 +8,7 @@ -- | -- | -- | -- | -- autoWidth | Boolean | false | 宽度随内容自适应 | N clearable | Boolean | false | 是否可清空 | N -collapsedItems | Slot / Function | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: TagInputValue; collapsedTags: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: TagInputValue; collapsedSelectedItems: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用标签输入框 | N dragSort | Boolean | false | 拖拽调整标签顺序 | N excessTagsDisplayType | String | break-line | 标签超出时的呈现方式,有两种:横向滚动显示 和 换行显示。可选项:scroll/break-line | N 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 6f1450a50..3df8f30ff 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 @@ -10,7 +10,7 @@ autoWidth | Boolean | false | 宽度随内容自适应 | N autofocus | Boolean | false | 自动聚焦 | N borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否允许清空 | N -collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: DataOption[]; collapsedSelectedItems: DataOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: DataOption[]; collapsedSelectedItems: DataOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N data | Array | [] | 树选择的数据列表。结构:`[{ label: TNode, value: string \| number, text: string, ... }]`,其中 `label` 表示选项呈现的内容,可自定义;`value` 表示选项的唯一值;表示当 `label` 用于选项复杂内容呈现时,`text` 用于搜索功能。
其中 `label` 和 `value` 可以使用 `keys` 属性定义别名。TS 类型:`Array` | N disabled | Boolean | - | 是否禁用组件 | N empty | 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/src/cascader/cascader.md b/packages/products/tdesign-vue/src/cascader/cascader.md index 33fc2087e..5b8badd01 100644 --- a/packages/products/tdesign-vue/src/cascader/cascader.md +++ b/packages/products/tdesign-vue/src/cascader/cascader.md @@ -11,7 +11,7 @@ borderless | Boolean | false | 无边框模式 | N checkProps | Object | - | 参考 checkbox 组件 API。TS 类型:`CheckboxProps`,[Checkbox API Documents](./checkbox?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/cascader/type.ts) | N checkStrictly | Boolean | false | 父子节点选中状态不再关联,可各自选中或取消 | N clearable | Boolean | false | 是否支持清空选项 | N -collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: CascaderOption[]; collapsedSelectedItems: CascaderOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: CascaderOption[]; collapsedSelectedItems: CascaderOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用组件 | N empty | String / Slot / Function | - | 无匹配选项时的内容,默认全局配置为 '暂无数据'。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N filter | Function | - | 自定义过滤方法,用于对现有数据进行搜索过滤,判断是否过滤某一项数据。TS 类型:`(filterWords: string, node: TreeNodeModel) => boolean \| Promise` | N diff --git a/packages/products/tdesign-vue/src/select-input/select-input.en-US.md b/packages/products/tdesign-vue/src/select-input/select-input.en-US.md index 2f4b226e2..b557b7534 100644 --- a/packages/products/tdesign-vue/src/select-input/select-input.en-US.md +++ b/packages/products/tdesign-vue/src/select-input/select-input.en-US.md @@ -11,7 +11,7 @@ autoWidth | Boolean | false | \- | N autofocus | Boolean | false | \- | N borderless | Boolean | false | \- | N clearable | Boolean | false | \- | N -collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: SelectInputValue; collapsedTags: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: SelectInputValue; collapsedSelectedItems: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N disabled | Boolean | - | \- | N inputProps | Object | - | Typescript:`InputProps`,[Input API Documents](./input?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/select-input/type.ts) | N inputValue | String / Number | - | input value。`.sync` is supported。Typescript:`string` | N 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 28e763579..aee9f958d 100644 --- a/packages/products/tdesign-vue/src/select-input/select-input.md +++ b/packages/products/tdesign-vue/src/select-input/select-input.md @@ -11,7 +11,7 @@ autoWidth | Boolean | false | 宽度随内容自适应 | N autofocus | Boolean | false | 自动聚焦 | N borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否可清空 | N -collapsedItems | Slot / Function | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 `collapsedItems` 自定义。`value` 表示所有标签值,`collapsedTags` 表示折叠标签值,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: SelectInputValue; collapsedTags: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 `collapsedItems` 自定义。`value` 表示所有标签值,`collapsedSelectedItems` 表示折叠标签值,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: SelectInputValue; collapsedSelectedItems: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用 | N inputProps | Object | - | 透传 Input 输入框组件全部属性。TS 类型:`InputProps`,[Input API Documents](./input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/select-input/type.ts) | N inputValue | String / Number | - | 输入框的值。支持语法糖 `.sync`。TS 类型:`string` | N diff --git a/packages/products/tdesign-vue/src/select/select.en-US.md b/packages/products/tdesign-vue/src/select/select.en-US.md index 786dd491a..ee291a847 100644 --- a/packages/products/tdesign-vue/src/select/select.en-US.md +++ b/packages/products/tdesign-vue/src/select/select.en-US.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Select Props name | type | default | description | required @@ -9,7 +10,7 @@ autoWidth | Boolean | false | \- | N autofocus | Boolean | false | \- | N borderless | Boolean | false | \- | N clearable | Boolean | false | \- | N -collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number, onClose: (index: number) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N creatable | Boolean | false | \- | N disabled | Boolean | - | \- | N empty | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N @@ -76,6 +77,7 @@ popup-visible-change | `(visible: boolean, context: PopupVisibleChangeContext)` remove | `(options: SelectRemoveContext)` | [see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/select/type.ts)。
`interface SelectRemoveContext { value: string \| number; data: T; e: MouseEvent \| KeyboardEvent }`
search | `(filterWords: string, context: { e: KeyboardEvent })` | \- + ### Option Props name | type | default | description | required @@ -88,6 +90,7 @@ label | String | - | \- | N title | String | - | \- | N value | String / Number | - | \- | N + ### OptionGroup Props name | type | default | description | required diff --git a/packages/products/tdesign-vue/src/select/select.md b/packages/products/tdesign-vue/src/select/select.md index 60988eb61..524b0460a 100644 --- a/packages/products/tdesign-vue/src/select/select.md +++ b/packages/products/tdesign-vue/src/select/select.md @@ -1,15 +1,16 @@ :: BASE_DOC :: ## API + ### Select Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- autoWidth | Boolean | false | 宽度随内容自适应 | N autofocus | Boolean | false | 自动聚焦 | N borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否可以清空选项 | N -collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,泛型 `T` 继承 `SelectOption`,表示选项数据;`count` 表示折叠的数量, `onClose` 表示移除标签。TS 类型:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number, onClose: (index: number) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,泛型 `T` 继承 `SelectOption`,表示选项数据;`count` 表示折叠的数量, `onClose` 表示移除标签。TS 类型:`TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N creatable | Boolean | false | 是否允许用户创建新条目,需配合 filterable 使用 | N disabled | Boolean | - | 是否禁用组件 | N empty | String / Slot / Function | - | 当下拉列表为空时显示的内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N @@ -76,9 +77,10 @@ popup-visible-change | `(visible: boolean, context: PopupVisibleChangeContext)` remove | `(options: SelectRemoveContext)` | 多选模式下,选中数据被移除时触发。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/select/type.ts)。
`interface SelectRemoveContext { value: string \| number; data: T; e: MouseEvent \| KeyboardEvent }`
search | `(filterWords: string, context: { e: KeyboardEvent })` | 输入值变化时,触发搜索事件。主要用于远程搜索新数据 + ### Option Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- checkAll | Boolean | false | 当前选项是否为全选,全选可以在顶部,也可以在底部。点击当前选项会选中禁用态除外的全部选项,即使是分组选择器也会选中全部选项 | N content | String / Slot / Function | - | 用于定义复杂的选项内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N @@ -88,16 +90,17 @@ label | String | - | 选项名称 | N title | String | - | 选项标题,在选项过长时hover选项展示 | N value | String / Number | - | 选项值 | N + ### OptionGroup Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- divider | Boolean | true | 是否显示分隔线 | N label | String | - | 分组别名 | N ### TScroll -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- bufferSize | Number | 20 | 表示除可视区域外,额外渲染的行数,避免快速滚动过程中,新出现的内容来不及渲染从而出现空白 | N isFixedRowHeight | Boolean | false | 表示每行内容是否同一个固定高度,仅在 `scroll.type` 为 `virtual` 时有效,该属性设置为 `true` 时,可用于简化虚拟滚动内部计算逻辑,提升性能,此时则需要明确指定 `scroll.rowHeight` 属性的值 | N diff --git a/packages/products/tdesign-vue/src/tag-input/tag-input.en-US.md b/packages/products/tdesign-vue/src/tag-input/tag-input.en-US.md index f5ae46eef..9bce04c17 100644 --- a/packages/products/tdesign-vue/src/tag-input/tag-input.en-US.md +++ b/packages/products/tdesign-vue/src/tag-input/tag-input.en-US.md @@ -8,7 +8,7 @@ name | type | default | description | required -- | -- | -- | -- | -- autoWidth | Boolean | false | \- | N clearable | Boolean | false | \- | N -collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: TagInputValue; collapsedTags: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | Typescript:`TNode<{ value: TagInputValue; collapsedSelectedItems: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N disabled | Boolean | - | \- | N dragSort | Boolean | false | \- | N excessTagsDisplayType | String | break-line | options: scroll/break-line | N diff --git a/packages/products/tdesign-vue/src/tag-input/tag-input.md b/packages/products/tdesign-vue/src/tag-input/tag-input.md index 6dfd863fb..9a79dec47 100644 --- a/packages/products/tdesign-vue/src/tag-input/tag-input.md +++ b/packages/products/tdesign-vue/src/tag-input/tag-input.md @@ -8,7 +8,7 @@ -- | -- | -- | -- | -- autoWidth | Boolean | false | 宽度随内容自适应 | N clearable | Boolean | false | 是否可清空 | N -collapsedItems | Slot / Function | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: TagInputValue; collapsedTags: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | 标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: TagInputValue; collapsedSelectedItems: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N disabled | Boolean | - | 是否禁用标签输入框 | N dragSort | Boolean | false | 拖拽调整标签顺序 | N excessTagsDisplayType | String | break-line | 标签超出时的呈现方式,有两种:横向滚动显示 和 换行显示。可选项:scroll/break-line | N 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 ee3401735..ae1b4c6b8 100644 --- a/packages/products/tdesign-vue/src/tree-select/tree-select.md +++ b/packages/products/tdesign-vue/src/tree-select/tree-select.md @@ -10,7 +10,7 @@ autoWidth | Boolean | false | 宽度随内容自适应 | N autofocus | Boolean | false | 自动聚焦 | N borderless | Boolean | false | 无边框模式 | N clearable | Boolean | false | 是否允许清空 | N -collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: DataOption[]; collapsedSelectedItems: DataOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +collapsedItems | Slot / Function | - | 多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调。TS 类型:`TNode<{ value: DataOption[]; collapsedSelectedItems: DataOption[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N data | Array | [] | 树选择的数据列表。结构:`[{ label: TNode, value: string \| number, text: string, ... }]`,其中 `label` 表示选项呈现的内容,可自定义;`value` 表示选项的唯一值;表示当 `label` 用于选项复杂内容呈现时,`text` 用于搜索功能。
其中 `label` 和 `value` 可以使用 `keys` 属性定义别名。TS 类型:`Array` | N disabled | Boolean | - | 是否禁用组件 | N empty | String / Slot / Function | - | 当下拉列表为空时显示的内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N diff --git a/packages/scripts/api.json b/packages/scripts/api.json index 5c2e930a9..9b35b81e2 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -18398,7 +18398,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调", + "field_desc_zh": "多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -84512,14 +84512,14 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,泛型 `T` 继承 `SelectOption`,表示选项数据;`count` 表示折叠的数量, `onClose` 表示移除标签", + "field_desc_zh": "多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,泛型 `T` 继承 `SelectOption`,表示选项数据;`count` 表示折叠的数量, `onClose` 表示移除标签", "field_desc_en": null, "field_required": 0, "event_input": "", "create_time": "2021-09-28 05:17:31", "update_time": "2021-11-20 05:13:40", "event_output": null, - "custom_field_type": "TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number, onClose: (index: number) => void }>", + "custom_field_type": "TNode<{ value: T[]; collapsedSelectedItems: T[]; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>", "syntactic_sugar": null, "readonly": 1, "html_attribute": 0, @@ -86939,14 +86939,14 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 `collapsedItems` 自定义。`value` 表示所有标签值,`collapsedTags` 表示折叠标签值,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调", + "field_desc_zh": "标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 `collapsedItems` 自定义。`value` 表示所有标签值,`collapsedSelectedItems` 表示折叠标签值,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调", "field_desc_en": null, "field_required": 0, "event_input": "", "create_time": "2022-01-12 13:10:03", "update_time": "2022-01-13 04:22:06", "event_output": null, - "custom_field_type": "TNode<{ value: SelectInputValue; collapsedTags: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>", + "custom_field_type": "TNode<{ value: SelectInputValue; collapsedSelectedItems: SelectInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>", "syntactic_sugar": null, "readonly": 1, "html_attribute": 0, @@ -103515,14 +103515,14 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调", + "field_desc_zh": "标签过多的情况下,折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调", "field_desc_en": null, "field_required": 0, "event_input": "", "create_time": "2022-01-03 06:46:06", "update_time": "2022-01-03 06:46:06", "event_output": null, - "custom_field_type": "TNode<{ value: TagInputValue; collapsedTags: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>", + "custom_field_type": "TNode<{ value: TagInputValue; collapsedSelectedItems: TagInputValue; count: number; onClose: (context: { index: number, e?: MouseEvent }) => void }>", "syntactic_sugar": null, "readonly": 1, "html_attribute": 0, @@ -116986,7 +116986,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedTags` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调", + "field_desc_zh": "多选情况下,用于设置折叠项内容,默认为 `+N`。如果需要悬浮就显示其他内容,可以使用 collapsedItems 自定义。`value` 表示当前存在的所有标签,`collapsedSelectedItems` 表示折叠的标签,`count` 表示折叠的数量,`onClose` 表示移除标签的事件回调", "field_desc_en": null, "field_required": 0, "event_input": "",