Skip to content

Commit

Permalink
fix: typo (#4622)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 authored Sep 29, 2024
1 parent 8f1adbf commit 03036a1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions helper/attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -7201,7 +7201,7 @@
"parentFirst",
"all"
],
"description": "选中值模式。all 表示父节点和子节点全部会出现在选中值里面;parentFirst 表示当子节点全部选中时,仅父节点在选中值里面;onlyLeaft 表示无论什么情况,选中值仅呈现叶子节点\n\ndefault: onlyLeaf\n\n[docs](https://tdesign.tencent.com/vue-next/components/tree?tab=api#tree-props)"
"description": "选中值模式。all 表示父节点和子节点全部会出现在选中值里面;parentFirst 表示当子节点全部选中时,仅父节点在选中值里面;onlyLeaf 表示无论什么情况,选中值仅呈现叶子节点\n\ndefault: onlyLeaf\n\n[docs](https://tdesign.tencent.com/vue-next/components/tree?tab=api#tree-props)"
},
"t-tree/active": {
"type": "event",
Expand Down Expand Up @@ -7772,4 +7772,4 @@
"type": "Number",
"description": "水印元素的 `z-index`,默认值写在 CSS 中\n\n[docs](https://tdesign.tencent.com/vue-next/components/watermark?tab=api#watermark-props)"
}
}
}
4 changes: 2 additions & 2 deletions helper/web-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -19045,7 +19045,7 @@
},
{
"name": "value-mode",
"description": "选中值模式。all 表示父节点和子节点全部会出现在选中值里面;parentFirst 表示当子节点全部选中时,仅父节点在选中值里面;onlyLeaft 表示无论什么情况,选中值仅呈现叶子节点",
"description": "选中值模式。all 表示父节点和子节点全部会出现在选中值里面;parentFirst 表示当子节点全部选中时,仅父节点在选中值里面;onlyLeaf 表示无论什么情况,选中值仅呈现叶子节点",
"doc-url": "https://tdesign.tencent.com/vue-next/components/tree?tab=api#tree-props",
"type": [
"String"
Expand Down Expand Up @@ -20447,4 +20447,4 @@
]
}
}
}
}
2 changes: 1 addition & 1 deletion src/tree/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default {
type: Array as PropType<TdTreeProps['defaultValue']>,
default: (): TdTreeProps['defaultValue'] => [],
},
/** 选中值模式。all 表示父节点和子节点全部会出现在选中值里面;parentFirst 表示当子节点全部选中时,仅父节点在选中值里面;onlyLeaft 表示无论什么情况,选中值仅呈现叶子节点 */
/** 选中值模式。all 表示父节点和子节点全部会出现在选中值里面;parentFirst 表示当子节点全部选中时,仅父节点在选中值里面;onlyLeaf 表示无论什么情况,选中值仅呈现叶子节点 */
valueMode: {
type: String as PropType<TdTreeProps['valueMode']>,
default: 'onlyLeaf' as TdTreeProps['valueMode'],
Expand Down
2 changes: 1 addition & 1 deletion src/tree/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ scroll | Object | - | 懒加载和虚拟滚动。为保证组件收益最大化
transition | Boolean | true | 节点展开折叠时是否使用过渡动画 | N
value | Array | [] | 选中值,组件为可选状态时有效。支持语法糖 `v-model``v-model:value`。TS 类型:`Array<TreeNodeValue>` `type TreeNodeValue = string \| number`[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/tree/type.ts) | N
defaultValue | Array | [] | 选中值,组件为可选状态时有效。非受控属性。TS 类型:`Array<TreeNodeValue>` `type TreeNodeValue = string \| number`[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/tree/type.ts) | N
valueMode | String | onlyLeaf | 选中值模式。all 表示父节点和子节点全部会出现在选中值里面;parentFirst 表示当子节点全部选中时,仅父节点在选中值里面;onlyLeaft 表示无论什么情况,选中值仅呈现叶子节点。可选项:onlyLeaf/parentFirst/all | N
valueMode | String | onlyLeaf | 选中值模式。all 表示父节点和子节点全部会出现在选中值里面;parentFirst 表示当子节点全部选中时,仅父节点在选中值里面;onlyLeaf 表示无论什么情况,选中值仅呈现叶子节点。可选项:onlyLeaf/parentFirst/all | N
onActive | Function | | TS 类型:`(value: Array<TreeNodeValue>, context: { node: TreeNodeModel<T>; e?: MouseEvent; trigger: 'node-click' \| 'setItem' }) => void`<br/>节点激活时触发,泛型 `T` 表示树节点 TS 类型 | N
onChange | Function | | TS 类型:`(value: Array<TreeNodeValue>, context: { node: TreeNodeModel<T>; e?: any; trigger: 'node-click' \| 'setItem' }) => void`<br/>节点选中状态变化时触发,context.node 表示当前变化的选项,泛型 `T` 表示树节点 TS 类型 | N
onClick | Function | | TS 类型:`(context: { node: TreeNodeModel<T>; e: MouseEvent }) => void`<br/>节点点击时触发,泛型 `T` 表示树节点 TS 类型 | N
Expand Down
2 changes: 1 addition & 1 deletion src/tree/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export interface TdTreeProps<T extends TreeOptionData = TreeOptionData> {
*/
modelValue?: Array<TreeNodeValue>;
/**
* 选中值模式。all 表示父节点和子节点全部会出现在选中值里面;parentFirst 表示当子节点全部选中时,仅父节点在选中值里面;onlyLeaft 表示无论什么情况,选中值仅呈现叶子节点
* 选中值模式。all 表示父节点和子节点全部会出现在选中值里面;parentFirst 表示当子节点全部选中时,仅父节点在选中值里面;onlyLeaf 表示无论什么情况,选中值仅呈现叶子节点
* @default onlyLeaf
*/
valueMode?: 'onlyLeaf' | 'parentFirst' | 'all';
Expand Down

0 comments on commit 03036a1

Please sign in to comment.