@element-plus/nightly 0.0.20241207 → 0.0.20241209
Sign up to get free protection for your applications and to get access to all the features.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +13 -11
- package/dist/index.full.min.js +15 -15
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +9 -9
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +13 -11
- 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/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.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 +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +7 -69
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +69 -7
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +399 -40
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +40 -399
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +1 -0
- package/es/components/dropdown/src/dropdown.mjs +10 -1
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +3 -1
- package/es/components/dropdown/src/dropdown2.mjs +0 -8
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/index.mjs +5 -5
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +49 -24
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +24 -49
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +17 -35
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +35 -17
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/select-v2/src/useSelect.mjs +1 -1
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton.mjs +48 -21
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +21 -48
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/tour/index.mjs +1 -1
- package/es/components/tour/src/content.mjs +67 -43
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +43 -67
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +1 -1
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/components/tree-v2/src/composables/useFilter.mjs +1 -1
- package/es/components/tree-v2/src/composables/useFilter.mjs.map +1 -1
- package/es/components/tree-v2/src/types.d.ts +1 -1
- package/es/index.mjs +5 -5
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +7 -69
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +69 -7
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +397 -40
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +40 -397
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +1 -0
- package/lib/components/dropdown/src/dropdown.js +10 -1
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -1
- package/lib/components/dropdown/src/dropdown2.js +0 -8
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/index.js +5 -5
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +49 -25
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +25 -49
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +18 -35
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +35 -18
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/select-v2/src/useSelect.js +1 -1
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton.js +48 -21
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +21 -48
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/tour/index.js +1 -1
- package/lib/components/tour/src/content.js +67 -46
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +46 -67
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/step.js +1 -1
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/components/tree-v2/src/composables/useFilter.js +1 -1
- package/lib/components/tree-v2/src/composables/useFilter.js.map +1 -1
- package/lib/components/tree-v2/src/types.d.ts +1 -1
- package/lib/index.js +5 -5
- 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/theme-chalk/el-input.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/input.scss +1 -0
- package/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dropdown2.mjs","sources":["../../../../../../packages/components/dropdown/src/dropdown.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.is('disabled', disabled)]\">\n <el-tooltip\n ref=\"popperRef\"\n :role=\"role\"\n :effect=\"effect\"\n :fallback-placements=\"['bottom', 'top']\"\n :popper-options=\"popperOptions\"\n :gpu-acceleration=\"false\"\n :hide-after=\"trigger === 'hover' ? hideTimeout : 0\"\n :manual-mode=\"true\"\n :placement=\"placement\"\n :popper-class=\"[ns.e('popper'), popperClass]\"\n :reference-element=\"referenceElementRef?.$el\"\n :trigger=\"trigger\"\n :trigger-keys=\"triggerKeys\"\n :trigger-target-el=\"contentRef\"\n :show-after=\"trigger === 'hover' ? showTimeout : 0\"\n :stop-popper-mouse-event=\"false\"\n :virtual-ref=\"triggeringElementRef\"\n :virtual-triggering=\"splitButton\"\n :disabled=\"disabled\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n :teleported=\"teleported\"\n pure\n persistent\n @before-show=\"handleBeforeShowTooltip\"\n @show=\"handleShowTooltip\"\n @before-hide=\"handleBeforeHideTooltip\"\n >\n <template #content>\n <el-scrollbar\n ref=\"scrollbar\"\n :wrap-style=\"wrapStyle\"\n tag=\"div\"\n :view-class=\"ns.e('list')\"\n >\n <el-roving-focus-group\n :loop=\"loop\"\n :current-tab-id=\"currentTabId\"\n orientation=\"horizontal\"\n @current-tab-id-change=\"handleCurrentTabIdChange\"\n @entry-focus=\"handleEntryFocus\"\n >\n <el-dropdown-collection>\n <slot name=\"dropdown\" />\n </el-dropdown-collection>\n </el-roving-focus-group>\n </el-scrollbar>\n </template>\n <template v-if=\"!splitButton\" #default>\n <el-only-child\n :id=\"triggerId\"\n ref=\"triggeringElementRef\"\n role=\"button\"\n :tabindex=\"tabindex\"\n >\n <slot name=\"default\" />\n </el-only-child>\n </template>\n </el-tooltip>\n <template v-if=\"splitButton\">\n <el-button-group>\n <el-button\n ref=\"referenceElementRef\"\n v-bind=\"buttonProps\"\n :size=\"dropdownSize\"\n :type=\"type\"\n :disabled=\"disabled\"\n :tabindex=\"tabindex\"\n @click=\"handlerMainButtonClick\"\n >\n <slot name=\"default\" />\n </el-button>\n <el-button\n :id=\"triggerId\"\n ref=\"triggeringElementRef\"\n v-bind=\"buttonProps\"\n role=\"button\"\n :size=\"dropdownSize\"\n :type=\"type\"\n :class=\"ns.e('caret-button')\"\n :disabled=\"disabled\"\n :tabindex=\"tabindex\"\n :aria-label=\"t('el.dropdown.toggleDropdown')\"\n >\n <el-icon :class=\"ns.e('icon')\"><arrow-down /></el-icon>\n </el-button>\n </el-button-group>\n </template>\n </div>\n</template>\n<script lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n onBeforeUnmount,\n provide,\n ref,\n toRef,\n unref,\n watch,\n} from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport ElIcon from '@element-plus/components/icon'\nimport ElRovingFocusGroup from '@element-plus/components/roving-focus-group'\nimport { ElOnlyChild } from '@element-plus/components/slot'\nimport { useFormSize } from '@element-plus/components/form'\nimport { addUnit, ensureArray } from '@element-plus/utils'\nimport { ArrowDown } from '@element-plus/icons-vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { useId, useLocale, useNamespace } from '@element-plus/hooks'\nimport { ElCollection as ElDropdownCollection, dropdownProps } from './dropdown'\nimport { DROPDOWN_INJECTION_KEY } from './tokens'\n\nimport type { CSSProperties } from 'vue'\n\nconst { ButtonGroup: ElButtonGroup } = ElButton\n\nexport default defineComponent({\n name: 'ElDropdown',\n components: {\n ElButton,\n ElButtonGroup,\n ElScrollbar,\n ElDropdownCollection,\n ElTooltip,\n ElRovingFocusGroup,\n ElOnlyChild,\n ElIcon,\n ArrowDown,\n },\n props: dropdownProps,\n emits: ['visible-change', 'click', 'command'],\n setup(props, { emit }) {\n const _instance = getCurrentInstance()\n const ns = useNamespace('dropdown')\n const { t } = useLocale()\n\n const triggeringElementRef = ref()\n const referenceElementRef = ref()\n const popperRef = ref<InstanceType<typeof ElTooltip> | null>(null)\n const contentRef = ref<HTMLElement | null>(null)\n const scrollbar = ref(null)\n const currentTabId = ref<string | null>(null)\n const isUsingKeyboard = ref(false)\n const triggerKeys = [\n EVENT_CODE.enter,\n EVENT_CODE.numpadEnter,\n EVENT_CODE.space,\n EVENT_CODE.down,\n ]\n\n const wrapStyle = computed<CSSProperties>(() => ({\n maxHeight: addUnit(props.maxHeight),\n }))\n const dropdownTriggerKls = computed(() => [ns.m(dropdownSize.value)])\n const trigger = computed(() => ensureArray(props.trigger))\n\n const defaultTriggerId = useId().value\n const triggerId = computed<string>(() => props.id || defaultTriggerId)\n\n // The goal of this code is to focus on the tooltip triggering element when it is hovered.\n // This is a temporary fix for where closing the dropdown through pointerleave event focuses on a\n // completely different element. For a permanent solution, remove all calls to any \"element.focus()\"\n // that are triggered through pointer enter/leave events.\n watch(\n [triggeringElementRef, trigger],\n ([triggeringElement, trigger], [prevTriggeringElement]) => {\n if (prevTriggeringElement?.$el?.removeEventListener) {\n prevTriggeringElement.$el.removeEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n if (triggeringElement?.$el?.removeEventListener) {\n triggeringElement.$el.removeEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n if (\n triggeringElement?.$el?.addEventListener &&\n trigger.includes('hover')\n ) {\n triggeringElement.$el.addEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n },\n { immediate: true }\n )\n\n onBeforeUnmount(() => {\n if (triggeringElementRef.value?.$el?.removeEventListener) {\n triggeringElementRef.value.$el.removeEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n })\n\n function handleClick() {\n handleClose()\n }\n\n function handleClose() {\n popperRef.value?.onClose()\n }\n\n function handleOpen() {\n popperRef.value?.onOpen()\n }\n\n const dropdownSize = useFormSize()\n\n function commandHandler(...args: any[]) {\n emit('command', ...args)\n }\n\n function onAutofocusTriggerEnter() {\n triggeringElementRef.value?.$el?.focus()\n }\n\n function onItemEnter() {\n // NOOP for now\n }\n\n function onItemLeave() {\n const contentEl = unref(contentRef)\n\n trigger.value.includes('hover') && contentEl?.focus()\n currentTabId.value = null\n }\n\n function handleCurrentTabIdChange(id: string) {\n currentTabId.value = id\n }\n\n function handleEntryFocus(e: Event) {\n if (!isUsingKeyboard.value) {\n e.preventDefault()\n e.stopImmediatePropagation()\n }\n }\n\n function handleBeforeShowTooltip() {\n emit('visible-change', true)\n }\n\n function handleShowTooltip(event?: Event) {\n if (event?.type === 'keydown') {\n contentRef.value.focus()\n }\n }\n\n function handleBeforeHideTooltip() {\n emit('visible-change', false)\n }\n\n provide(DROPDOWN_INJECTION_KEY, {\n contentRef,\n role: computed(() => props.role),\n triggerId,\n isUsingKeyboard,\n onItemEnter,\n onItemLeave,\n })\n\n provide('elDropdown', {\n instance: _instance,\n dropdownSize,\n handleClick,\n commandHandler,\n trigger: toRef(props, 'trigger'),\n hideOnClick: toRef(props, 'hideOnClick'),\n })\n\n const onFocusAfterTrapped = (e: Event) => {\n e.preventDefault()\n contentRef.value?.focus?.({\n preventScroll: true,\n })\n }\n\n const handlerMainButtonClick = (event: MouseEvent) => {\n emit('click', event)\n }\n\n return {\n t,\n ns,\n scrollbar,\n wrapStyle,\n dropdownTriggerKls,\n dropdownSize,\n triggerId,\n triggerKeys,\n currentTabId,\n handleCurrentTabIdChange,\n handlerMainButtonClick,\n handleEntryFocus,\n handleClose,\n handleOpen,\n handleBeforeShowTooltip,\n handleShowTooltip,\n handleBeforeHideTooltip,\n onFocusAfterTrapped,\n popperRef,\n contentRef,\n triggeringElementRef,\n referenceElementRef,\n }\n },\n})\n</script>\n"],"names":["ElDropdownCollection","ElOnlyChild","ensureArray","_resolveComponent","_createSlots","_withCtx","_createVNode","_renderSlot","_openBlock","_createBlock","_mergeProps","_normalizeClass","_createCommentVNode"],"mappings":";;;;;;;;;;;;;;;;;;;AAyHA,MAAM,EAAE,WAAa,EAAA,aAAA,EAAkB,GAAA,QAAA,CAAA;AAEvC,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,YAAA;AAAA,EACN,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ACZ,EAAA,IAAA,CAAA,IAAA;AAAA,UAAA,KACA,EAAA,IAAA,CAAA,EAAA,CAAA,CAAA,CAAA,cAAA,CAAA;AAAA,UAAA,QACI,EAAA,IAAA,CAAA,QAAA;AAAA,UAAA,QACA,EAAA,IAAA,CAAA,QAAA;AAAA,UAAA,YACH,EAAA,IAAA,CAAA,CAAA,CAAA,4BAAA,CAAA;AAAA,SAAA,CAAA,EAAA;iCAEe;AAAA,YAAAD,WAAA,CAAA,kBAAA,EAAA;AAAA,cAAA,KAAA,EAAAK,cAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,CAAA,MAAA,CAAA,CAAA;;;;AAEzB,eAAA,CAAA;AAaY,cAZL,CAAA,EAAA,CAAA;AAAA,aACD,EAAA,CAAA,EAAA,CAAA,OAAA,CAAA,CAAA;AAAA,WAAA,CAAA;AACe,UAAA,CAAA,EACd,CAAA;AAAA,SAAA,EAAA,EACE,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,UAAA,EAAA,UAAA,EAAA,YAAA,CAAA,CAAA;AAAA,OAAA,CAAA;AACA,MACN,CAAA,EAAA,CAAA;AAAW,KAAA,CAAA,IAAAC,kBACD,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,GAAA,EAAA,CAAA,CAAA,CAAA;AACA,CAAA;+BAG4C,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,QAAA,EAAA,cAAA,CAAA,CAAA,CAAA;;;;"}
|
1
|
+
{"version":3,"file":"dropdown2.mjs","sources":["../../../../../../packages/components/dropdown/src/dropdown.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.is('disabled', disabled)]\">\n <el-tooltip\n ref=\"popperRef\"\n :role=\"role\"\n :effect=\"effect\"\n :fallback-placements=\"['bottom', 'top']\"\n :popper-options=\"popperOptions\"\n :gpu-acceleration=\"false\"\n :hide-after=\"trigger === 'hover' ? hideTimeout : 0\"\n :manual-mode=\"true\"\n :placement=\"placement\"\n :popper-class=\"[ns.e('popper'), popperClass]\"\n :reference-element=\"referenceElementRef?.$el\"\n :trigger=\"trigger\"\n :trigger-keys=\"triggerKeys\"\n :trigger-target-el=\"contentRef\"\n :show-after=\"trigger === 'hover' ? showTimeout : 0\"\n :stop-popper-mouse-event=\"false\"\n :virtual-ref=\"triggeringElementRef\"\n :virtual-triggering=\"splitButton\"\n :disabled=\"disabled\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n :teleported=\"teleported\"\n pure\n persistent\n @before-show=\"handleBeforeShowTooltip\"\n @show=\"handleShowTooltip\"\n @before-hide=\"handleBeforeHideTooltip\"\n >\n <template #content>\n <el-scrollbar\n ref=\"scrollbar\"\n :wrap-style=\"wrapStyle\"\n tag=\"div\"\n :view-class=\"ns.e('list')\"\n >\n <el-roving-focus-group\n :loop=\"loop\"\n :current-tab-id=\"currentTabId\"\n orientation=\"horizontal\"\n @current-tab-id-change=\"handleCurrentTabIdChange\"\n @entry-focus=\"handleEntryFocus\"\n >\n <el-dropdown-collection>\n <slot name=\"dropdown\" />\n </el-dropdown-collection>\n </el-roving-focus-group>\n </el-scrollbar>\n </template>\n <template v-if=\"!splitButton\" #default>\n <el-only-child\n :id=\"triggerId\"\n ref=\"triggeringElementRef\"\n role=\"button\"\n :tabindex=\"tabindex\"\n >\n <slot name=\"default\" />\n </el-only-child>\n </template>\n </el-tooltip>\n <template v-if=\"splitButton\">\n <el-button-group>\n <el-button\n ref=\"referenceElementRef\"\n v-bind=\"buttonProps\"\n :size=\"dropdownSize\"\n :type=\"type\"\n :disabled=\"disabled\"\n :tabindex=\"tabindex\"\n @click=\"handlerMainButtonClick\"\n >\n <slot name=\"default\" />\n </el-button>\n <el-button\n :id=\"triggerId\"\n ref=\"triggeringElementRef\"\n v-bind=\"buttonProps\"\n role=\"button\"\n :size=\"dropdownSize\"\n :type=\"type\"\n :class=\"ns.e('caret-button')\"\n :disabled=\"disabled\"\n :tabindex=\"tabindex\"\n :aria-label=\"t('el.dropdown.toggleDropdown')\"\n >\n <el-icon :class=\"ns.e('icon')\"><arrow-down /></el-icon>\n </el-button>\n </el-button-group>\n </template>\n </div>\n</template>\n<script lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n onBeforeUnmount,\n provide,\n ref,\n toRef,\n unref,\n watch,\n} from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport ElIcon from '@element-plus/components/icon'\nimport ElRovingFocusGroup from '@element-plus/components/roving-focus-group'\nimport { ElOnlyChild } from '@element-plus/components/slot'\nimport { useFormSize } from '@element-plus/components/form'\nimport { addUnit, ensureArray } from '@element-plus/utils'\nimport { ArrowDown } from '@element-plus/icons-vue'\nimport { useId, useLocale, useNamespace } from '@element-plus/hooks'\nimport { ElCollection as ElDropdownCollection, dropdownProps } from './dropdown'\nimport { DROPDOWN_INJECTION_KEY } from './tokens'\n\nimport type { CSSProperties } from 'vue'\n\nconst { ButtonGroup: ElButtonGroup } = ElButton\n\nexport default defineComponent({\n name: 'ElDropdown',\n components: {\n ElButton,\n ElButtonGroup,\n ElScrollbar,\n ElDropdownCollection,\n ElTooltip,\n ElRovingFocusGroup,\n ElOnlyChild,\n ElIcon,\n ArrowDown,\n },\n props: dropdownProps,\n emits: ['visible-change', 'click', 'command'],\n setup(props, { emit }) {\n const _instance = getCurrentInstance()\n const ns = useNamespace('dropdown')\n const { t } = useLocale()\n\n const triggeringElementRef = ref()\n const referenceElementRef = ref()\n const popperRef = ref<InstanceType<typeof ElTooltip> | null>(null)\n const contentRef = ref<HTMLElement | null>(null)\n const scrollbar = ref(null)\n const currentTabId = ref<string | null>(null)\n const isUsingKeyboard = ref(false)\n\n const wrapStyle = computed<CSSProperties>(() => ({\n maxHeight: addUnit(props.maxHeight),\n }))\n const dropdownTriggerKls = computed(() => [ns.m(dropdownSize.value)])\n const trigger = computed(() => ensureArray(props.trigger))\n\n const defaultTriggerId = useId().value\n const triggerId = computed<string>(() => props.id || defaultTriggerId)\n\n // The goal of this code is to focus on the tooltip triggering element when it is hovered.\n // This is a temporary fix for where closing the dropdown through pointerleave event focuses on a\n // completely different element. For a permanent solution, remove all calls to any \"element.focus()\"\n // that are triggered through pointer enter/leave events.\n watch(\n [triggeringElementRef, trigger],\n ([triggeringElement, trigger], [prevTriggeringElement]) => {\n if (prevTriggeringElement?.$el?.removeEventListener) {\n prevTriggeringElement.$el.removeEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n if (triggeringElement?.$el?.removeEventListener) {\n triggeringElement.$el.removeEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n if (\n triggeringElement?.$el?.addEventListener &&\n trigger.includes('hover')\n ) {\n triggeringElement.$el.addEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n },\n { immediate: true }\n )\n\n onBeforeUnmount(() => {\n if (triggeringElementRef.value?.$el?.removeEventListener) {\n triggeringElementRef.value.$el.removeEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n })\n\n function handleClick() {\n handleClose()\n }\n\n function handleClose() {\n popperRef.value?.onClose()\n }\n\n function handleOpen() {\n popperRef.value?.onOpen()\n }\n\n const dropdownSize = useFormSize()\n\n function commandHandler(...args: any[]) {\n emit('command', ...args)\n }\n\n function onAutofocusTriggerEnter() {\n triggeringElementRef.value?.$el?.focus()\n }\n\n function onItemEnter() {\n // NOOP for now\n }\n\n function onItemLeave() {\n const contentEl = unref(contentRef)\n\n trigger.value.includes('hover') && contentEl?.focus()\n currentTabId.value = null\n }\n\n function handleCurrentTabIdChange(id: string) {\n currentTabId.value = id\n }\n\n function handleEntryFocus(e: Event) {\n if (!isUsingKeyboard.value) {\n e.preventDefault()\n e.stopImmediatePropagation()\n }\n }\n\n function handleBeforeShowTooltip() {\n emit('visible-change', true)\n }\n\n function handleShowTooltip(event?: Event) {\n if (event?.type === 'keydown') {\n contentRef.value.focus()\n }\n }\n\n function handleBeforeHideTooltip() {\n emit('visible-change', false)\n }\n\n provide(DROPDOWN_INJECTION_KEY, {\n contentRef,\n role: computed(() => props.role),\n triggerId,\n isUsingKeyboard,\n onItemEnter,\n onItemLeave,\n })\n\n provide('elDropdown', {\n instance: _instance,\n dropdownSize,\n handleClick,\n commandHandler,\n trigger: toRef(props, 'trigger'),\n hideOnClick: toRef(props, 'hideOnClick'),\n })\n\n const onFocusAfterTrapped = (e: Event) => {\n e.preventDefault()\n contentRef.value?.focus?.({\n preventScroll: true,\n })\n }\n\n const handlerMainButtonClick = (event: MouseEvent) => {\n emit('click', event)\n }\n\n return {\n t,\n ns,\n scrollbar,\n wrapStyle,\n dropdownTriggerKls,\n dropdownSize,\n triggerId,\n currentTabId,\n handleCurrentTabIdChange,\n handlerMainButtonClick,\n handleEntryFocus,\n handleClose,\n handleOpen,\n handleBeforeShowTooltip,\n handleShowTooltip,\n handleBeforeHideTooltip,\n onFocusAfterTrapped,\n popperRef,\n contentRef,\n triggeringElementRef,\n referenceElementRef,\n }\n },\n})\n</script>\n"],"names":["ElDropdownCollection","ElOnlyChild","ensureArray","_resolveComponent","_createSlots","_withCtx","_createVNode","_renderSlot","_openBlock","_createBlock","_mergeProps","_normalizeClass","_createCommentVNode"],"mappings":";;;;;;;;;;;;;;;;;;AAwHA,MAAM,EAAE,WAAa,EAAA,aAAA,EAAkB,GAAA,QAAA,CAAA;AAEvC,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,YAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,QAAA;AAAA,IACA,aAAA;AAAA,IACA,WAAA;AAAA,0BACAA,YAAA;AAAA,IACA,SAAA;AAAA,IACA,kBAAA;AAAA,iBACAC,SAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,GACF;AAAA,EACA,KAAO,EAAA,aAAA;AAAA,EACP,KAAO,EAAA,CA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eAAA,CAAA;AAaY,cAZL,CAAA,EAAA,CAAA;AAAA,aACD,EAAA,CAAA,EAAA,CAAA,OAAA,CAAA,CAAA;AAAA,WAAA,CAAA;AACe,UAAA,CAAA,EACd,CAAA;AAAA,SAAA,EAAA,EACE,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,UAAA,EAAA,UAAA,EAAA,YAAA,CAAA,CAAA;AAAA,OAAA,CAAA;AACA,MACN,CAAA,EAAA,CAAA;AAAW,KAAA,CAAA,IAAAC,kBACD,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,GAAA,EAAA,CAAA,CAAA,CAAA;AACA,CAAA;+BAG4C,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,QAAA,EAAA,cAAA,CAAA,CAAA,CAAA;;;;"}
|
package/es/components/index.mjs
CHANGED
@@ -96,7 +96,7 @@ export { buttonGroupContextKey } from './button/src/constants.mjs';
|
|
96
96
|
export { calendarEmits, calendarProps } from './calendar/src/calendar.mjs';
|
97
97
|
export { cardProps } from './card/src/card.mjs';
|
98
98
|
export { carouselEmits, carouselProps } from './carousel/src/carousel.mjs';
|
99
|
-
export { carouselItemProps } from './carousel/src/carousel-
|
99
|
+
export { carouselItemProps } from './carousel/src/carousel-item.mjs';
|
100
100
|
export { CAROUSEL_ITEM_NAME, carouselContextKey } from './carousel/src/constants.mjs';
|
101
101
|
export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
|
102
102
|
export { CASCADER_PANEL_INJECTION_KEY } from './cascader-panel/src/types.mjs';
|
@@ -109,7 +109,7 @@ export { colProps } from './col/src/col.mjs';
|
|
109
109
|
export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
|
110
110
|
export { collapseItemProps } from './collapse/src/collapse-item.mjs';
|
111
111
|
export { collapseContextKey } from './collapse/src/constants.mjs';
|
112
|
-
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-
|
112
|
+
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-picker2.mjs';
|
113
113
|
export { messageConfig } from './config-provider/src/config-provider.mjs';
|
114
114
|
export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
|
115
115
|
export { configProviderContextKey } from './config-provider/src/constants.mjs';
|
@@ -138,7 +138,7 @@ export { imageViewerEmits, imageViewerProps } from './image-viewer/src/image-vie
|
|
138
138
|
export { inputEmits, inputProps } from './input/src/input.mjs';
|
139
139
|
export { inputNumberEmits, inputNumberProps } from './input-number/src/input-number.mjs';
|
140
140
|
export { inputTagEmits, inputTagProps } from './input-tag/src/input-tag.mjs';
|
141
|
-
export { linkEmits, linkProps } from './link/src/
|
141
|
+
export { linkEmits, linkProps } from './link/src/link2.mjs';
|
142
142
|
export { menuEmits, menuProps } from './menu/src/menu.mjs';
|
143
143
|
export { menuItemEmits, menuItemProps } from './menu/src/menu-item.mjs';
|
144
144
|
export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
|
@@ -171,7 +171,7 @@ export { thumbProps } from './scrollbar/src/thumb.mjs';
|
|
171
171
|
export { scrollbarContextKey } from './scrollbar/src/constants.mjs';
|
172
172
|
export { selectGroupKey, selectKey } from './select/src/token.mjs';
|
173
173
|
export { selectV2InjectionKey } from './select-v2/src/token.mjs';
|
174
|
-
export { skeletonProps } from './skeleton/src/
|
174
|
+
export { skeletonProps } from './skeleton/src/skeleton2.mjs';
|
175
175
|
export { skeletonItemProps } from './skeleton/src/skeleton-item.mjs';
|
176
176
|
export { sliderEmits, sliderProps } from './slider/src/slider.mjs';
|
177
177
|
export { sliderContextKey } from './slider/src/constants.mjs';
|
@@ -218,7 +218,7 @@ export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualiz
|
|
218
218
|
export { watermarkProps } from './watermark/src/watermark.mjs';
|
219
219
|
export { tourEmits, tourProps } from './tour/src/tour.mjs';
|
220
220
|
export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
|
221
|
-
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/
|
221
|
+
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content2.mjs';
|
222
222
|
export { anchorEmits, anchorProps } from './anchor/src/anchor.mjs';
|
223
223
|
export { segmentedEmits, segmentedProps } from './segmented/src/segmented.mjs';
|
224
224
|
export { mentionEmits, mentionProps } from './mention/src/mention.mjs';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Link from './src/
|
2
|
-
export { linkEmits, linkProps } from './src/
|
1
|
+
import Link from './src/link.mjs';
|
2
|
+
export { linkEmits, linkProps } from './src/link2.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElLink = withInstall(Link);
|
@@ -1,29 +1,54 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createBlock, withCtx, resolveDynamicComponent, createCommentVNode, renderSlot } from 'vue';
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
3
|
+
import { linkProps, linkEmits } from './link2.mjs';
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
3
6
|
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
7
|
+
const __default__ = defineComponent({
|
8
|
+
name: "ElLink"
|
9
|
+
});
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
11
|
+
...__default__,
|
12
|
+
props: linkProps,
|
13
|
+
emits: linkEmits,
|
14
|
+
setup(__props, { emit }) {
|
15
|
+
const props = __props;
|
16
|
+
const ns = useNamespace("link");
|
17
|
+
const linkKls = computed(() => [
|
18
|
+
ns.b(),
|
19
|
+
ns.m(props.type),
|
20
|
+
ns.is("disabled", props.disabled),
|
21
|
+
ns.is("underline", props.underline && !props.disabled)
|
22
|
+
]);
|
23
|
+
function handleClick(event) {
|
24
|
+
if (!props.disabled)
|
25
|
+
emit("click", event);
|
26
|
+
}
|
27
|
+
return (_ctx, _cache) => {
|
28
|
+
return openBlock(), createElementBlock("a", {
|
29
|
+
class: normalizeClass(unref(linkKls)),
|
30
|
+
href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href,
|
31
|
+
target: _ctx.disabled || !_ctx.href ? void 0 : _ctx.target,
|
32
|
+
onClick: handleClick
|
33
|
+
}, [
|
34
|
+
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
35
|
+
default: withCtx(() => [
|
36
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
37
|
+
]),
|
38
|
+
_: 1
|
39
|
+
})) : createCommentVNode("v-if", true),
|
40
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
41
|
+
key: 1,
|
42
|
+
class: normalizeClass(unref(ns).e("inner"))
|
43
|
+
}, [
|
44
|
+
renderSlot(_ctx.$slots, "default")
|
45
|
+
], 2)) : createCommentVNode("v-if", true),
|
46
|
+
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true)
|
47
|
+
], 10, ["href", "target"]);
|
48
|
+
};
|
22
49
|
}
|
23
50
|
});
|
24
|
-
|
25
|
-
click: (evt) => evt instanceof MouseEvent
|
26
|
-
};
|
51
|
+
var Link = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "link.vue"]]);
|
27
52
|
|
28
|
-
export {
|
53
|
+
export { Link as default };
|
29
54
|
//# sourceMappingURL=link.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"link.mjs","sources":["../../../../../../packages/components/link/src/link.
|
1
|
+
{"version":3,"file":"link.mjs","sources":["../../../../../../packages/components/link/src/link.vue"],"sourcesContent":["<template>\n <a\n :class=\"linkKls\"\n :href=\"disabled || !href ? undefined : href\"\n :target=\"disabled || !href ? undefined : target\"\n @click=\"handleClick\"\n >\n <el-icon v-if=\"icon\"><component :is=\"icon\" /></el-icon>\n <span v-if=\"$slots.default\" :class=\"ns.e('inner')\">\n <slot />\n </span>\n\n <slot v-if=\"$slots.icon\" name=\"icon\" />\n </a>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { linkEmits, linkProps } from './link'\n\ndefineOptions({\n name: 'ElLink',\n})\nconst props = defineProps(linkProps)\nconst emit = defineEmits(linkEmits)\n\nconst ns = useNamespace('link')\n\nconst linkKls = computed(() => [\n ns.b(),\n ns.m(props.type),\n ns.is('disabled', props.disabled),\n ns.is('underline', props.underline && !props.disabled),\n])\n\nfunction handleClick(event: MouseEvent) {\n if (!props.disabled) emit('click', event)\n}\n</script>\n"],"names":[],"mappings":";;;;;;mCAsBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAE9B,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAAA,MAC7B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAA;AAAA,MACf,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,KAAA,CAAM,QAAQ,CAAA;AAAA,MAChC,GAAG,EAAG,CAAA,WAAA,EAAa,MAAM,SAAa,IAAA,CAAC,MAAM,QAAQ,CAAA;AAAA,KACtD,CAAA,CAAA;AAED,IAAA,SAAS,YAAY,KAAmB,EAAA;AACtC,MAAA,IAAI,CAAC,KAAA,CAAM,QAAU;AAAmB,QAC1C,IAAA,CAAA,OAAA,EAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,54 +1,29 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { linkProps, linkEmits } from './link.mjs';
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
2
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
6
3
|
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
emit("click", event);
|
26
|
-
}
|
27
|
-
return (_ctx, _cache) => {
|
28
|
-
return openBlock(), createElementBlock("a", {
|
29
|
-
class: normalizeClass(unref(linkKls)),
|
30
|
-
href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href,
|
31
|
-
target: _ctx.disabled || !_ctx.href ? void 0 : _ctx.target,
|
32
|
-
onClick: handleClick
|
33
|
-
}, [
|
34
|
-
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
35
|
-
default: withCtx(() => [
|
36
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
37
|
-
]),
|
38
|
-
_: 1
|
39
|
-
})) : createCommentVNode("v-if", true),
|
40
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
41
|
-
key: 1,
|
42
|
-
class: normalizeClass(unref(ns).e("inner"))
|
43
|
-
}, [
|
44
|
-
renderSlot(_ctx.$slots, "default")
|
45
|
-
], 2)) : createCommentVNode("v-if", true),
|
46
|
-
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true)
|
47
|
-
], 10, ["href", "target"]);
|
48
|
-
};
|
4
|
+
const linkProps = buildProps({
|
5
|
+
type: {
|
6
|
+
type: String,
|
7
|
+
values: ["primary", "success", "warning", "info", "danger", "default"],
|
8
|
+
default: "default"
|
9
|
+
},
|
10
|
+
underline: {
|
11
|
+
type: Boolean,
|
12
|
+
default: true
|
13
|
+
},
|
14
|
+
disabled: Boolean,
|
15
|
+
href: { type: String, default: "" },
|
16
|
+
target: {
|
17
|
+
type: String,
|
18
|
+
default: "_self"
|
19
|
+
},
|
20
|
+
icon: {
|
21
|
+
type: iconPropType
|
49
22
|
}
|
50
23
|
});
|
51
|
-
|
24
|
+
const linkEmits = {
|
25
|
+
click: (evt) => evt instanceof MouseEvent
|
26
|
+
};
|
52
27
|
|
53
|
-
export {
|
28
|
+
export { linkEmits, linkProps };
|
54
29
|
//# sourceMappingURL=link2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"link2.mjs","sources":["../../../../../../packages/components/link/src/link.
|
1
|
+
{"version":3,"file":"link2.mjs","sources":["../../../../../../packages/components/link/src/link.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type Link from './link.vue'\n\nexport const linkProps = buildProps({\n /**\n * @description type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger', 'default'],\n default: 'default',\n },\n /**\n * @description whether the component has underline\n */\n underline: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the component is disabled\n */\n disabled: Boolean,\n /**\n * @description same as native hyperlink's `href`\n */\n href: { type: String, default: '' },\n /**\n * @description same as native hyperlink's `target`\n */\n target: {\n type: String as PropType<'_blank' | '_parent' | '_self' | '_top' | string>,\n default: '_self',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n} as const)\nexport type LinkProps = ExtractPropTypes<typeof linkProps>\n\nexport const linkEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type LinkEmits = typeof linkEmits\n\nexport type LinkInstance = InstanceType<typeof Link>\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC;AAC1E,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;"}
|
@@ -1,40 +1,22 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { paginationPrevProps, paginationPrevEmits } from './prev2.mjs';
|
4
|
-
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
-
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
|
1
|
+
import { buildProps } from '../../../../utils/vue/props/runtime.mjs';
|
2
|
+
import { iconPropType } from '../../../../utils/vue/icon.mjs';
|
6
3
|
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
return (_ctx, _cache) => {
|
19
|
-
return openBlock(), createElementBlock("button", {
|
20
|
-
type: "button",
|
21
|
-
class: "btn-prev",
|
22
|
-
disabled: unref(internalDisabled),
|
23
|
-
"aria-label": _ctx.prevText || unref(t)("el.pagination.prev"),
|
24
|
-
"aria-disabled": unref(internalDisabled),
|
25
|
-
onClick: ($event) => _ctx.$emit("click", $event)
|
26
|
-
}, [
|
27
|
-
_ctx.prevText ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(_ctx.prevText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
28
|
-
default: withCtx(() => [
|
29
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon)))
|
30
|
-
]),
|
31
|
-
_: 1
|
32
|
-
}))
|
33
|
-
], 8, ["disabled", "aria-label", "aria-disabled", "onClick"]);
|
34
|
-
};
|
4
|
+
const paginationPrevProps = buildProps({
|
5
|
+
disabled: Boolean,
|
6
|
+
currentPage: {
|
7
|
+
type: Number,
|
8
|
+
default: 1
|
9
|
+
},
|
10
|
+
prevText: {
|
11
|
+
type: String
|
12
|
+
},
|
13
|
+
prevIcon: {
|
14
|
+
type: iconPropType
|
35
15
|
}
|
36
16
|
});
|
37
|
-
|
17
|
+
const paginationPrevEmits = {
|
18
|
+
click: (evt) => evt instanceof MouseEvent
|
19
|
+
};
|
38
20
|
|
39
|
-
export {
|
21
|
+
export { paginationPrevEmits, paginationPrevProps };
|
40
22
|
//# sourceMappingURL=prev.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"prev.mjs","sources":["../../../../../../../packages/components/pagination/src/components/prev.
|
1
|
+
{"version":3,"file":"prev.mjs","sources":["../../../../../../../packages/components/pagination/src/components/prev.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Prev from './prev.vue'\n\nexport const paginationPrevProps = buildProps({\n disabled: Boolean,\n currentPage: {\n type: Number,\n default: 1,\n },\n prevText: {\n type: String,\n },\n prevIcon: {\n type: iconPropType,\n },\n} as const)\n\nexport const paginationPrevEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type PaginationPrevProps = ExtractPropTypes<typeof paginationPrevProps>\n\nexport type PrevInstance = InstanceType<typeof Prev>\n"],"names":[],"mappings":";;;AACY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,mBAAmB,GAAG;AACnC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;"}
|
@@ -1,22 +1,40 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, unref, toDisplayString, createBlock, withCtx, resolveDynamicComponent } from 'vue';
|
2
|
+
import { ElIcon } from '../../../icon/index.mjs';
|
3
|
+
import { paginationPrevProps, paginationPrevEmits } from './prev.mjs';
|
4
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
+
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
|
3
6
|
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
const __default__ = defineComponent({
|
8
|
+
name: "ElPaginationPrev"
|
9
|
+
});
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
11
|
+
...__default__,
|
12
|
+
props: paginationPrevProps,
|
13
|
+
emits: paginationPrevEmits,
|
14
|
+
setup(__props) {
|
15
|
+
const props = __props;
|
16
|
+
const { t } = useLocale();
|
17
|
+
const internalDisabled = computed(() => props.disabled || props.currentPage <= 1);
|
18
|
+
return (_ctx, _cache) => {
|
19
|
+
return openBlock(), createElementBlock("button", {
|
20
|
+
type: "button",
|
21
|
+
class: "btn-prev",
|
22
|
+
disabled: unref(internalDisabled),
|
23
|
+
"aria-label": _ctx.prevText || unref(t)("el.pagination.prev"),
|
24
|
+
"aria-disabled": unref(internalDisabled),
|
25
|
+
onClick: ($event) => _ctx.$emit("click", $event)
|
26
|
+
}, [
|
27
|
+
_ctx.prevText ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(_ctx.prevText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
28
|
+
default: withCtx(() => [
|
29
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon)))
|
30
|
+
]),
|
31
|
+
_: 1
|
32
|
+
}))
|
33
|
+
], 8, ["disabled", "aria-label", "aria-disabled", "onClick"]);
|
34
|
+
};
|
15
35
|
}
|
16
36
|
});
|
17
|
-
|
18
|
-
click: (evt) => evt instanceof MouseEvent
|
19
|
-
};
|
37
|
+
var Prev = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "prev.vue"]]);
|
20
38
|
|
21
|
-
export {
|
39
|
+
export { Prev as default };
|
22
40
|
//# sourceMappingURL=prev2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"prev2.mjs","sources":["../../../../../../../packages/components/pagination/src/components/prev.
|
1
|
+
{"version":3,"file":"prev2.mjs","sources":["../../../../../../../packages/components/pagination/src/components/prev.vue"],"sourcesContent":["<template>\n <button\n type=\"button\"\n class=\"btn-prev\"\n :disabled=\"internalDisabled\"\n :aria-label=\"prevText || t('el.pagination.prev')\"\n :aria-disabled=\"internalDisabled\"\n @click=\"$emit('click', $event)\"\n >\n <span v-if=\"prevText\">{{ prevText }}</span>\n <el-icon v-else>\n <component :is=\"prevIcon\" />\n </el-icon>\n </button>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { paginationPrevEmits, paginationPrevProps } from './prev'\n\ndefineOptions({\n name: 'ElPaginationPrev',\n})\n\nconst props = defineProps(paginationPrevProps)\ndefineEmits(paginationPrevEmits)\n\nconst { t } = useLocale()\n\nconst internalDisabled = computed(\n () => props.disabled || props.currentPage <= 1\n)\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;mCAsBc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AAExB,IAAA,MAAM,gBAAmB,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,QAAA,IAAA,KAAA,CAAA,WAAA,IAAA,CAAA,CAAA,CAAA;AAAA,IAAA,OACjB,CAAA,IAAA,EAAM,MAAY,KAAA;AAAqB,MAC/C,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { defineComponent, getCurrentInstance, computed, ref, watch, provide, h } from 'vue';
|
2
2
|
import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue';
|
3
3
|
import { elPaginationKey } from './constants.mjs';
|
4
|
-
import Prev from './components/
|
4
|
+
import Prev from './components/prev2.mjs';
|
5
5
|
import Next from './components/next2.mjs';
|
6
6
|
import Sizes from './components/sizes2.mjs';
|
7
7
|
import Jumper from './components/jumper2.mjs';
|
@@ -218,7 +218,7 @@ const useSelect = (props, emit) => {
|
|
218
218
|
return index;
|
219
219
|
}
|
220
220
|
} else {
|
221
|
-
if (props.modelValue && filteredOptionsValueMap.value.has(props.modelValue)) {
|
221
|
+
if (!isEmptyValue(props.modelValue) && filteredOptionsValueMap.value.has(props.modelValue)) {
|
222
222
|
const { index } = filteredOptionsValueMap.value.get(props.modelValue);
|
223
223
|
return index;
|
224
224
|
}
|