diff --git a/examples/sites/demos/pc/app/tree/edit-composition-api.vue b/examples/sites/demos/pc/app/tree/edit-composition-api.vue
index 0977370d5..4d9c19d39 100644
--- a/examples/sites/demos/pc/app/tree/edit-composition-api.vue
+++ b/examples/sites/demos/pc/app/tree/edit-composition-api.vue
@@ -8,7 +8,14 @@
编辑节点
5s后保存节点
-
+
@@ -20,6 +27,7 @@ const data = ref([
{
id: '1',
label: '数据 1',
+ disabled: true,
children: [
{ id: '1-1', label: '数据 1-1', children: [{ id: '1-1-1', label: '数据 1-1-1' }] },
{ id: '1-2', label: '数据 1-2' }
diff --git a/examples/sites/demos/pc/app/tree/edit.vue b/examples/sites/demos/pc/app/tree/edit.vue
index c5f999404..837827098 100644
--- a/examples/sites/demos/pc/app/tree/edit.vue
+++ b/examples/sites/demos/pc/app/tree/edit.vue
@@ -8,7 +8,14 @@
编辑节点
5s后保存节点
-
+
@@ -26,6 +33,7 @@ export default {
{
id: '1',
label: '数据 1',
+ disabled: true,
children: [
{ id: '1-1', label: '数据 1-1', children: [{ id: '1-1-1', label: '数据 1-1-1' }] },
{ id: '1-2', label: '数据 1-2' }
diff --git a/examples/sites/demos/pc/app/tree/webdoc/tree.js b/examples/sites/demos/pc/app/tree/webdoc/tree.js
index 131948422..e6f683349 100644
--- a/examples/sites/demos/pc/app/tree/webdoc/tree.js
+++ b/examples/sites/demos/pc/app/tree/webdoc/tree.js
@@ -410,7 +410,8 @@ export default {
通过调用实例的 editNode(node)
方法,立即编辑 node 节点。
通过调用实例的 saveNode()
方法,保存正在编辑的节点。
- 在使用编辑功能时,不要使用 props
去定义数据列的映射关系,要使用默认的数据格式。
+ 在使用编辑功能时,不要使用 props
去定义数据列的映射关系,要使用默认的数据格式。
+ 数据项的禁用并不影响数据的编辑功能,编辑功能的控制,请参考 编辑权限
的示例。
通过 edit-config
属性,设置编辑模式下参数配置。
`,
@@ -419,7 +420,8 @@ export default {
Edit the node node immediately by calling the instance's editNode(node)
method.
Save the node being edited by calling the instance's saveNode()
method.
- When using the editing functions, do not use props
to define the mapping of data columns. Instead, use the default data format.
+ When using the editing functions, do not use props
to define the mapping of data columns. Instead, use the default data format.
+ Disabling the data item does not affect the data editing function. For details about how to control the editing function, see the example of editing permission
.
Set parameters in editing mode through the edit-config
attribute.
`
diff --git a/packages/theme/src/tree/index.less b/packages/theme/src/tree/index.less
index 65086f482..ed70570ef 100644
--- a/packages/theme/src/tree/index.less
+++ b/packages/theme/src/tree/index.less
@@ -365,6 +365,10 @@
align-items: center;
padding-left: calc(var(--ti-tree-node-label-margin-left) / 2);
padding-right: var(--ti-tree-node-content-padding-right);
+
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
}
@@ -386,6 +390,7 @@
display: flex;
align-items: center;
height: 100%;
+ cursor: pointer;
svg {
fill: var(--ti-tree-node-operate-icon-color);