Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ filter | Function | - | Typescript: `CascaderFilterFunction ` `type CascaderFilt
filter-placeholder | String | - | \- | N
filterable | Boolean | false | \- | N
keys | Object | - | Typescript: `CascaderKeysType` `type CascaderKeysType = TreeKeysType`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/cascader/type.ts) | N
load | Function | - | loading subtree data (only effective when the node's children value is true)。Typescript: `(node: CascaderOption) => Promise<Array<CascaderOption>>` | N
options | Array | [] | Typescript: `Array<CascaderOption>` | N
placeholder | String | - | \- | N
sub-titles | Array | [] | Typescript: `Array<string>` | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ filter | Function | - | 自定义过滤函数。返回 true 表示匹配,未
filter-placeholder | String | - | 搜索框占位符描述文本 | N
filterable | Boolean | false | 是否可搜索,开启后顶部会展示一个搜索框 | N
keys | Object | - | 用来定义 value / label / children / disabled 在 `options` 中对应的字段别名。TS 类型:`CascaderKeysType` `type CascaderKeysType = TreeKeysType`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/cascader/type.ts) | N
load | Function | - | 加载子树数据的方法(仅当节点 children 为 true 时生效)。TS 类型:`(node: CascaderOption) => Promise<Array<CascaderOption>>` | N
options | Array | [] | 可选项数据源。TS 类型:`Array<CascaderOption>` | N
placeholder | String | - | 未选中时的提示文案。组件内置默认值为:'选择选项' | N
sub-titles | Array | [] | 每级展示的次标题。TS 类型:`Array<string>` | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const props: TdCascaderProps = {
keys: {
type: Object,
},
/** 加载子树数据的方法(仅当节点 children 为 true 时生效) */
load: {
type: null,
},
/** 可选项数据源 */
options: {
type: Array,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ export interface TdCascaderProps<CascaderOption extends TreeOptionData = TreeOpt
type: ObjectConstructor;
value?: CascaderKeysType;
};
/**
* 加载子树数据的方法(仅当节点 children 为 true 时生效)
*/
load?: {
type: undefined;
value?: (node: CascaderOption) => Promise<Array<CascaderOption>>;
};
/**
* 可选项数据源
* @default []
Expand Down
6 changes: 4 additions & 2 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -22966,7 +22966,8 @@
"id": 1764036186,
"platform_framework": [
"8",
"16"
"16",
"64"
],
"component": "Cascader",
"field_category": 1,
Expand Down Expand Up @@ -22995,7 +22996,8 @@
"field_category_text": "Props",
"platform_framework_text": [
"Vue(Mobile)",
"React(Mobile)"
"React(Mobile)",
"Miniprogram"
],
"field_type_text": [
"Function"
Expand Down