22 lines
547 B
JavaScript
22 lines
547 B
JavaScript
import { defineStore } from 'pinia';
|
|
|
|
export const useActionStore = defineStore('action', {
|
|
state: () => ({
|
|
triggerCombineAction: false,
|
|
targetNodeId: '840983' // 默认高亮节点ID
|
|
}),
|
|
actions: {
|
|
// 触发定位并高亮操作
|
|
triggerCombine() {
|
|
this.triggerCombineAction = true;
|
|
// 自动重置状态,避免重复触发
|
|
setTimeout(() => {
|
|
this.triggerCombineAction = false;
|
|
}, 100);
|
|
},
|
|
// 设置目标节点ID
|
|
setTargetNodeId(id) {
|
|
this.targetNodeId = id;
|
|
}
|
|
}
|
|
}); |