Commit 417fcbd8 by Jaxon

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

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