diff --git a/packages/plugins/tree/src/DraggableTree.vue b/packages/plugins/tree/src/DraggableTree.vue
new file mode 100644
index 000000000..1b8097497
--- /dev/null
+++ b/packages/plugins/tree/src/DraggableTree.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
diff --git a/packages/plugins/tree/src/Main.vue b/packages/plugins/tree/src/Main.vue
index 130cc688a..6db877168 100644
--- a/packages/plugins/tree/src/Main.vue
+++ b/packages/plugins/tree/src/Main.vue
@@ -44,6 +44,7 @@
+
@@ -57,6 +58,7 @@ import { IconChevronDown, iconEyeopen, iconEyeclose } from '@opentiny/vue-icon'
import { useCanvas, useMaterial, useLayout, useMessage } from '@opentiny/tiny-engine-meta-register'
import { extend } from '@opentiny/vue-renderless/common/object'
import { typeOf } from '@opentiny/vue-renderless/common/type'
+import DraggableTree from './DraggableTree.vue'
const { PAGE_STATUS } = constants
export default {
@@ -65,6 +67,7 @@ export default {
TinyGridColumn: GridColumn,
PluginPanel,
SvgButton,
+ DraggableTree,
IconEyeopen: iconEyeopen(),
IconEyeclose: iconEyeclose()
},
@@ -99,7 +102,7 @@ export default {
return data
}
- return [{ ...translateChild([extend(true, {}, data)])[0], componentName: 'body' }]
+ return [{ ...translateChild([extend(true, {}, data)])[0], componentName: 'body', id: 'root' }]
}
const state = reactive({
pageSchema: [],
@@ -118,6 +121,14 @@ export default {
}
})
+ watch(
+ () => state.pageSchema,
+ (value) => {
+ // eslint-disable-next-line no-console
+ console.log(value)
+ }
+ )
+
const { subscribe, unsubscribe } = useMessage()
onActivated(() => {
@@ -149,6 +160,7 @@ export default {
}
)
+ // TODO 未使用到的功能
const toggleTree = () => {
state.expandAll = !state.expandAll
}
diff --git "a/\345\216\237\347\211\210\345\244\247\347\272\262\346\240\221\345\212\237\350\203\275\350\256\260\345\275\225.md" "b/\345\216\237\347\211\210\345\244\247\347\272\262\346\240\221\345\212\237\350\203\275\350\256\260\345\275\225.md"
new file mode 100644
index 000000000..9de7a4240
--- /dev/null
+++ "b/\345\216\237\347\211\210\345\244\247\347\272\262\346\240\221\345\212\237\350\203\275\350\256\260\345\275\225.md"
@@ -0,0 +1,13 @@
+# 原版大纲数功能记录
+
+- 展开、收起
+- 全部展开按钮(逻辑实现了,UI 未体现)
+- 悬停节点,画布中出现对应的 hover 框
+- 悬停节点,展示“眼睛”。点击“眼睛”,画布中元素显隐
+- 点击节点,画布中选中节点
+- 如果节点是 Block,样式稍微不一样
+
+其他测试点:
+
+- 拖拽
+- 超高列表,带滚动条