Commit 417fcbd8 by Jaxon

refactor(绩效方案): 移除不必要的可见性状态和事件处理

简化级联选择器逻辑,直接使用计算属性作为选项,避免条件渲染和可见性状态管理
1 parent 0d55e9b7
<template>
<div class="">
<el-cascader clearable
:options="visible ? computedOptions : getProductDefineListOptions"
:options="computedOptions"
placeholder="请选择"
:props="{ checkStrictly: true }"
:show-all-levels="false"
:value="value"
@change="handleProductChange"
@visible-change="handleVisibleChange">
@change="handleProductChange">
</el-cascader>
</div>
</template>
......@@ -74,7 +73,6 @@ export default {
},
data() {
return {
visible: false,
};
},
computed: {
......@@ -83,7 +81,6 @@ export default {
occupiedPaths() {
const paths = [];
// Determine the scope: specific config (if index provided) or all configs
let targetConfigs = [];
let targetConfigIndices = [];
......@@ -307,9 +304,7 @@ export default {
this.$emit("input", value);
this.$emit("change", value);
},
handleVisibleChange(isVisible) {
this.visible = isVisible;
},
},
};
</script>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!