From ea71e31ff5bf782366081f466ff6d69b29b25850 Mon Sep 17 00:00:00 2001
From: yoyo <15014217605@163.com>
Date: Fri, 8 Dec 2023 16:22:53 +0800
Subject: [PATCH] docs(cascader): [cascader, cascader-panel] Improve
documentation (#1065)
---
.../basic-usage-composition-api.vue | 4 +-
.../pc/app/cascader-panel/basic-usage.vue | 3 +-
.../cascader-panel-props-composition-api.vue | 4 +-
.../cascader-panel/cascader-panel-props.vue | 4 +-
.../cascader-panel/change-composition-api.vue | 3 +-
.../demos/pc/app/cascader-panel/change.vue | 2 +-
.../cascader-panel/webdoc/cascader-panel.js | 10 +-
...uto-load-checkStrictly-composition-api.vue | 3 +-
.../app/cascader/auto-load-checkStrictly.vue | 3 +-
.../cascader/auto-load-composition-api.vue | 4 +-
.../sites/demos/pc/app/cascader/auto-load.vue | 3 +-
.../app/cascader/events-composition-api.vue | 2 +-
.../expand-trigger-composition-api.vue | 197 ++++++++++++++++-
.../show-all-levels-composition-api.vue | 199 +++++++++++++++++-
.../demos/pc/app/cascader/webdoc/cascader.js | 38 ++--
15 files changed, 446 insertions(+), 33 deletions(-)
diff --git a/examples/sites/demos/pc/app/cascader-panel/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/cascader-panel/basic-usage-composition-api.vue
index 3ed404eeb..23d6dc934 100644
--- a/examples/sites/demos/pc/app/cascader-panel/basic-usage-composition-api.vue
+++ b/examples/sites/demos/pc/app/cascader-panel/basic-usage-composition-api.vue
@@ -1,11 +1,13 @@
-
-
children
指定子级选项,默认值为 children。children
指定子级选项,默认值为 'children'。emitPath
是否返回由该节点所在的各级菜单的值所组成的数组。label
指定显示选项 label 值,默认为 label。value
指定值选项 value 值,默认为 value。label
指定显示选项 label 值,默认为 'label'。value
指定值选项 value 值,默认为 'value'。
children
, which defaults to children.
- 当选中某一级时,动态加载该级下的选项。通过 props
属性中的 lazy
开启动态加载,并通过 lazyload
来设置加载数据源的方法。
- lazyload
方法有两个参数,第一个参数 node 为当前点击的节点,第二个 resolve 为数据加载完成的回调(必须调用)。
- 为了更准确的显示节点的状态,默认地可以使用leaf
字段对节点数据添加是否为叶子节点的标志位,否则会简单地以有无子节点来判断是否为叶子节点。
+
props
属性中的 lazy
开启动态加载,并通过 lazyload
来设置加载数据源的方法。lazyload
方法有两个参数,第一个参数 node 为当前点击的节点,第二个 resolve 为数据加载完成的回调(必须调用)。+
props.leaf
)可以使用leaf
字段。
- When a level is selected, the options under the level are dynamically loaded. Enable dynamic loading with lazy
in the props
property, and set the method of loading the data source with lazyload
.
- The lazyload
method takes two parameters, the first parameter node is the currently clicked node, and the second parameter resolve is the callback when the data load is complete (which must be called).
- In order to display the status of the node more accurately, the leaf
field can be used by default to add the flag bit of whether the node is a leaf node. Otherwise, it will simply judge whether the node is a leaf node by whether there are child nodes.
+
lazy
in the props
property, and sets the method of loading the data source with lazyload
. lazyload
method takes two arguments, node for the current clicked node, and resolve for the callback (which must be called) when the data is loaded. +
leaf
field can be used by default (the default means that props.leaf
is not set). Props
\n通过 children
指定选项的子选项,默认为 children 。\n通过 value
指定指定选项的 value 值,默认为 value 。\n通过 label
指定选项标签,默认为 label 。
Props
\n uses children
to specify the sub-option of the option. The default value is children. \n Use value
to specify the value of a specified option. The default value is value. \nUse label
to specify the option label. The default value is label.
+
props.children
指定选项的子选项,默认为 'children' 。props.value
指定指定选项的 value 值,默认为 'value' 。props.label
指定选项标签,默认为 'label' 。+
props.children
, which defaults to 'children'. props.value
, which defaults to 'value'. props.label
, which defaults to 'label'.