@element-plus/nightly 0.0.20240618 → 0.0.20240621
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.css +1 -1
- package/dist/index.full.js +52 -27
- package/dist/index.full.min.js +22 -22
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +22 -22
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +53 -28
- 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 +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/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -54
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +54 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +10 -62
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +62 -10
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +6 -5
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-month-range.mjs +3 -2
- package/es/components/date-picker/src/date-picker-com/panel-month-range.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-month-range.vue.d.ts +1 -1
- package/es/components/date-picker/src/panel-utils.d.ts +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +35 -4
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +4 -35
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +12 -0
- package/es/components/pagination/src/components/next.mjs +38 -19
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +19 -38
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +1 -0
- package/es/components/pagination/src/pagination.d.ts +24 -0
- package/es/components/pagination/src/pagination.mjs +15 -6
- package/es/components/pagination/src/pagination.mjs.map +1 -1
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +111 -66
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +66 -111
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +13 -5
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +29 -63
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +63 -29
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/select/index.d.ts +1 -0
- package/es/components/select/src/select.vue.d.ts +1 -0
- package/es/components/select/src/select2.mjs +3 -3
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +1 -0
- package/es/components/select/src/useSelect.mjs +5 -1
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/src/select.mjs +6 -6
- package/es/components/select-v2/src/select.mjs.map +1 -1
- package/es/components/table/index.d.ts +1 -0
- package/es/components/table/src/table-header/utils-helper.d.ts +1 -0
- package/es/components/table/src/table-header/utils-helper.mjs +1 -1
- package/es/components/table/src/table-header/utils-helper.mjs.map +1 -1
- package/es/components/table/src/table.mjs +5 -0
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +7 -6
- package/es/components/time-select/index.d.ts +4 -0
- package/es/components/time-select/src/time-select.vue.d.ts +2 -0
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +72 -42
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +42 -72
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/step.mjs +169 -44
- package/es/components/tour/src/step.mjs.map +1 -1
- package/es/components/tour/src/step2.mjs +44 -169
- package/es/components/tour/src/step2.mjs.map +1 -1
- package/es/index.mjs +6 -6
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -54
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +54 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +9 -62
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +62 -9
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +6 -5
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-month-range.js +3 -2
- package/lib/components/date-picker/src/date-picker-com/panel-month-range.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-month-range.vue.d.ts +1 -1
- package/lib/components/date-picker/src/panel-utils.d.ts +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/index.js +6 -6
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +35 -4
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +4 -35
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/pagination/index.d.ts +12 -0
- package/lib/components/pagination/src/components/next.js +38 -19
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +19 -38
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -0
- package/lib/components/pagination/src/pagination.d.ts +24 -0
- package/lib/components/pagination/src/pagination.js +19 -10
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +111 -67
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +67 -111
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/progress/src/progress2.js +13 -5
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +31 -63
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +63 -31
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/select/index.d.ts +1 -0
- package/lib/components/select/src/select.vue.d.ts +1 -0
- package/lib/components/select/src/select2.js +2 -2
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +1 -0
- package/lib/components/select/src/useSelect.js +4 -0
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/src/select.js +5 -5
- package/lib/components/select-v2/src/select.js.map +1 -1
- package/lib/components/table/index.d.ts +1 -0
- package/lib/components/table/src/table-header/utils-helper.d.ts +1 -0
- package/lib/components/table/src/table-header/utils-helper.js +1 -0
- package/lib/components/table/src/table-header/utils-helper.js.map +1 -1
- package/lib/components/table/src/table.js +5 -0
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +7 -6
- package/lib/components/time-select/index.d.ts +4 -0
- package/lib/components/time-select/src/time-select.vue.d.ts +2 -0
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +72 -42
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +42 -72
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/step.js +168 -44
- package/lib/components/tour/src/step.js.map +1 -1
- package/lib/components/tour/src/step2.js +44 -168
- package/lib/components/tour/src/step2.js.map +1 -1
- package/lib/index.js +6 -6
- 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-pagination.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +2 -0
- package/theme-chalk/src/pagination.scss +13 -0
- package/web-types.json +1 -1
|
@@ -1,117 +1,72 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, unref, openBlock, createBlock, mergeProps, withCtx, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, renderSlot, createTextVNode } from 'vue';
|
|
2
|
-
import { ElTooltip } from '../../tooltip/index.mjs';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import '
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import '../../tooltip/index.mjs';
|
|
3
|
+
import '../../dropdown/index.mjs';
|
|
4
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { useTooltipTriggerProps } from '../../tooltip/src/trigger.mjs';
|
|
6
|
+
import { dropdownProps } from '../../dropdown/src/dropdown.mjs';
|
|
7
|
+
import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
|
|
8
|
+
import { isBoolean } from '../../../utils/types.mjs';
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
popperRef,
|
|
62
|
-
hide
|
|
63
|
-
});
|
|
64
|
-
return (_ctx, _cache) => {
|
|
65
|
-
return openBlock(), createBlock(unref(ElTooltip), mergeProps({
|
|
66
|
-
ref_key: "tooltipRef",
|
|
67
|
-
ref: tooltipRef
|
|
68
|
-
}, _ctx.$attrs, {
|
|
69
|
-
trigger: _ctx.trigger,
|
|
70
|
-
placement: _ctx.placement,
|
|
71
|
-
disabled: _ctx.disabled,
|
|
72
|
-
visible: _ctx.visible,
|
|
73
|
-
transition: _ctx.transition,
|
|
74
|
-
"popper-options": _ctx.popperOptions,
|
|
75
|
-
tabindex: _ctx.tabindex,
|
|
76
|
-
content: _ctx.content,
|
|
77
|
-
offset: _ctx.offset,
|
|
78
|
-
"show-after": _ctx.showAfter,
|
|
79
|
-
"hide-after": _ctx.hideAfter,
|
|
80
|
-
"auto-close": _ctx.autoClose,
|
|
81
|
-
"show-arrow": _ctx.showArrow,
|
|
82
|
-
"aria-label": _ctx.title,
|
|
83
|
-
effect: _ctx.effect,
|
|
84
|
-
enterable: _ctx.enterable,
|
|
85
|
-
"popper-class": unref(kls),
|
|
86
|
-
"popper-style": unref(style),
|
|
87
|
-
teleported: _ctx.teleported,
|
|
88
|
-
persistent: _ctx.persistent,
|
|
89
|
-
"gpu-acceleration": unref(gpuAcceleration),
|
|
90
|
-
"onUpdate:visible": unref(onUpdateVisible),
|
|
91
|
-
onBeforeShow: beforeEnter,
|
|
92
|
-
onBeforeHide: beforeLeave,
|
|
93
|
-
onShow: afterEnter,
|
|
94
|
-
onHide: afterLeave
|
|
95
|
-
}), {
|
|
96
|
-
content: withCtx(() => [
|
|
97
|
-
_ctx.title ? (openBlock(), createElementBlock("div", {
|
|
98
|
-
key: 0,
|
|
99
|
-
class: normalizeClass(unref(ns).e("title")),
|
|
100
|
-
role: "title"
|
|
101
|
-
}, toDisplayString(_ctx.title), 3)) : createCommentVNode("v-if", true),
|
|
102
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
103
|
-
createTextVNode(toDisplayString(_ctx.content), 1)
|
|
104
|
-
])
|
|
105
|
-
]),
|
|
106
|
-
default: withCtx(() => [
|
|
107
|
-
_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)
|
|
108
|
-
]),
|
|
109
|
-
_: 3
|
|
110
|
-
}, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"]);
|
|
111
|
-
};
|
|
10
|
+
const popoverProps = buildProps({
|
|
11
|
+
trigger: useTooltipTriggerProps.trigger,
|
|
12
|
+
placement: dropdownProps.placement,
|
|
13
|
+
disabled: useTooltipTriggerProps.disabled,
|
|
14
|
+
visible: useTooltipContentProps.visible,
|
|
15
|
+
transition: useTooltipContentProps.transition,
|
|
16
|
+
popperOptions: dropdownProps.popperOptions,
|
|
17
|
+
tabindex: dropdownProps.tabindex,
|
|
18
|
+
content: useTooltipContentProps.content,
|
|
19
|
+
popperStyle: useTooltipContentProps.popperStyle,
|
|
20
|
+
popperClass: useTooltipContentProps.popperClass,
|
|
21
|
+
enterable: {
|
|
22
|
+
...useTooltipContentProps.enterable,
|
|
23
|
+
default: true
|
|
24
|
+
},
|
|
25
|
+
effect: {
|
|
26
|
+
...useTooltipContentProps.effect,
|
|
27
|
+
default: "light"
|
|
28
|
+
},
|
|
29
|
+
teleported: useTooltipContentProps.teleported,
|
|
30
|
+
title: String,
|
|
31
|
+
width: {
|
|
32
|
+
type: [String, Number],
|
|
33
|
+
default: 150
|
|
34
|
+
},
|
|
35
|
+
offset: {
|
|
36
|
+
type: Number,
|
|
37
|
+
default: void 0
|
|
38
|
+
},
|
|
39
|
+
showAfter: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 0
|
|
42
|
+
},
|
|
43
|
+
hideAfter: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 200
|
|
46
|
+
},
|
|
47
|
+
autoClose: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 0
|
|
50
|
+
},
|
|
51
|
+
showArrow: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: true
|
|
54
|
+
},
|
|
55
|
+
persistent: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: true
|
|
58
|
+
},
|
|
59
|
+
"onUpdate:visible": {
|
|
60
|
+
type: Function
|
|
112
61
|
}
|
|
113
62
|
});
|
|
114
|
-
|
|
63
|
+
const popoverEmits = {
|
|
64
|
+
"update:visible": (value) => isBoolean(value),
|
|
65
|
+
"before-enter": () => true,
|
|
66
|
+
"before-leave": () => true,
|
|
67
|
+
"after-enter": () => true,
|
|
68
|
+
"after-leave": () => true
|
|
69
|
+
};
|
|
115
70
|
|
|
116
|
-
export {
|
|
71
|
+
export { popoverEmits, popoverProps };
|
|
117
72
|
//# sourceMappingURL=popover2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover2.mjs","sources":["../../../../../../packages/components/popover/src/popover.
|
|
1
|
+
{"version":3,"file":"popover2.mjs","sources":["../../../../../../packages/components/popover/src/popover.ts"],"sourcesContent":["import { buildProps, isBoolean } from '@element-plus/utils'\nimport {\n useTooltipContentProps,\n useTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\nimport { dropdownProps } from '@element-plus/components/dropdown'\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type Popover from './popover.vue'\n\nexport const popoverProps = buildProps({\n trigger: useTooltipTriggerProps.trigger,\n placement: dropdownProps.placement,\n disabled: useTooltipTriggerProps.disabled,\n visible: useTooltipContentProps.visible,\n transition: useTooltipContentProps.transition,\n popperOptions: dropdownProps.popperOptions,\n tabindex: dropdownProps.tabindex,\n content: useTooltipContentProps.content,\n popperStyle: useTooltipContentProps.popperStyle,\n popperClass: useTooltipContentProps.popperClass,\n enterable: {\n ...useTooltipContentProps.enterable,\n default: true,\n },\n effect: {\n ...useTooltipContentProps.effect,\n default: 'light',\n },\n teleported: useTooltipContentProps.teleported,\n title: String,\n\n width: {\n type: [String, Number],\n default: 150,\n },\n offset: {\n type: Number,\n default: undefined,\n },\n showAfter: {\n type: Number,\n default: 0,\n },\n hideAfter: {\n type: Number,\n default: 200,\n },\n autoClose: {\n type: Number,\n default: 0,\n },\n showArrow: {\n type: Boolean,\n default: true,\n },\n persistent: {\n type: Boolean,\n default: true,\n },\n 'onUpdate:visible': {\n type: Function as PropType<(visible: boolean) => void>,\n },\n} as const)\nexport type PopoverProps = ExtractPropTypes<typeof popoverProps>\n\nexport const popoverEmits = {\n 'update:visible': (value: boolean) => isBoolean(value),\n 'before-enter': () => true,\n 'before-leave': () => true,\n 'after-enter': () => true,\n 'after-leave': () => true,\n}\nexport type PopoverEmits = typeof popoverEmits\n\nexport type PopoverInstance = InstanceType<typeof Popover>\n"],"names":[],"mappings":";;;;;;;;;AAMY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,OAAO,EAAE,sBAAsB,CAAC,OAAO;AACzC,EAAE,SAAS,EAAE,aAAa,CAAC,SAAS;AACpC,EAAE,QAAQ,EAAE,sBAAsB,CAAC,QAAQ;AAC3C,EAAE,OAAO,EAAE,sBAAsB,CAAC,OAAO;AACzC,EAAE,UAAU,EAAE,sBAAsB,CAAC,UAAU;AAC/C,EAAE,aAAa,EAAE,aAAa,CAAC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EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,gBAAgB,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AAC/C,EAAE,cAAc,EAAE,MAAM,IAAI;AAC5B,EAAE,cAAc,EAAE,MAAM,IAAI;AAC5B,EAAE,aAAa,EAAE,MAAM,IAAI;AAC3B,EAAE,aAAa,EAAE,MAAM,IAAI;AAC3B;;;;"}
|
|
@@ -28,11 +28,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
28
|
default: "#20a0ff"
|
|
29
29
|
};
|
|
30
30
|
const ns = useNamespace("progress");
|
|
31
|
-
const barStyle = computed(() =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
const barStyle = computed(() => {
|
|
32
|
+
const barStyle2 = {
|
|
33
|
+
width: `${props.percentage}%`,
|
|
34
|
+
animationDuration: `${props.duration}s`
|
|
35
|
+
};
|
|
36
|
+
const color = getCurrentColor(props.percentage);
|
|
37
|
+
if (color.includes("gradient")) {
|
|
38
|
+
barStyle2.background = color;
|
|
39
|
+
} else {
|
|
40
|
+
barStyle2.backgroundColor = color;
|
|
41
|
+
}
|
|
42
|
+
return barStyle2;
|
|
43
|
+
});
|
|
36
44
|
const relativeStrokeWidth = computed(() => (props.strokeWidth / props.width * 100).toFixed(1));
|
|
37
45
|
const radius = computed(() => {
|
|
38
46
|
if (["circle", "dashboard"].includes(props.type)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress2.mjs","sources":["../../../../../../packages/components/progress/src/progress.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(type),\n ns.is(status),\n {\n [ns.m('without-text')]: !showText,\n [ns.m('text-inside')]: textInside,\n },\n ]\"\n role=\"progressbar\"\n :aria-valuenow=\"percentage\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <div v-if=\"type === 'line'\" :class=\"ns.b('bar')\">\n <div\n :class=\"ns.be('bar', 'outer')\"\n :style=\"{ height: `${strokeWidth}px` }\"\n >\n <div\n :class=\"[\n ns.be('bar', 'inner'),\n { [ns.bem('bar', 'inner', 'indeterminate')]: indeterminate },\n { [ns.bem('bar', 'inner', 'striped')]: striped },\n { [ns.bem('bar', 'inner', 'striped-flow')]: stripedFlow },\n ]\"\n :style=\"barStyle\"\n >\n <div\n v-if=\"(showText || $slots.default) && textInside\"\n :class=\"ns.be('bar', 'innerText')\"\n >\n <slot :percentage=\"percentage\">\n <span>{{ content }}</span>\n </slot>\n </div>\n </div>\n </div>\n </div>\n <div\n v-else\n :class=\"ns.b('circle')\"\n :style=\"{ height: `${width}px`, width: `${width}px` }\"\n >\n <svg viewBox=\"0 0 100 100\">\n <path\n :class=\"ns.be('circle', 'track')\"\n :d=\"trackPath\"\n :stroke=\"`var(${ns.cssVarName('fill-color-light')}, #e5e9f2)`\"\n :stroke-linecap=\"strokeLinecap\"\n :stroke-width=\"relativeStrokeWidth\"\n fill=\"none\"\n :style=\"trailPathStyle\"\n />\n <path\n :class=\"ns.be('circle', 'path')\"\n :d=\"trackPath\"\n :stroke=\"stroke\"\n fill=\"none\"\n :opacity=\"percentage ? 1 : 0\"\n :stroke-linecap=\"strokeLinecap\"\n :stroke-width=\"relativeStrokeWidth\"\n :style=\"circlePathStyle\"\n />\n </svg>\n </div>\n <div\n v-if=\"(showText || $slots.default) && !textInside\"\n :class=\"ns.e('text')\"\n :style=\"{ fontSize: `${progressTextSize}px` }\"\n >\n <slot :percentage=\"percentage\">\n <span v-if=\"!status\">{{ content }}</span>\n <el-icon v-else>\n <component :is=\"statusIcon\" />\n </el-icon>\n </slot>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n Check,\n CircleCheck,\n CircleClose,\n Close,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isString } from '@element-plus/utils'\nimport { progressProps } from './progress'\nimport type { CSSProperties } from 'vue'\nimport type { ProgressColor } from './progress'\n\ndefineOptions({\n name: 'ElProgress',\n})\n\nconst STATUS_COLOR_MAP: Record<string, string> = {\n success: '#13ce66',\n exception: '#ff4949',\n warning: '#e6a23c',\n default: '#20a0ff',\n}\n\nconst props = defineProps(progressProps)\n\nconst ns = useNamespace('progress')\n\nconst barStyle = computed<CSSProperties>(() => ({\n width: `${props.percentage}%`,\n animationDuration: `${props.duration}s`,\n background: getCurrentColor(props.percentage),\n}))\n\nconst relativeStrokeWidth = computed(() =>\n ((props.strokeWidth / props.width) * 100).toFixed(1)\n)\n\nconst radius = computed(() => {\n if (['circle', 'dashboard'].includes(props.type)) {\n return Number.parseInt(\n `${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`,\n 10\n )\n }\n return 0\n})\n\nconst trackPath = computed(() => {\n const r = radius.value\n const isDashboard = props.type === 'dashboard'\n return `\n M 50 50\n m 0 ${isDashboard ? '' : '-'}${r}\n a ${r} ${r} 0 1 1 0 ${isDashboard ? '-' : ''}${r * 2}\n a ${r} ${r} 0 1 1 0 ${isDashboard ? '' : '-'}${r * 2}\n `\n})\n\nconst perimeter = computed(() => 2 * Math.PI * radius.value)\n\nconst rate = computed(() => (props.type === 'dashboard' ? 0.75 : 1))\n\nconst strokeDashoffset = computed(() => {\n const offset = (-1 * perimeter.value * (1 - rate.value)) / 2\n return `${offset}px`\n})\n\nconst trailPathStyle = computed<CSSProperties>(() => ({\n strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,\n strokeDashoffset: strokeDashoffset.value,\n}))\n\nconst circlePathStyle = computed<CSSProperties>(() => ({\n strokeDasharray: `${\n perimeter.value * rate.value * (props.percentage / 100)\n }px, ${perimeter.value}px`,\n strokeDashoffset: strokeDashoffset.value,\n transition:\n 'stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s',\n}))\n\nconst stroke = computed(() => {\n let ret: string\n if (props.color) {\n ret = getCurrentColor(props.percentage)\n } else {\n ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default\n }\n return ret\n})\n\nconst statusIcon = computed(() => {\n if (props.status === 'warning') {\n return WarningFilled\n }\n if (props.type === 'line') {\n return props.status === 'success' ? CircleCheck : CircleClose\n } else {\n return props.status === 'success' ? Check : Close\n }\n})\n\nconst progressTextSize = computed(() => {\n return props.type === 'line'\n ? 12 + props.strokeWidth * 0.4\n : props.width * 0.111111 + 2\n})\n\nconst content = computed(() => props.format(props.percentage))\n\nfunction getColors(color: ProgressColor[]) {\n const span = 100 / color.length\n const seriesColors = color.map((seriesColor, index) => {\n if (isString(seriesColor)) {\n return {\n color: seriesColor,\n percentage: (index + 1) * span,\n }\n }\n return seriesColor\n })\n return seriesColors.sort((a, b) => a.percentage - b.percentage)\n}\n\nconst getCurrentColor = (percentage: number) => {\n const { color } = props\n if (isFunction(color)) {\n return color(percentage)\n } else if (isString(color)) {\n return color\n } else {\n const colors = getColors(color)\n for (const color of colors) {\n if (color.percentage > percentage) return color.color\n }\n return colors[colors.length - 1]?.color\n }\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;mCAmGc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAA,MAAM,gBAA2C,GAAA;AAAA,MAC/C,OAAS,EAAA,SAAA;AAAA,MACT,SAAW,EAAA,SAAA;AAAA,MACX,OAAS,EAAA,SAAA;AAAA,MACT,OAAS,EAAA,SAAA;AAAA,KACX,CAAA;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,QAAA,GAAW,SAAwB,OAAO;AAAA,MAC9C,KAAA,EAAO,GAAG,KAAM,CAAA,UAAA,CAAA,CAAA,CAAA;AAAA,MAChB,iBAAA,EAAmB,GAAG,KAAM,CAAA,QAAA,CAAA,CAAA,CAAA;AAAA,MAC5B,UAAA,EA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B,KAAA;AAC9C,MAAA,IAAA,EAAM;AACN,MAAI,MAAA,EAAA,KAAA,EAAW,QAAQ,CAAA;AACrB,MAAA,IAAA,WAAa,KAAU,CAAA,EAAA;AAAA,QACzB,OAAA,KAAoB,CAAA,UAAK,CAAG,CAAA;AAC1B,OAAO,MAAA,IAAA,QAAA,CAAA,KAAA,CAAA,EAAA;AAAA,QACF,OAAA,KAAA,CAAA;AACL,OAAM,MAAA;AACN,QAAA,MAAA,kBAA4B,CAAA,KAAA,CAAA,CAAA;AAC1B,QAAA,KAAA,YAAuB,IAAA,MAAA,EAAA;AAAY,UAAA,IAAA,MAAa,CAAA,UAAA,GAAA,UAAA;AAAA,YAClD,OAAA,MAAA,CAAA,KAAA,CAAA;AACA,SAAO;AAA2B,QACpC,OAAA,CAAA,EAAA,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,GAAA,CAAA,CAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAAA,OACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"progress2.mjs","sources":["../../../../../../packages/components/progress/src/progress.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(type),\n ns.is(status),\n {\n [ns.m('without-text')]: !showText,\n [ns.m('text-inside')]: textInside,\n },\n ]\"\n role=\"progressbar\"\n :aria-valuenow=\"percentage\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <div v-if=\"type === 'line'\" :class=\"ns.b('bar')\">\n <div\n :class=\"ns.be('bar', 'outer')\"\n :style=\"{ height: `${strokeWidth}px` }\"\n >\n <div\n :class=\"[\n ns.be('bar', 'inner'),\n { [ns.bem('bar', 'inner', 'indeterminate')]: indeterminate },\n { [ns.bem('bar', 'inner', 'striped')]: striped },\n { [ns.bem('bar', 'inner', 'striped-flow')]: stripedFlow },\n ]\"\n :style=\"barStyle\"\n >\n <div\n v-if=\"(showText || $slots.default) && textInside\"\n :class=\"ns.be('bar', 'innerText')\"\n >\n <slot :percentage=\"percentage\">\n <span>{{ content }}</span>\n </slot>\n </div>\n </div>\n </div>\n </div>\n <div\n v-else\n :class=\"ns.b('circle')\"\n :style=\"{ height: `${width}px`, width: `${width}px` }\"\n >\n <svg viewBox=\"0 0 100 100\">\n <path\n :class=\"ns.be('circle', 'track')\"\n :d=\"trackPath\"\n :stroke=\"`var(${ns.cssVarName('fill-color-light')}, #e5e9f2)`\"\n :stroke-linecap=\"strokeLinecap\"\n :stroke-width=\"relativeStrokeWidth\"\n fill=\"none\"\n :style=\"trailPathStyle\"\n />\n <path\n :class=\"ns.be('circle', 'path')\"\n :d=\"trackPath\"\n :stroke=\"stroke\"\n fill=\"none\"\n :opacity=\"percentage ? 1 : 0\"\n :stroke-linecap=\"strokeLinecap\"\n :stroke-width=\"relativeStrokeWidth\"\n :style=\"circlePathStyle\"\n />\n </svg>\n </div>\n <div\n v-if=\"(showText || $slots.default) && !textInside\"\n :class=\"ns.e('text')\"\n :style=\"{ fontSize: `${progressTextSize}px` }\"\n >\n <slot :percentage=\"percentage\">\n <span v-if=\"!status\">{{ content }}</span>\n <el-icon v-else>\n <component :is=\"statusIcon\" />\n </el-icon>\n </slot>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n Check,\n CircleCheck,\n CircleClose,\n Close,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isString } from '@element-plus/utils'\nimport { progressProps } from './progress'\nimport type { CSSProperties } from 'vue'\nimport type { ProgressColor } from './progress'\n\ndefineOptions({\n name: 'ElProgress',\n})\n\nconst STATUS_COLOR_MAP: Record<string, string> = {\n success: '#13ce66',\n exception: '#ff4949',\n warning: '#e6a23c',\n default: '#20a0ff',\n}\n\nconst props = defineProps(progressProps)\n\nconst ns = useNamespace('progress')\n\nconst barStyle = computed<CSSProperties>(() => {\n const barStyle: CSSProperties = {\n width: `${props.percentage}%`,\n animationDuration: `${props.duration}s`,\n }\n const color = getCurrentColor(props.percentage)\n if (color.includes('gradient')) {\n barStyle.background = color\n } else {\n barStyle.backgroundColor = color\n }\n return barStyle\n})\n\nconst relativeStrokeWidth = computed(() =>\n ((props.strokeWidth / props.width) * 100).toFixed(1)\n)\n\nconst radius = computed(() => {\n if (['circle', 'dashboard'].includes(props.type)) {\n return Number.parseInt(\n `${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`,\n 10\n )\n }\n return 0\n})\n\nconst trackPath = computed(() => {\n const r = radius.value\n const isDashboard = props.type === 'dashboard'\n return `\n M 50 50\n m 0 ${isDashboard ? '' : '-'}${r}\n a ${r} ${r} 0 1 1 0 ${isDashboard ? '-' : ''}${r * 2}\n a ${r} ${r} 0 1 1 0 ${isDashboard ? '' : '-'}${r * 2}\n `\n})\n\nconst perimeter = computed(() => 2 * Math.PI * radius.value)\n\nconst rate = computed(() => (props.type === 'dashboard' ? 0.75 : 1))\n\nconst strokeDashoffset = computed(() => {\n const offset = (-1 * perimeter.value * (1 - rate.value)) / 2\n return `${offset}px`\n})\n\nconst trailPathStyle = computed<CSSProperties>(() => ({\n strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,\n strokeDashoffset: strokeDashoffset.value,\n}))\n\nconst circlePathStyle = computed<CSSProperties>(() => ({\n strokeDasharray: `${\n perimeter.value * rate.value * (props.percentage / 100)\n }px, ${perimeter.value}px`,\n strokeDashoffset: strokeDashoffset.value,\n transition:\n 'stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s',\n}))\n\nconst stroke = computed(() => {\n let ret: string\n if (props.color) {\n ret = getCurrentColor(props.percentage)\n } else {\n ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default\n }\n return ret\n})\n\nconst statusIcon = computed(() => {\n if (props.status === 'warning') {\n return WarningFilled\n }\n if (props.type === 'line') {\n return props.status === 'success' ? CircleCheck : CircleClose\n } else {\n return props.status === 'success' ? Check : Close\n }\n})\n\nconst progressTextSize = computed(() => {\n return props.type === 'line'\n ? 12 + props.strokeWidth * 0.4\n : props.width * 0.111111 + 2\n})\n\nconst content = computed(() => props.format(props.percentage))\n\nfunction getColors(color: ProgressColor[]) {\n const span = 100 / color.length\n const seriesColors = color.map((seriesColor, index) => {\n if (isString(seriesColor)) {\n return {\n color: seriesColor,\n percentage: (index + 1) * span,\n }\n }\n return seriesColor\n })\n return seriesColors.sort((a, b) => a.percentage - b.percentage)\n}\n\nconst getCurrentColor = (percentage: number) => {\n const { color } = props\n if (isFunction(color)) {\n return color(percentage)\n } else if (isString(color)) {\n return color\n } else {\n const colors = getColors(color)\n for (const color of colors) {\n if (color.percentage > percentage) return color.color\n }\n return colors[colors.length - 1]?.color\n }\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;mCAmGc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAA,MAAM,gBAA2C,GAAA;AAAA,MAC/C,OAAS,EAAA,SAAA;AAAA,MACT,SAAW,EAAA,SAAA;AAAA,MACX,OAAS,EAAA,SAAA;AAAA,MACT,OAAS,EAAA,SAAA;AAAA,KACX,CAAA;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,QAAA,GAAW,SAAwB,MAAM;AAC7C,MAAA,MAAM,SAA0B,GAAA;AAAA,QAC9B,KAAA,EAAO,GAAG,KAAM,CAAA,UAAA,CAAA,CAAA,CAAA;AAAA,QAChB,iBAAA,EAAmB,GAAG,KAAM,CAAA,QAAA,CAAA,CAAA,CAAA;AAAA,OAC9B,CAAA;AACA,MAAM,MAAA,KAAA,GAAQ,eAAgB,CAAA,KAAA,CAAM,UAAU,CAAA,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,CAAA,CAAA;AACD,MAAO,OAAA,YAAA,CAAa,KAAK,CAAC,CAAA,EAAG,MAAM,CAAE,CAAA,UAAA,GAAa,EAAE,UAAU,CAAA,CAAA;AAAA,KAChE;AAEA,IAAM,MAAA,eAAA,GAAkB,CAAC,UAAuB,KAAA;AAC9C,MAAA,IAAA,EAAM;AACN,MAAI,MAAA,EAAA,KAAA,EAAW,QAAQ,CAAA;AACrB,MAAA,IAAA,WAAa,KAAU,CAAA,EAAA;AAAA,QACzB,OAAA,KAAoB,CAAA,UAAK,CAAG,CAAA;AAC1B,OAAO,MAAA,IAAA,QAAA,CAAA,KAAA,CAAA,EAAA;AAAA,QACF,OAAA,KAAA,CAAA;AACL,OAAM,MAAA;AACN,QAAA,MAAA,kBAA4B,CAAA,KAAA,CAAA,CAAA;AAC1B,QAAA,KAAA,YAAuB,IAAA,MAAA,EAAA;AAAY,UAAA,IAAA,MAAa,CAAA,UAAA,GAAA,UAAA;AAAA,YAClD,OAAA,MAAA,CAAA,KAAA,CAAA;AACA,SAAO;AAA2B,QACpC,OAAA,CAAA,EAAA,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,GAAA,CAAA,CAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAAA,OACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Result from './src/
|
|
3
|
-
export { IconComponentMap, IconMap, resultProps } from './src/
|
|
2
|
+
import Result from './src/result2.mjs';
|
|
3
|
+
export { IconComponentMap, IconMap, resultProps } from './src/result.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElResult = withInstall(Result);
|
|
@@ -1,68 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '
|
|
3
|
-
import {
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { CircleCheckFilled, WarningFilled, CircleCloseFilled, InfoFilled } from '@element-plus/icons-vue';
|
|
3
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
6
4
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
33
|
-
unref(resultIcon).component ? (openBlock(), createBlock(resolveDynamicComponent(unref(resultIcon).component), {
|
|
34
|
-
key: 0,
|
|
35
|
-
class: normalizeClass(unref(resultIcon).class)
|
|
36
|
-
}, null, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
37
|
-
])
|
|
38
|
-
], 2),
|
|
39
|
-
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
40
|
-
key: 0,
|
|
41
|
-
class: normalizeClass(unref(ns).e("title"))
|
|
42
|
-
}, [
|
|
43
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
44
|
-
createElementVNode("p", null, toDisplayString(_ctx.title), 1)
|
|
45
|
-
])
|
|
46
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
47
|
-
_ctx.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
|
|
48
|
-
key: 1,
|
|
49
|
-
class: normalizeClass(unref(ns).e("subtitle"))
|
|
50
|
-
}, [
|
|
51
|
-
renderSlot(_ctx.$slots, "sub-title", {}, () => [
|
|
52
|
-
createElementVNode("p", null, toDisplayString(_ctx.subTitle), 1)
|
|
53
|
-
])
|
|
54
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
55
|
-
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
|
56
|
-
key: 2,
|
|
57
|
-
class: normalizeClass(unref(ns).e("extra"))
|
|
58
|
-
}, [
|
|
59
|
-
renderSlot(_ctx.$slots, "extra")
|
|
60
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
61
|
-
], 2);
|
|
62
|
-
};
|
|
5
|
+
const IconMap = {
|
|
6
|
+
success: "icon-success",
|
|
7
|
+
warning: "icon-warning",
|
|
8
|
+
error: "icon-error",
|
|
9
|
+
info: "icon-info"
|
|
10
|
+
};
|
|
11
|
+
const IconComponentMap = {
|
|
12
|
+
[IconMap.success]: CircleCheckFilled,
|
|
13
|
+
[IconMap.warning]: WarningFilled,
|
|
14
|
+
[IconMap.error]: CircleCloseFilled,
|
|
15
|
+
[IconMap.info]: InfoFilled
|
|
16
|
+
};
|
|
17
|
+
const resultProps = buildProps({
|
|
18
|
+
title: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
subTitle: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
icon: {
|
|
27
|
+
type: String,
|
|
28
|
+
values: ["success", "warning", "info", "error"],
|
|
29
|
+
default: "info"
|
|
63
30
|
}
|
|
64
31
|
});
|
|
65
|
-
var Result = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "result.vue"]]);
|
|
66
32
|
|
|
67
|
-
export {
|
|
33
|
+
export { IconComponentMap, IconMap, resultProps };
|
|
68
34
|
//# sourceMappingURL=result.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.mjs","sources":["../../../../../../packages/components/result/src/result.
|
|
1
|
+
{"version":3,"file":"result.mjs","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport {\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type Result from './result.vue'\n\nexport const IconMap = {\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n typeof IconMap[keyof typeof IconMap],\n Component\n> = {\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport const resultProps = buildProps({\n /**\n * @description title of result\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description sub title of result\n */\n subTitle: {\n type: String,\n default: '',\n },\n /**\n * @description icon type of result\n */\n icon: {\n type: String,\n values: ['success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes<typeof resultProps>\n\nexport type ResultInstance = InstanceType<typeof Result>\n"],"names":[],"mappings":";;;;AAOY,MAAC,OAAO,GAAG;AACvB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE;AACU,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAG,iBAAiB;AACtC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAG,aAAa;AAClC,EAAE,CAAC,OAAO,CAAC,KAAK,GAAG,iBAAiB;AACpC,EAAE,CAAC,OAAO,CAAC,IAAI,GAAG,UAAU;AAC5B,EAAE;AACU,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;AACnD,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,34 +1,68 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, toDisplayString } from 'vue';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
3
|
+
import { resultProps, IconMap, IconComponentMap } from './result.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
4
6
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
7
|
+
const __default__ = defineComponent({
|
|
8
|
+
name: "ElResult"
|
|
9
|
+
});
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
+
...__default__,
|
|
12
|
+
props: resultProps,
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const ns = useNamespace("result");
|
|
16
|
+
const resultIcon = computed(() => {
|
|
17
|
+
const icon = props.icon;
|
|
18
|
+
const iconClass = icon && IconMap[icon] ? IconMap[icon] : "icon-info";
|
|
19
|
+
const iconComponent = IconComponentMap[iconClass] || IconComponentMap["icon-info"];
|
|
20
|
+
return {
|
|
21
|
+
class: iconClass,
|
|
22
|
+
component: iconComponent
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return openBlock(), createElementBlock("div", {
|
|
27
|
+
class: normalizeClass(unref(ns).b())
|
|
28
|
+
}, [
|
|
29
|
+
createElementVNode("div", {
|
|
30
|
+
class: normalizeClass(unref(ns).e("icon"))
|
|
31
|
+
}, [
|
|
32
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
33
|
+
unref(resultIcon).component ? (openBlock(), createBlock(resolveDynamicComponent(unref(resultIcon).component), {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: normalizeClass(unref(resultIcon).class)
|
|
36
|
+
}, null, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
37
|
+
])
|
|
38
|
+
], 2),
|
|
39
|
+
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: normalizeClass(unref(ns).e("title"))
|
|
42
|
+
}, [
|
|
43
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
44
|
+
createElementVNode("p", null, toDisplayString(_ctx.title), 1)
|
|
45
|
+
])
|
|
46
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
47
|
+
_ctx.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
|
|
48
|
+
key: 1,
|
|
49
|
+
class: normalizeClass(unref(ns).e("subtitle"))
|
|
50
|
+
}, [
|
|
51
|
+
renderSlot(_ctx.$slots, "sub-title", {}, () => [
|
|
52
|
+
createElementVNode("p", null, toDisplayString(_ctx.subTitle), 1)
|
|
53
|
+
])
|
|
54
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
55
|
+
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
|
56
|
+
key: 2,
|
|
57
|
+
class: normalizeClass(unref(ns).e("extra"))
|
|
58
|
+
}, [
|
|
59
|
+
renderSlot(_ctx.$slots, "extra")
|
|
60
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
61
|
+
], 2);
|
|
62
|
+
};
|
|
30
63
|
}
|
|
31
64
|
});
|
|
65
|
+
var Result = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "result.vue"]]);
|
|
32
66
|
|
|
33
|
-
export {
|
|
67
|
+
export { Result as default };
|
|
34
68
|
//# sourceMappingURL=result2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result2.mjs","sources":["../../../../../../packages/components/result/src/result.
|
|
1
|
+
{"version":3,"file":"result2.mjs","sources":["../../../../../../packages/components/result/src/result.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('icon')\">\n <slot name=\"icon\">\n <component\n :is=\"resultIcon.component\"\n v-if=\"resultIcon.component\"\n :class=\"resultIcon.class\"\n />\n </slot>\n </div>\n <div v-if=\"title || $slots.title\" :class=\"ns.e('title')\">\n <slot name=\"title\">\n <p>{{ title }}</p>\n </slot>\n </div>\n <div v-if=\"subTitle || $slots['sub-title']\" :class=\"ns.e('subtitle')\">\n <slot name=\"sub-title\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\" />\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { IconComponentMap, IconMap, resultProps } from './result'\n\ndefineOptions({\n name: 'ElResult',\n})\n\nconst props = defineProps(resultProps)\n\nconst ns = useNamespace('result')\n\nconst resultIcon = computed(() => {\n const icon = props.icon\n const iconClass = icon && IconMap[icon] ? IconMap[icon] : 'icon-info'\n const iconComponent =\n IconComponentMap[iconClass] || IconComponentMap['icon-info']\n\n return {\n class: iconClass,\n component: iconComponent,\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;;mCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,UAAA,GAAa,SAAS,MAAM;AAChC,MAAA,MAAM,OAAO,KAAM,CAAA,IAAA,CAAA;AACnB,MAAA,MAAM,SAAY,GAAA,IAAA,IAAQ,OAAQ,CAAA,IAAA,CAAA,GAAQ,QAAQ,IAAQ,CAAA,GAAA,WAAA,CAAA;AAC1D,MAAM,MAAA,aAAA,GACJ,gBAAiB,CAAA,SAAA,CAAA,IAAc,gBAAiB,CAAA,WAAA,CAAA,CAAA;AAElD,MAAO,OAAA;AAAA,QACL,KAAO,EAAA,SAAA;AAAA,QACP,SAAW,EAAA,aAAA;AAAA,OACb,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../../utils/index.mjs';
|
|
2
2
|
import '../../collection/index.mjs';
|
|
3
3
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
-
import { createCollectionWithScope } from '../../collection/src/
|
|
4
|
+
import { createCollectionWithScope } from '../../collection/src/collection2.mjs';
|
|
5
5
|
|
|
6
6
|
const rovingFocusGroupProps = buildProps({
|
|
7
7
|
style: { type: definePropType([String, Array, Object]) },
|
|
@@ -142,6 +142,7 @@ export declare const ElSelect: import("@element-plus/nightly/es/utils").SFCWithI
|
|
|
142
142
|
hasModelValue: import("vue").ComputedRef<boolean>;
|
|
143
143
|
shouldShowPlaceholder: import("vue").ComputedRef<boolean>;
|
|
144
144
|
currentPlaceholder: import("vue").ComputedRef<string>;
|
|
145
|
+
mouseEnterEventName: import("vue").ComputedRef<"mouseenter" | null>;
|
|
145
146
|
showClose: import("vue").ComputedRef<boolean>;
|
|
146
147
|
iconComponent: import("vue").ComputedRef<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown> | undefined>;
|
|
147
148
|
iconReverse: import("vue").ComputedRef<string>;
|
|
@@ -142,6 +142,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
142
142
|
hasModelValue: import("vue").ComputedRef<boolean>;
|
|
143
143
|
shouldShowPlaceholder: import("vue").ComputedRef<boolean>;
|
|
144
144
|
currentPlaceholder: import("vue").ComputedRef<string>;
|
|
145
|
+
mouseEnterEventName: import("vue").ComputedRef<"mouseenter" | null>;
|
|
145
146
|
showClose: import("vue").ComputedRef<boolean>;
|
|
146
147
|
iconComponent: import("vue").ComputedRef<import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown> | undefined>;
|
|
147
148
|
iconReverse: import("vue").ComputedRef<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, provide, reactive, resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, withModifiers, createVNode, withCtx, createElementVNode, renderSlot, createCommentVNode, Fragment, renderList, normalizeStyle, createTextVNode, toDisplayString, createBlock, withKeys, vModelText, resolveDynamicComponent, vShow } from 'vue';
|
|
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
2
|
import '../../../directives/index.mjs';
|
|
3
3
|
import { ElInput } from '../../input/index.mjs';
|
|
4
4
|
import { ElTooltip } from '../../tooltip/index.mjs';
|
|
@@ -73,7 +73,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
73
73
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
74
74
|
ref: "selectRef",
|
|
75
75
|
class: normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]),
|
|
76
|
-
|
|
76
|
+
[toHandlerKey(_ctx.mouseEnterEventName)]: _cache[16] || (_cache[16] = ($event) => _ctx.states.inputHovering = true),
|
|
77
77
|
onMouseleave: _cache[17] || (_cache[17] = ($event) => _ctx.states.inputHovering = false),
|
|
78
78
|
onClick: _cache[18] || (_cache[18] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent", "stop"]))
|
|
79
79
|
}, [
|
|
@@ -392,7 +392,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
392
392
|
]),
|
|
393
393
|
_: 3
|
|
394
394
|
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "onBeforeShow"])
|
|
395
|
-
],
|
|
395
|
+
], 16)), [
|
|
396
396
|
[_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
|
|
397
397
|
]);
|
|
398
398
|
}
|