refactor: 清理未使用的源码片段
This commit is contained in:
@@ -27,13 +27,9 @@ const props = defineProps<{
|
||||
height?: string;
|
||||
/** 节点可选择模式(点击节点触发 node-select 事件) */
|
||||
selectable?: boolean;
|
||||
/** 当前选中的节点路径(用于高亮,仅在 selectable 模式下生效) */
|
||||
selectedPath?: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
/** 编辑模式下结构变化时抛出最新大纲文本 */
|
||||
(e: "change", outline: string): void;
|
||||
/** 点击带溯源信息的节点 */
|
||||
(e: "node-click", node: { sourceType: string; sourceId: number }): void;
|
||||
/** 选择模式下点击节点,返回标题+路径 */
|
||||
@@ -156,12 +152,6 @@ const render = () => {
|
||||
});
|
||||
instance.init(toElixirData(props.tree));
|
||||
|
||||
if (props.editable) {
|
||||
instance.bus.addListener("operation", () => {
|
||||
emit("change", toOutline());
|
||||
});
|
||||
}
|
||||
|
||||
// mind-elixir v5: selectNode(el) is called on every node click, but the
|
||||
// selectNewNode event is never fired (it requires selectNode(el, true),
|
||||
// which the default click handler never passes). Monkey-patch selectNode
|
||||
|
||||
Reference in New Issue
Block a user