refactor: 重构属性编辑面板,支持Tab分离和节点类型切换

- 将属性面板分为游戏属性和图像属性两个Tab
- 游戏属性Tab包含节点基本信息、类型切换和特定属性
- 图像属性Tab包含所有样式设置(填充、描边、阴影等)
- 资产选择器节点支持在式神和御魂之间切换
- 切换节点类型时自动清空已选资产
- 优化AssetSelectorPanel,移除重复的资产库选择器
This commit is contained in:
2026-02-14 21:50:51 +08:00
parent bbcc1f6980
commit 4a4a55110b
15 changed files with 1069 additions and 26 deletions

View File

@@ -73,6 +73,7 @@ import ShikigamiSelectNode from './nodes/yys/ShikigamiSelectNode.vue';
import YuhunSelectNode from './nodes/yys/YuhunSelectNode.vue';
import PropertySelectNode from './nodes/yys/PropertySelectNode.vue';
import ImageNode from './nodes/common/ImageNode.vue';
import AssetSelectorNode from './nodes/common/AssetSelectorNode.vue';
// import TextNode from './nodes/common/TextNode.vue';
import PropertyPanel from './PropertyPanel.vue';
import { useGlobalMessage } from '@/ts/useGlobalMessage';
@@ -660,6 +661,7 @@ function registerNodes(lfInstance: LogicFlow) {
register({ type: 'propertySelect', component: PropertySelectNode }, lfInstance);
register({ type: 'imageNode', component: ImageNode }, lfInstance);
register({ type: 'assetSelector', component: AssetSelectorNode }, lfInstance);
// register({ type: 'textNode', component: TextNode }, lfInstance);
}
@@ -915,6 +917,11 @@ onMounted(() => {
normalizeAllNodes();
});
// 监听节点点击事件,更新选中节点
lfInstance.on(EventType.NODE_CLICK, ({ data }) => {
selectedNode.value = data;
});
// 监听空白点击事件,取消选中
lfInstance.on(EventType.BLANK_CLICK, () => {
selectedNode.value = null;