@element-plus/nightly 0.0.20240804 → 0.0.20240805
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.full.js +81 -55
- package/dist/index.full.min.js +16 -16
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +81 -55
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +34 -2
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.js.map +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.min.mjs.map +1 -1
- package/dist/locale/zh-cn.mjs +34 -2
- package/dist/locale/zh-tw.js +3 -2
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.js.map +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.min.mjs.map +1 -1
- package/dist/locale/zh-tw.mjs +3 -2
- package/es/components/drawer/src/drawer2.mjs +3 -3
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/loading/src/loading.mjs +1 -1
- package/es/components/loading/src/loading.mjs.map +1 -1
- package/es/components/select/index.mjs +1 -1
- package/es/components/select/src/select.mjs +398 -104
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select2.mjs +104 -398
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/table/index.d.ts +5 -12
- package/es/components/table/src/store/helper.mjs +4 -0
- package/es/components/table/src/store/helper.mjs.map +1 -1
- package/es/components/table/src/store/tree.mjs +3 -1
- package/es/components/table/src/store/tree.mjs.map +1 -1
- package/es/components/table/src/store/watcher.mjs +37 -34
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table/defaults.d.ts +9 -9
- package/es/components/table/src/table/defaults.mjs +2 -1
- package/es/components/table/src/table/defaults.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +7 -18
- package/es/components/table/src/util.d.ts +2 -2
- package/es/components/table/src/util.mjs +27 -11
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/hooks/use-throttle-render/index.mjs +2 -2
- package/es/hooks/use-throttle-render/index.mjs.map +1 -1
- package/es/locale/lang/zh-cn.d.ts +32 -0
- package/es/locale/lang/zh-cn.mjs +33 -1
- package/es/locale/lang/zh-cn.mjs.map +1 -1
- package/es/locale/lang/zh-tw.d.ts +1 -0
- package/es/locale/lang/zh-tw.mjs +2 -1
- package/es/locale/lang/zh-tw.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/drawer/src/drawer2.js +3 -3
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/loading/src/loading.js +1 -1
- package/lib/components/loading/src/loading.js.map +1 -1
- package/lib/components/select/index.js +1 -1
- package/lib/components/select/src/select.js +398 -104
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select2.js +104 -398
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/table/index.d.ts +5 -12
- package/lib/components/table/src/store/helper.js +4 -0
- package/lib/components/table/src/store/helper.js.map +1 -1
- package/lib/components/table/src/store/tree.js +3 -1
- package/lib/components/table/src/store/tree.js.map +1 -1
- package/lib/components/table/src/store/watcher.js +37 -34
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table/defaults.d.ts +9 -9
- package/lib/components/table/src/table/defaults.js +2 -1
- package/lib/components/table/src/table/defaults.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +7 -18
- package/lib/components/table/src/util.d.ts +2 -2
- package/lib/components/table/src/util.js +27 -11
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/hooks/use-throttle-render/index.js +2 -2
- package/lib/hooks/use-throttle-render/index.js.map +1 -1
- package/lib/locale/lang/zh-cn.d.ts +32 -0
- package/lib/locale/lang/zh-cn.js +33 -1
- package/lib/locale/lang/zh-cn.js.map +1 -1
- package/lib/locale/lang/zh-tw.d.ts +1 -0
- package/lib/locale/lang/zh-tw.js +2 -1
- package/lib/locale/lang/zh-tw.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.mjs","sources":["../../../../../../packages/components/loading/src/loading.ts"],"sourcesContent":["import {\n Transition,\n createApp,\n createVNode,\n defineComponent,\n h,\n reactive,\n ref,\n toRefs,\n vShow,\n withCtx,\n withDirectives,\n} from 'vue'\nimport { removeClass } from '@element-plus/utils'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\n\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\nimport type { LoadingOptionsResolved } from './types'\n\nexport function createLoadingComponent(options: LoadingOptionsResolved) {\n let afterLeaveTimer:
|
|
1
|
+
{"version":3,"file":"loading.mjs","sources":["../../../../../../packages/components/loading/src/loading.ts"],"sourcesContent":["import {\n Transition,\n createApp,\n createVNode,\n defineComponent,\n h,\n reactive,\n ref,\n toRefs,\n vShow,\n withCtx,\n withDirectives,\n} from 'vue'\nimport { removeClass } from '@element-plus/utils'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\n\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\nimport type { LoadingOptionsResolved } from './types'\n\nexport function createLoadingComponent(options: LoadingOptionsResolved) {\n let afterLeaveTimer: ReturnType<typeof setTimeout>\n // IMPORTANT NOTE: this is only a hacking way to expose the injections on an\n // instance, DO NOT FOLLOW this pattern in your own code.\n const afterLeaveFlag = ref(false)\n const data = reactive({\n ...options,\n originalPosition: '',\n originalOverflow: '',\n visible: false,\n })\n\n function setText(text: string) {\n data.text = text\n }\n\n function destroySelf() {\n const target = data.parent\n const ns = (vm as any).ns as UseNamespaceReturn\n if (!target.vLoadingAddClassList) {\n let loadingNumber: number | string | null =\n target.getAttribute('loading-number')\n loadingNumber = Number.parseInt(loadingNumber as any) - 1\n if (!loadingNumber) {\n removeClass(target, ns.bm('parent', 'relative'))\n target.removeAttribute('loading-number')\n } else {\n target.setAttribute('loading-number', loadingNumber.toString())\n }\n removeClass(target, ns.bm('parent', 'hidden'))\n }\n removeElLoadingChild()\n loadingInstance.unmount()\n }\n function removeElLoadingChild(): void {\n vm.$el?.parentNode?.removeChild(vm.$el)\n }\n function close() {\n if (options.beforeClose && !options.beforeClose()) return\n\n afterLeaveFlag.value = true\n clearTimeout(afterLeaveTimer)\n\n afterLeaveTimer = setTimeout(handleAfterLeave, 400)\n data.visible = false\n\n options.closed?.()\n }\n\n function handleAfterLeave() {\n if (!afterLeaveFlag.value) return\n const target = data.parent\n afterLeaveFlag.value = false\n target.vLoadingAddClassList = undefined\n destroySelf()\n }\n\n const elLoadingComponent = defineComponent({\n name: 'ElLoading',\n setup(_, { expose }) {\n const { ns, zIndex } = useGlobalComponentSettings('loading')\n\n expose({\n ns,\n zIndex,\n })\n\n return () => {\n const svg = data.spinner || data.svg\n const spinner = h(\n 'svg',\n {\n class: 'circular',\n viewBox: data.svgViewBox ? data.svgViewBox : '0 0 50 50',\n ...(svg ? { innerHTML: svg } : {}),\n },\n [\n h('circle', {\n class: 'path',\n cx: '25',\n cy: '25',\n r: '20',\n fill: 'none',\n }),\n ]\n )\n\n const spinnerText = data.text\n ? h('p', { class: ns.b('text') }, [data.text])\n : undefined\n\n return h(\n Transition,\n {\n name: ns.b('fade'),\n onAfterLeave: handleAfterLeave,\n },\n {\n default: withCtx(() => [\n withDirectives(\n createVNode(\n 'div',\n {\n style: {\n backgroundColor: data.background || '',\n },\n class: [\n ns.b('mask'),\n data.customClass,\n data.fullscreen ? 'is-fullscreen' : '',\n ],\n },\n [\n h(\n 'div',\n {\n class: ns.b('spinner'),\n },\n [spinner, spinnerText]\n ),\n ]\n ),\n [[vShow, data.visible]]\n ),\n ]),\n }\n )\n }\n },\n })\n\n const loadingInstance = createApp(elLoadingComponent)\n const vm = loadingInstance.mount(document.createElement('div'))\n\n return {\n ...toRefs(data),\n setText,\n removeElLoadingChild,\n close,\n handleAfterLeave,\n vm,\n get $el(): HTMLElement {\n return vm.$el\n },\n }\n}\n\nexport type LoadingInstance = ReturnType<typeof createLoadingComponent>\n"],"names":[],"mappings":";;;;;;AAeO,SAAS,sBAAsB,CAAC,OAAO,EAAE;AAChD,EAAE,IAAI,eAAe,CAAC;AACtB,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,EAAE,MAAM,IAAI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,MAAM,CAAC;AAC5B,gBAAgB,IAAI,CAAC,WAAW;AAChC,gBAAgB,IAAI,CAAC,UAAU,GAAG,eAAe,GAAG,EAAE;AACtD,eAAe;AACf,aAAa,EAAE;AACf,cAAc,CAAC,CAAC,KAAK,EAAE;AACvB,gBAAgB,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACtC,eAAe,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AACxC,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;AACxC,WAAW,CAAC;AACZ,SAAS,CAAC,CAAC;AACX,OAAO,CAAC;AACR,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,eAAe,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC;AACxD,EAAE,MAAM,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAClE,EAAE,OAAO;AACT,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;AACnB,IAAI,OAAO;AACX,IAAI,oBAAoB;AACxB,IAAI,KAAK;AACT,IAAI,gBAAgB;AACpB,IAAI,EAAE;AACN,IAAI,IAAI,GAAG,GAAG;AACd,MAAM,OAAO,EAAE,CAAC,GAAG,CAAC;AACpB,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Select from './src/
|
|
2
|
+
import Select from './src/select.mjs';
|
|
3
3
|
import Option from './src/option.mjs';
|
|
4
4
|
import OptionGroup from './src/option-group.mjs';
|
|
5
5
|
export { selectGroupKey, selectKey } from './src/token.mjs';
|
|
@@ -1,109 +1,403 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../../../
|
|
3
|
-
import '
|
|
4
|
-
import '../../
|
|
5
|
-
import {
|
|
6
|
-
import '../../
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
1
|
+
import { defineComponent, provide, reactive, resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, toHandlerKey, withModifiers, createVNode, withCtx, createElementVNode, renderSlot, createCommentVNode, Fragment, renderList, normalizeStyle, createTextVNode, toDisplayString, createBlock, withKeys, vModelText, resolveDynamicComponent, vShow } from 'vue';
|
|
2
|
+
import '../../../directives/index.mjs';
|
|
3
|
+
import { ElTooltip } from '../../tooltip/index.mjs';
|
|
4
|
+
import { ElScrollbar } from '../../scrollbar/index.mjs';
|
|
5
|
+
import { ElTag } from '../../tag/index.mjs';
|
|
6
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
7
|
+
import '../../../constants/index.mjs';
|
|
8
|
+
import Option from './option.mjs';
|
|
9
|
+
import ElSelectMenu from './select-dropdown.mjs';
|
|
10
|
+
import { useSelect } from './useSelect.mjs';
|
|
11
|
+
import { selectKey } from './token.mjs';
|
|
12
|
+
import ElOptions from './options.mjs';
|
|
13
|
+
import { SelectProps } from './select2.mjs';
|
|
14
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
15
|
+
import ClickOutside from '../../../directives/click-outside/index.mjs';
|
|
16
|
+
import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
|
14
17
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const COMPONENT_NAME = "ElSelect";
|
|
19
|
+
const _sfc_main = defineComponent({
|
|
20
|
+
name: COMPONENT_NAME,
|
|
21
|
+
componentName: COMPONENT_NAME,
|
|
22
|
+
components: {
|
|
23
|
+
ElSelectMenu,
|
|
24
|
+
ElOption: Option,
|
|
25
|
+
ElOptions,
|
|
26
|
+
ElTag,
|
|
27
|
+
ElScrollbar,
|
|
28
|
+
ElTooltip,
|
|
29
|
+
ElIcon
|
|
21
30
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
remoteMethod: Function,
|
|
50
|
-
filterMethod: Function,
|
|
51
|
-
multiple: Boolean,
|
|
52
|
-
multipleLimit: {
|
|
53
|
-
type: Number,
|
|
54
|
-
default: 0
|
|
55
|
-
},
|
|
56
|
-
placeholder: {
|
|
57
|
-
type: String
|
|
58
|
-
},
|
|
59
|
-
defaultFirstOption: Boolean,
|
|
60
|
-
reserveKeyword: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: true
|
|
63
|
-
},
|
|
64
|
-
valueKey: {
|
|
65
|
-
type: String,
|
|
66
|
-
default: "value"
|
|
67
|
-
},
|
|
68
|
-
collapseTags: Boolean,
|
|
69
|
-
collapseTagsTooltip: Boolean,
|
|
70
|
-
maxCollapseTags: {
|
|
71
|
-
type: Number,
|
|
72
|
-
default: 1
|
|
73
|
-
},
|
|
74
|
-
teleported: useTooltipContentProps.teleported,
|
|
75
|
-
persistent: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: true
|
|
78
|
-
},
|
|
79
|
-
clearIcon: {
|
|
80
|
-
type: iconPropType,
|
|
81
|
-
default: CircleClose
|
|
82
|
-
},
|
|
83
|
-
fitInputWidth: Boolean,
|
|
84
|
-
suffixIcon: {
|
|
85
|
-
type: iconPropType,
|
|
86
|
-
default: ArrowDown
|
|
87
|
-
},
|
|
88
|
-
tagType: { ...tagProps.type, default: "info" },
|
|
89
|
-
tagEffect: { ...tagProps.effect, default: "light" },
|
|
90
|
-
validateEvent: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
default: true
|
|
93
|
-
},
|
|
94
|
-
remoteShowSuffix: Boolean,
|
|
95
|
-
placement: {
|
|
96
|
-
type: definePropType(String),
|
|
97
|
-
values: placements,
|
|
98
|
-
default: "bottom-start"
|
|
99
|
-
},
|
|
100
|
-
fallbackPlacements: {
|
|
101
|
-
type: definePropType(Array),
|
|
102
|
-
default: ["bottom-start", "top-start", "right", "left"]
|
|
103
|
-
},
|
|
104
|
-
...useEmptyValuesProps,
|
|
105
|
-
...useAriaProps(["ariaLabel"])
|
|
31
|
+
directives: { ClickOutside },
|
|
32
|
+
props: SelectProps,
|
|
33
|
+
emits: [
|
|
34
|
+
UPDATE_MODEL_EVENT,
|
|
35
|
+
CHANGE_EVENT,
|
|
36
|
+
"remove-tag",
|
|
37
|
+
"clear",
|
|
38
|
+
"visible-change",
|
|
39
|
+
"focus",
|
|
40
|
+
"blur"
|
|
41
|
+
],
|
|
42
|
+
setup(props, { emit }) {
|
|
43
|
+
const API = useSelect(props, emit);
|
|
44
|
+
provide(selectKey, reactive({
|
|
45
|
+
props,
|
|
46
|
+
states: API.states,
|
|
47
|
+
optionsArray: API.optionsArray,
|
|
48
|
+
handleOptionSelect: API.handleOptionSelect,
|
|
49
|
+
onOptionCreate: API.onOptionCreate,
|
|
50
|
+
onOptionDestroy: API.onOptionDestroy,
|
|
51
|
+
selectRef: API.selectRef,
|
|
52
|
+
setSelected: API.setSelected
|
|
53
|
+
}));
|
|
54
|
+
return {
|
|
55
|
+
...API
|
|
56
|
+
};
|
|
57
|
+
}
|
|
106
58
|
});
|
|
59
|
+
const _hoisted_1 = ["id", "name", "disabled", "autocomplete", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label"];
|
|
60
|
+
const _hoisted_2 = ["textContent"];
|
|
61
|
+
const _hoisted_3 = { key: 1 };
|
|
62
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
63
|
+
const _component_el_tag = resolveComponent("el-tag");
|
|
64
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
65
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
66
|
+
const _component_el_option = resolveComponent("el-option");
|
|
67
|
+
const _component_el_options = resolveComponent("el-options");
|
|
68
|
+
const _component_el_scrollbar = resolveComponent("el-scrollbar");
|
|
69
|
+
const _component_el_select_menu = resolveComponent("el-select-menu");
|
|
70
|
+
const _directive_click_outside = resolveDirective("click-outside");
|
|
71
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
72
|
+
ref: "selectRef",
|
|
73
|
+
class: normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]),
|
|
74
|
+
[toHandlerKey(_ctx.mouseEnterEventName)]: _cache[16] || (_cache[16] = ($event) => _ctx.states.inputHovering = true),
|
|
75
|
+
onMouseleave: _cache[17] || (_cache[17] = ($event) => _ctx.states.inputHovering = false),
|
|
76
|
+
onClick: _cache[18] || (_cache[18] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent", "stop"]))
|
|
77
|
+
}, [
|
|
78
|
+
createVNode(_component_el_tooltip, {
|
|
79
|
+
ref: "tooltipRef",
|
|
80
|
+
visible: _ctx.dropdownMenuVisible,
|
|
81
|
+
placement: _ctx.placement,
|
|
82
|
+
teleported: _ctx.teleported,
|
|
83
|
+
"popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
|
|
84
|
+
"popper-options": _ctx.popperOptions,
|
|
85
|
+
"fallback-placements": _ctx.fallbackPlacements,
|
|
86
|
+
effect: _ctx.effect,
|
|
87
|
+
pure: "",
|
|
88
|
+
trigger: "click",
|
|
89
|
+
transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
|
|
90
|
+
"stop-popper-mouse-event": false,
|
|
91
|
+
"gpu-acceleration": false,
|
|
92
|
+
persistent: _ctx.persistent,
|
|
93
|
+
onBeforeShow: _ctx.handleMenuEnter,
|
|
94
|
+
onHide: _cache[15] || (_cache[15] = ($event) => _ctx.states.isBeforeHide = false)
|
|
95
|
+
}, {
|
|
96
|
+
default: withCtx(() => {
|
|
97
|
+
var _a;
|
|
98
|
+
return [
|
|
99
|
+
createElementVNode("div", {
|
|
100
|
+
ref: "wrapperRef",
|
|
101
|
+
class: normalizeClass([
|
|
102
|
+
_ctx.nsSelect.e("wrapper"),
|
|
103
|
+
_ctx.nsSelect.is("focused", _ctx.isFocused),
|
|
104
|
+
_ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
|
|
105
|
+
_ctx.nsSelect.is("filterable", _ctx.filterable),
|
|
106
|
+
_ctx.nsSelect.is("disabled", _ctx.selectDisabled)
|
|
107
|
+
])
|
|
108
|
+
}, [
|
|
109
|
+
_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
|
|
110
|
+
key: 0,
|
|
111
|
+
ref: "prefixRef",
|
|
112
|
+
class: normalizeClass(_ctx.nsSelect.e("prefix"))
|
|
113
|
+
}, [
|
|
114
|
+
renderSlot(_ctx.$slots, "prefix")
|
|
115
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
116
|
+
createElementVNode("div", {
|
|
117
|
+
ref: "selectionRef",
|
|
118
|
+
class: normalizeClass([
|
|
119
|
+
_ctx.nsSelect.e("selection"),
|
|
120
|
+
_ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.states.selected.length)
|
|
121
|
+
])
|
|
122
|
+
}, [
|
|
123
|
+
_ctx.multiple ? renderSlot(_ctx.$slots, "tag", { key: 0 }, () => [
|
|
124
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => {
|
|
125
|
+
return openBlock(), createElementBlock("div", {
|
|
126
|
+
key: _ctx.getValueKey(item),
|
|
127
|
+
class: normalizeClass(_ctx.nsSelect.e("selected-item"))
|
|
128
|
+
}, [
|
|
129
|
+
createVNode(_component_el_tag, {
|
|
130
|
+
closable: !_ctx.selectDisabled && !item.isDisabled,
|
|
131
|
+
size: _ctx.collapseTagSize,
|
|
132
|
+
type: _ctx.tagType,
|
|
133
|
+
effect: _ctx.tagEffect,
|
|
134
|
+
"disable-transitions": "",
|
|
135
|
+
style: normalizeStyle(_ctx.tagStyle),
|
|
136
|
+
onClose: ($event) => _ctx.deleteTag($event, item)
|
|
137
|
+
}, {
|
|
138
|
+
default: withCtx(() => [
|
|
139
|
+
createElementVNode("span", {
|
|
140
|
+
class: normalizeClass(_ctx.nsSelect.e("tags-text"))
|
|
141
|
+
}, [
|
|
142
|
+
renderSlot(_ctx.$slots, "label", {
|
|
143
|
+
label: item.currentLabel,
|
|
144
|
+
value: item.value
|
|
145
|
+
}, () => [
|
|
146
|
+
createTextVNode(toDisplayString(item.currentLabel), 1)
|
|
147
|
+
])
|
|
148
|
+
], 2)
|
|
149
|
+
]),
|
|
150
|
+
_: 2
|
|
151
|
+
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
|
|
152
|
+
], 2);
|
|
153
|
+
}), 128)),
|
|
154
|
+
_ctx.collapseTags && _ctx.states.selected.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
155
|
+
key: 0,
|
|
156
|
+
ref: "tagTooltipRef",
|
|
157
|
+
disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
|
|
158
|
+
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
159
|
+
effect: _ctx.effect,
|
|
160
|
+
placement: "bottom",
|
|
161
|
+
teleported: _ctx.teleported
|
|
162
|
+
}, {
|
|
163
|
+
default: withCtx(() => [
|
|
164
|
+
createElementVNode("div", {
|
|
165
|
+
ref: "collapseItemRef",
|
|
166
|
+
class: normalizeClass(_ctx.nsSelect.e("selected-item"))
|
|
167
|
+
}, [
|
|
168
|
+
createVNode(_component_el_tag, {
|
|
169
|
+
closable: false,
|
|
170
|
+
size: _ctx.collapseTagSize,
|
|
171
|
+
type: _ctx.tagType,
|
|
172
|
+
effect: _ctx.tagEffect,
|
|
173
|
+
"disable-transitions": "",
|
|
174
|
+
style: normalizeStyle(_ctx.collapseTagStyle)
|
|
175
|
+
}, {
|
|
176
|
+
default: withCtx(() => [
|
|
177
|
+
createElementVNode("span", {
|
|
178
|
+
class: normalizeClass(_ctx.nsSelect.e("tags-text"))
|
|
179
|
+
}, " + " + toDisplayString(_ctx.states.selected.length - _ctx.maxCollapseTags), 3)
|
|
180
|
+
]),
|
|
181
|
+
_: 1
|
|
182
|
+
}, 8, ["size", "type", "effect", "style"])
|
|
183
|
+
], 2)
|
|
184
|
+
]),
|
|
185
|
+
content: withCtx(() => [
|
|
186
|
+
createElementVNode("div", {
|
|
187
|
+
ref: "tagMenuRef",
|
|
188
|
+
class: normalizeClass(_ctx.nsSelect.e("selection"))
|
|
189
|
+
}, [
|
|
190
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.collapseTagList, (item) => {
|
|
191
|
+
return openBlock(), createElementBlock("div", {
|
|
192
|
+
key: _ctx.getValueKey(item),
|
|
193
|
+
class: normalizeClass(_ctx.nsSelect.e("selected-item"))
|
|
194
|
+
}, [
|
|
195
|
+
createVNode(_component_el_tag, {
|
|
196
|
+
class: "in-tooltip",
|
|
197
|
+
closable: !_ctx.selectDisabled && !item.isDisabled,
|
|
198
|
+
size: _ctx.collapseTagSize,
|
|
199
|
+
type: _ctx.tagType,
|
|
200
|
+
effect: _ctx.tagEffect,
|
|
201
|
+
"disable-transitions": "",
|
|
202
|
+
onClose: ($event) => _ctx.deleteTag($event, item)
|
|
203
|
+
}, {
|
|
204
|
+
default: withCtx(() => [
|
|
205
|
+
createElementVNode("span", {
|
|
206
|
+
class: normalizeClass(_ctx.nsSelect.e("tags-text"))
|
|
207
|
+
}, [
|
|
208
|
+
renderSlot(_ctx.$slots, "label", {
|
|
209
|
+
label: item.currentLabel,
|
|
210
|
+
value: item.value
|
|
211
|
+
}, () => [
|
|
212
|
+
createTextVNode(toDisplayString(item.currentLabel), 1)
|
|
213
|
+
])
|
|
214
|
+
], 2)
|
|
215
|
+
]),
|
|
216
|
+
_: 2
|
|
217
|
+
}, 1032, ["closable", "size", "type", "effect", "onClose"])
|
|
218
|
+
], 2);
|
|
219
|
+
}), 128))
|
|
220
|
+
], 2)
|
|
221
|
+
]),
|
|
222
|
+
_: 3
|
|
223
|
+
}, 8, ["disabled", "effect", "teleported"])) : createCommentVNode("v-if", true)
|
|
224
|
+
]) : createCommentVNode("v-if", true),
|
|
225
|
+
!_ctx.selectDisabled ? (openBlock(), createElementBlock("div", {
|
|
226
|
+
key: 1,
|
|
227
|
+
class: normalizeClass([
|
|
228
|
+
_ctx.nsSelect.e("selected-item"),
|
|
229
|
+
_ctx.nsSelect.e("input-wrapper"),
|
|
230
|
+
_ctx.nsSelect.is("hidden", !_ctx.filterable)
|
|
231
|
+
])
|
|
232
|
+
}, [
|
|
233
|
+
withDirectives(createElementVNode("input", {
|
|
234
|
+
id: _ctx.inputId,
|
|
235
|
+
ref: "inputRef",
|
|
236
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.states.inputValue = $event),
|
|
237
|
+
type: "text",
|
|
238
|
+
name: _ctx.name,
|
|
239
|
+
class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
|
|
240
|
+
disabled: _ctx.selectDisabled,
|
|
241
|
+
autocomplete: _ctx.autocomplete,
|
|
242
|
+
style: normalizeStyle(_ctx.inputStyle),
|
|
243
|
+
role: "combobox",
|
|
244
|
+
readonly: !_ctx.filterable,
|
|
245
|
+
spellcheck: "false",
|
|
246
|
+
"aria-activedescendant": ((_a = _ctx.hoverOption) == null ? void 0 : _a.id) || "",
|
|
247
|
+
"aria-controls": _ctx.contentId,
|
|
248
|
+
"aria-expanded": _ctx.dropdownMenuVisible,
|
|
249
|
+
"aria-label": _ctx.ariaLabel,
|
|
250
|
+
"aria-autocomplete": "none",
|
|
251
|
+
"aria-haspopup": "listbox",
|
|
252
|
+
onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
|
|
253
|
+
onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
|
|
254
|
+
onKeydown: [
|
|
255
|
+
_cache[3] || (_cache[3] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["stop", "prevent"]), ["down"])),
|
|
256
|
+
_cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["stop", "prevent"]), ["up"])),
|
|
257
|
+
_cache[5] || (_cache[5] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), ["stop", "prevent"]), ["esc"])),
|
|
258
|
+
_cache[6] || (_cache[6] = withKeys(withModifiers((...args) => _ctx.selectOption && _ctx.selectOption(...args), ["stop", "prevent"]), ["enter"])),
|
|
259
|
+
_cache[7] || (_cache[7] = withKeys(withModifiers((...args) => _ctx.deletePrevTag && _ctx.deletePrevTag(...args), ["stop"]), ["delete"]))
|
|
260
|
+
],
|
|
261
|
+
onCompositionstart: _cache[8] || (_cache[8] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
|
|
262
|
+
onCompositionupdate: _cache[9] || (_cache[9] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
|
|
263
|
+
onCompositionend: _cache[10] || (_cache[10] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
|
|
264
|
+
onInput: _cache[11] || (_cache[11] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
|
|
265
|
+
onClick: _cache[12] || (_cache[12] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
|
|
266
|
+
}, null, 46, _hoisted_1), [
|
|
267
|
+
[vModelText, _ctx.states.inputValue]
|
|
268
|
+
]),
|
|
269
|
+
_ctx.filterable ? (openBlock(), createElementBlock("span", {
|
|
270
|
+
key: 0,
|
|
271
|
+
ref: "calculatorRef",
|
|
272
|
+
"aria-hidden": "true",
|
|
273
|
+
class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
|
|
274
|
+
textContent: toDisplayString(_ctx.states.inputValue)
|
|
275
|
+
}, null, 10, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
276
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
277
|
+
_ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
|
|
278
|
+
key: 2,
|
|
279
|
+
class: normalizeClass([
|
|
280
|
+
_ctx.nsSelect.e("selected-item"),
|
|
281
|
+
_ctx.nsSelect.e("placeholder"),
|
|
282
|
+
_ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
|
|
283
|
+
])
|
|
284
|
+
}, [
|
|
285
|
+
_ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
|
|
286
|
+
key: 0,
|
|
287
|
+
label: _ctx.currentPlaceholder,
|
|
288
|
+
value: _ctx.modelValue
|
|
289
|
+
}, () => [
|
|
290
|
+
createElementVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)
|
|
291
|
+
]) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(_ctx.currentPlaceholder), 1))
|
|
292
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
293
|
+
], 2),
|
|
294
|
+
createElementVNode("div", {
|
|
295
|
+
ref: "suffixRef",
|
|
296
|
+
class: normalizeClass(_ctx.nsSelect.e("suffix"))
|
|
297
|
+
}, [
|
|
298
|
+
_ctx.iconComponent && !_ctx.showClose ? (openBlock(), createBlock(_component_el_icon, {
|
|
299
|
+
key: 0,
|
|
300
|
+
class: normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsSelect.e("icon"), _ctx.iconReverse])
|
|
301
|
+
}, {
|
|
302
|
+
default: withCtx(() => [
|
|
303
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
|
|
304
|
+
]),
|
|
305
|
+
_: 1
|
|
306
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
|
307
|
+
_ctx.showClose && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
|
|
308
|
+
key: 1,
|
|
309
|
+
class: normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsSelect.e("icon")]),
|
|
310
|
+
onClick: _ctx.handleClearClick
|
|
311
|
+
}, {
|
|
312
|
+
default: withCtx(() => [
|
|
313
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
|
|
314
|
+
]),
|
|
315
|
+
_: 1
|
|
316
|
+
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
|
|
317
|
+
_ctx.validateState && _ctx.validateIcon ? (openBlock(), createBlock(_component_el_icon, {
|
|
318
|
+
key: 2,
|
|
319
|
+
class: normalizeClass([_ctx.nsInput.e("icon"), _ctx.nsInput.e("validateIcon")])
|
|
320
|
+
}, {
|
|
321
|
+
default: withCtx(() => [
|
|
322
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))
|
|
323
|
+
]),
|
|
324
|
+
_: 1
|
|
325
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
326
|
+
], 2)
|
|
327
|
+
], 2)
|
|
328
|
+
];
|
|
329
|
+
}),
|
|
330
|
+
content: withCtx(() => [
|
|
331
|
+
createVNode(_component_el_select_menu, { ref: "menuRef" }, {
|
|
332
|
+
default: withCtx(() => [
|
|
333
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
334
|
+
key: 0,
|
|
335
|
+
class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
|
|
336
|
+
onClick: _cache[13] || (_cache[13] = withModifiers(() => {
|
|
337
|
+
}, ["stop"]))
|
|
338
|
+
}, [
|
|
339
|
+
renderSlot(_ctx.$slots, "header")
|
|
340
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
341
|
+
withDirectives(createVNode(_component_el_scrollbar, {
|
|
342
|
+
id: _ctx.contentId,
|
|
343
|
+
ref: "scrollbarRef",
|
|
344
|
+
tag: "ul",
|
|
345
|
+
"wrap-class": _ctx.nsSelect.be("dropdown", "wrap"),
|
|
346
|
+
"view-class": _ctx.nsSelect.be("dropdown", "list"),
|
|
347
|
+
class: normalizeClass([_ctx.nsSelect.is("empty", _ctx.filteredOptionsCount === 0)]),
|
|
348
|
+
role: "listbox",
|
|
349
|
+
"aria-label": _ctx.ariaLabel,
|
|
350
|
+
"aria-orientation": "vertical"
|
|
351
|
+
}, {
|
|
352
|
+
default: withCtx(() => [
|
|
353
|
+
_ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, {
|
|
354
|
+
key: 0,
|
|
355
|
+
value: _ctx.states.inputValue,
|
|
356
|
+
created: true
|
|
357
|
+
}, null, 8, ["value"])) : createCommentVNode("v-if", true),
|
|
358
|
+
createVNode(_component_el_options, null, {
|
|
359
|
+
default: withCtx(() => [
|
|
360
|
+
renderSlot(_ctx.$slots, "default")
|
|
361
|
+
]),
|
|
362
|
+
_: 3
|
|
363
|
+
})
|
|
364
|
+
]),
|
|
365
|
+
_: 3
|
|
366
|
+
}, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [
|
|
367
|
+
[vShow, _ctx.states.options.size > 0 && !_ctx.loading]
|
|
368
|
+
]),
|
|
369
|
+
_ctx.$slots.loading && _ctx.loading ? (openBlock(), createElementBlock("div", {
|
|
370
|
+
key: 1,
|
|
371
|
+
class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading"))
|
|
372
|
+
}, [
|
|
373
|
+
renderSlot(_ctx.$slots, "loading")
|
|
374
|
+
], 2)) : _ctx.loading || _ctx.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", {
|
|
375
|
+
key: 2,
|
|
376
|
+
class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty"))
|
|
377
|
+
}, [
|
|
378
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
379
|
+
createElementVNode("span", null, toDisplayString(_ctx.emptyText), 1)
|
|
380
|
+
])
|
|
381
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
382
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
383
|
+
key: 3,
|
|
384
|
+
class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
|
|
385
|
+
onClick: _cache[14] || (_cache[14] = withModifiers(() => {
|
|
386
|
+
}, ["stop"]))
|
|
387
|
+
}, [
|
|
388
|
+
renderSlot(_ctx.$slots, "footer")
|
|
389
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
390
|
+
]),
|
|
391
|
+
_: 3
|
|
392
|
+
}, 512)
|
|
393
|
+
]),
|
|
394
|
+
_: 3
|
|
395
|
+
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "onBeforeShow"])
|
|
396
|
+
], 16)), [
|
|
397
|
+
[_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
|
|
398
|
+
]);
|
|
399
|
+
}
|
|
400
|
+
var Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "select.vue"]]);
|
|
107
401
|
|
|
108
|
-
export {
|
|
402
|
+
export { Select as default };
|
|
109
403
|
//# sourceMappingURL=select.mjs.map
|