ed60dcc7fd2d90f07e0d8aa03f89d58772fb5d8071c3dcf84acbc3d68436037bace826f663686138d480cc74942c12b0ea8d38cc20afe03ff53c66c753b0fd 828 B

1234567891011121314151617181920212223242526272829303132
  1. import { defineComponent, getCurrentInstance, nextTick, watch } from 'vue';
  2. import { ElOption } from '../../select/index.mjs';
  3. const component = defineComponent({
  4. extends: ElOption,
  5. setup(props, ctx) {
  6. const result = ElOption.setup(props, ctx);
  7. delete result.selectOptionClick;
  8. const vm = getCurrentInstance().proxy;
  9. nextTick(() => {
  10. if (!result.select.states.cachedOptions.get(vm.value)) {
  11. result.select.onOptionCreate(vm);
  12. }
  13. });
  14. watch(() => ctx.attrs.visible, (val) => {
  15. nextTick(() => {
  16. result.states.visible = val;
  17. });
  18. }, {
  19. immediate: true
  20. });
  21. return result;
  22. },
  23. methods: {
  24. selectOptionClick() {
  25. this.$el.parentElement.click();
  26. }
  27. }
  28. });
  29. export { component as default };
  30. //# sourceMappingURL=tree-select-option.mjs.map