完全跑通1.0版本

This commit is contained in:
2026-05-26 12:56:03 +08:00
parent 2ece5174a7
commit 93c714a93b
11557 changed files with 1648225 additions and 36 deletions

View File

@@ -0,0 +1,27 @@
import { ElOption } from "../../select/index.mjs";
import { defineComponent, getCurrentInstance, nextTick, watch } from "vue";
//#region ../../packages/components/tree-select/src/tree-select-option.ts
const component = defineComponent({
extends: ElOption,
setup(props, ctx) {
const result = ElOption.setup(props, ctx);
delete result.selectOptionClick;
const vm = getCurrentInstance().proxy;
nextTick(() => {
if (!result.select.states.cachedOptions.get(vm.value)) result.select.onOptionCreate(vm);
});
watch(() => ctx.attrs.visible, (val) => {
nextTick(() => {
result.states.visible = val;
});
}, { immediate: true });
return result;
},
methods: { selectOptionClick() {
this.$el.parentElement.click();
} }
});
//#endregion
export { component as default };
//# sourceMappingURL=tree-select-option.mjs.map