element-plus 2.3.5 → 2.3.7
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 +219 -225
- package/dist/index.full.min.js +23 -23
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +23 -23
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +220 -225
- 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.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 +10 -10
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.js.map +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.min.mjs.map +1 -1
- package/dist/locale/sr.mjs +10 -10
- 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/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/src/use-backtop.mjs +1 -0
- package/es/components/backtop/src/use-backtop.mjs.map +1 -1
- package/es/components/calendar/index.d.ts +1 -1
- package/es/components/calendar/index.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/form/index.d.ts +4 -4
- package/es/components/form/src/form.d.ts +1 -1
- package/es/components/form/src/form.mjs +1 -4
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form.vue.d.ts +4 -4
- package/es/components/form/src/types.d.ts +62 -1
- package/es/components/image/index.d.ts +24 -21
- package/es/components/image/src/image.d.ts +3 -3
- package/es/components/image/src/image.mjs +3 -12
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image.vue.d.ts +24 -21
- package/es/components/image/src/image2.mjs +6 -5
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.d.ts +10 -8
- package/es/components/image-viewer/src/image-viewer.d.ts +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +2 -8
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +10 -8
- package/es/components/image-viewer/src/image-viewer2.mjs +12 -10
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/input/src/input2.mjs +3 -3
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/message-box/src/index.mjs +0 -2
- package/es/components/message-box/src/index.mjs.map +1 -1
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/notification/src/notification.mjs +1 -4
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +3 -4
- package/es/components/notification/src/notification2.mjs +2 -1
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +6 -6
- package/es/components/pagination/src/components/pager.vue.d.ts +2 -0
- package/es/components/pagination/src/components/pager2.mjs +14 -12
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +1 -4
- package/es/components/pagination/src/pagination.d.ts +9 -9
- package/es/components/pagination/src/pagination.mjs +3 -3
- package/es/components/pagination/src/pagination.mjs.map +1 -1
- package/es/components/popper/src/composables/use-content-dom.mjs +2 -2
- package/es/components/popper/src/composables/use-content-dom.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +174 -46
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +46 -174
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/index.d.ts +1 -4
- package/es/components/select/src/option.mjs +1 -1
- package/es/components/select/src/option.mjs.map +1 -1
- package/es/components/select/src/select.mjs +7 -12
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +1 -4
- package/es/components/select/src/token.d.ts +1 -1
- package/es/components/select/src/token.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +1 -4
- package/es/components/select/src/useSelect.mjs +13 -18
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/src/useSelect.mjs +19 -10
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/steps/index.d.ts +5 -3
- package/es/components/steps/src/item.vue.d.ts +4 -2
- package/es/components/steps/src/item2.mjs +3 -3
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/steps/src/steps.vue.d.ts +3 -2
- package/es/components/steps/src/steps2.mjs +8 -3
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/switch/index.d.ts +38 -35
- package/es/components/switch/src/switch.d.ts +26 -11
- package/es/components/switch/src/switch.mjs +21 -21
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch.vue.d.ts +38 -35
- package/es/components/switch/src/switch2.mjs +33 -21
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/index.d.ts +21 -5
- package/es/components/table/src/store/watcher.mjs +1 -1
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table/defaults.d.ts +3 -0
- package/es/components/table/src/table/defaults.mjs +2 -1
- package/es/components/table/src/table/defaults.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.mjs +7 -9
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table/utils-helper.d.ts +1 -1
- package/es/components/table/src/table/utils-helper.mjs.map +1 -1
- package/es/components/table/src/table-column/defaults.d.ts +4 -1
- package/es/components/table/src/table-column/defaults.mjs +4 -1
- package/es/components/table/src/table-column/defaults.mjs.map +1 -1
- package/es/components/table/src/table-column/index.d.ts +9 -2
- package/es/components/table/src/table-column/index.mjs +3 -1
- package/es/components/table/src/table-column/index.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +3 -1
- package/es/components/time-picker/src/common/picker.mjs +19 -18
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +5 -0
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs +7 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +526 -526
- package/es/components/time-picker/src/time-picker-com/panel-time-range.mjs +14 -12
- package/es/components/time-picker/src/time-picker-com/panel-time-range.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -0
- package/es/components/time-select/index.d.ts +4 -16
- package/es/components/time-select/src/time-select.vue.d.ts +2 -8
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tooltip-v2/src/trigger.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/tree-select/src/tree.mjs +1 -1
- package/es/components/tree-select/src/tree.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +7 -5
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/hooks/index.d.ts +0 -1
- package/es/hooks/index.mjs +0 -1
- package/es/hooks/index.mjs.map +1 -1
- package/es/index.mjs +1 -2
- package/es/index.mjs.map +1 -1
- package/es/locale/lang/sr.mjs +9 -9
- package/es/locale/lang/sr.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/backtop/src/use-backtop.js +1 -0
- package/lib/components/backtop/src/use-backtop.js.map +1 -1
- package/lib/components/calendar/index.d.ts +1 -1
- package/lib/components/calendar/index.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/form/index.d.ts +4 -4
- package/lib/components/form/src/form.d.ts +1 -1
- package/lib/components/form/src/form.js +1 -4
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form.vue.d.ts +4 -4
- package/lib/components/form/src/types.d.ts +62 -1
- package/lib/components/image/index.d.ts +24 -21
- package/lib/components/image/src/image.d.ts +3 -3
- package/lib/components/image/src/image.js +3 -12
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image.vue.d.ts +24 -21
- package/lib/components/image/src/image2.js +6 -5
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.d.ts +10 -8
- package/lib/components/image-viewer/src/image-viewer.d.ts +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +2 -8
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +10 -8
- package/lib/components/image-viewer/src/image-viewer2.js +12 -10
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/input/src/input2.js +3 -3
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/message-box/src/index.js +0 -2
- package/lib/components/message-box/src/index.js.map +1 -1
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/notification/src/notification.js +1 -4
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +3 -4
- package/lib/components/notification/src/notification2.js +2 -1
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/pagination/index.d.ts +6 -6
- package/lib/components/pagination/src/components/pager.vue.d.ts +2 -0
- package/lib/components/pagination/src/components/pager2.js +14 -12
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -4
- package/lib/components/pagination/src/pagination.d.ts +9 -9
- package/lib/components/pagination/src/pagination.js +3 -3
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/popper/src/composables/use-content-dom.js +2 -2
- package/lib/components/popper/src/composables/use-content-dom.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +174 -47
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +47 -174
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/index.d.ts +1 -4
- package/lib/components/select/src/option.js +1 -1
- package/lib/components/select/src/option.js.map +1 -1
- package/lib/components/select/src/select.js +7 -12
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +1 -4
- package/lib/components/select/src/token.d.ts +1 -1
- package/lib/components/select/src/token.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +1 -4
- package/lib/components/select/src/useSelect.js +13 -18
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/src/useSelect.js +19 -10
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/steps/index.d.ts +5 -3
- package/lib/components/steps/src/item.vue.d.ts +4 -2
- package/lib/components/steps/src/item2.js +3 -3
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/steps/src/steps.vue.d.ts +3 -2
- package/lib/components/steps/src/steps2.js +7 -2
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/switch/index.d.ts +38 -35
- package/lib/components/switch/src/switch.d.ts +26 -11
- package/lib/components/switch/src/switch.js +21 -21
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +38 -35
- package/lib/components/switch/src/switch2.js +33 -21
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/index.d.ts +21 -5
- package/lib/components/table/src/store/watcher.js +1 -1
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table/defaults.d.ts +3 -0
- package/lib/components/table/src/table/defaults.js +2 -1
- package/lib/components/table/src/table/defaults.js.map +1 -1
- package/lib/components/table/src/table/style-helper.js +7 -9
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table/utils-helper.d.ts +1 -1
- package/lib/components/table/src/table/utils-helper.js.map +1 -1
- package/lib/components/table/src/table-column/defaults.d.ts +4 -1
- package/lib/components/table/src/table-column/defaults.js +4 -1
- package/lib/components/table/src/table-column/defaults.js.map +1 -1
- package/lib/components/table/src/table-column/index.d.ts +9 -2
- package/lib/components/table/src/table-column/index.js +3 -1
- package/lib/components/table/src/table-column/index.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +3 -1
- package/lib/components/time-picker/src/common/picker.js +18 -17
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +5 -0
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js +7 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +526 -526
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.js +14 -12
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -0
- package/lib/components/time-select/index.d.ts +4 -16
- package/lib/components/time-select/src/time-select.vue.d.ts +2 -8
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tooltip-v2/src/trigger.js +89 -12
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +12 -89
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/tree-select/src/tree.js +1 -1
- package/lib/components/tree-select/src/tree.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +7 -5
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/hooks/index.d.ts +0 -1
- package/lib/hooks/index.js +52 -54
- package/lib/hooks/index.js.map +1 -1
- package/lib/index.js +53 -55
- package/lib/index.js.map +1 -1
- package/lib/locale/lang/sr.js +9 -9
- package/lib/locale/lang/sr.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-checkbox-button.css +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/el-input-number.css +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/el-tag.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/alert.scss +0 -2
- package/theme-chalk/src/badge.scss +0 -3
- package/theme-chalk/src/carousel.scss +0 -2
- package/theme-chalk/src/check-tag.scss +0 -2
- package/theme-chalk/src/checkbox-button.scss +1 -1
- package/theme-chalk/src/common/var.scss +2 -0
- package/theme-chalk/src/dark/css-vars.scss +0 -2
- package/theme-chalk/src/date-picker/picker.scss +0 -1
- package/theme-chalk/src/form.scss +14 -0
- package/theme-chalk/src/icon.scss +0 -2
- package/theme-chalk/src/input-number.scss +1 -1
- package/theme-chalk/src/input.scss +1 -1
- package/theme-chalk/src/loading.scss +0 -2
- package/theme-chalk/src/message.scss +0 -2
- package/theme-chalk/src/mixins/_button.scss +0 -2
- package/theme-chalk/src/pagination.scss +0 -2
- package/theme-chalk/src/table-v2.scss +0 -2
- package/theme-chalk/src/tag.scss +1 -1
- package/theme-chalk/src/timeline-item.scss +0 -1
- package/theme-chalk/src/transfer.scss +0 -3
- package/theme-chalk/src/var.scss +0 -2
- package/web-types.json +1 -1
- package/es/hooks/use-restore-active/index.d.ts +0 -6
- package/es/hooks/use-restore-active/index.mjs +0 -23
- package/es/hooks/use-restore-active/index.mjs.map +0 -1
- package/lib/hooks/use-restore-active/index.d.ts +0 -6
- package/lib/hooks/use-restore-active/index.js +0 -27
- package/lib/hooks/use-restore-active/index.js.map +0 -1
|
@@ -96,7 +96,7 @@ const useTree = (props, { attrs, slots, emit }, {
|
|
|
96
96
|
if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) {
|
|
97
97
|
if (!getNodeValByProp("disabled", data)) {
|
|
98
98
|
const option = (_b = select.value) == null ? void 0 : _b.options.get(getNodeValByProp("value", data));
|
|
99
|
-
(_c = select.value) == null ? void 0 : _c.handleOptionSelect(option
|
|
99
|
+
(_c = select.value) == null ? void 0 : _c.handleOptionSelect(option);
|
|
100
100
|
}
|
|
101
101
|
} else if (props.expandOnClickNode) {
|
|
102
102
|
e.proxy.handleExpandIconClick();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.mjs","sources":["../../../../../../packages/components/tree-select/src/tree.ts"],"sourcesContent":["// @ts-nocheck\nimport { computed, nextTick, toRefs, watch } from 'vue'\nimport { isEqual, pick } from 'lodash-unified'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { isFunction } from '@element-plus/utils'\nimport ElTree from '@element-plus/components/tree'\nimport TreeSelectOption from './tree-select-option'\nimport {\n isValidArray,\n isValidValue,\n toValidArray,\n treeEach,\n treeFind,\n} from './utils'\nimport type { CacheOption } from './cache-options'\nimport type { Ref } from 'vue'\nimport type ElSelect from '@element-plus/components/select'\nimport type Node from '@element-plus/components/tree/src/model/node'\nimport type { TreeNodeData } from '@element-plus/components/tree/src/tree.type'\n\nexport const useTree = (\n props,\n { attrs, slots, emit },\n {\n select,\n tree,\n key,\n }: {\n select: Ref<InstanceType<typeof ElSelect> | undefined>\n tree: Ref<InstanceType<typeof ElTree> | undefined>\n key: Ref<string>\n }\n) => {\n watch(\n () => props.modelValue,\n () => {\n if (props.showCheckbox) {\n nextTick(() => {\n const treeInstance = tree.value\n if (\n treeInstance &&\n !isEqual(\n treeInstance.getCheckedKeys(),\n toValidArray(props.modelValue)\n )\n ) {\n treeInstance.setCheckedKeys(toValidArray(props.modelValue))\n }\n })\n }\n },\n {\n immediate: true,\n deep: true,\n }\n )\n\n const propsMap = computed(() => ({\n value: key.value,\n label: 'label',\n children: 'children',\n disabled: 'disabled',\n isLeaf: 'isLeaf',\n ...props.props,\n }))\n\n const getNodeValByProp = (\n prop: 'value' | 'label' | 'children' | 'disabled' | 'isLeaf',\n data: TreeNodeData\n ) => {\n const propVal = propsMap.value[prop]\n if (isFunction(propVal)) {\n return propVal(\n data,\n tree.value?.getNode(getNodeValByProp('value', data)) as Node\n )\n } else {\n return data[propVal as string]\n }\n }\n\n const defaultExpandedParentKeys = toValidArray(props.modelValue)\n .map((value) => {\n return treeFind(\n props.data || [],\n (data) => getNodeValByProp('value', data) === value,\n (data) => getNodeValByProp('children', data),\n (data, index, array, parent) =>\n parent && getNodeValByProp('value', parent)\n )\n })\n .filter((item) => isValidValue(item))\n\n const cacheOptions = computed(() => {\n if (!props.renderAfterExpand && !props.lazy) return []\n\n const options: CacheOption[] = []\n\n treeEach(\n props.data.concat(props.cacheData),\n (node) => {\n const value = getNodeValByProp('value', node)\n options.push({\n value,\n currentLabel: getNodeValByProp('label', node),\n isDisabled: getNodeValByProp('disabled', node),\n })\n },\n (data) => getNodeValByProp('children', data)\n )\n\n return options\n })\n\n const cacheOptionsMap = computed(() => {\n return cacheOptions.value.reduce(\n (prev, next) => ({ ...prev, [next.value]: next }),\n {}\n )\n })\n\n return {\n ...pick(toRefs(props), Object.keys(ElTree.props)),\n ...attrs,\n nodeKey: key,\n\n // only expand on click node when the `check-strictly` is false\n expandOnClickNode: computed(() => {\n return !props.checkStrictly && props.expandOnClickNode\n }),\n\n // show current selected node only first time,\n // fix the problem of expanding multiple nodes when checking multiple nodes\n defaultExpandedKeys: computed(() => {\n return props.defaultExpandedKeys\n ? props.defaultExpandedKeys.concat(defaultExpandedParentKeys)\n : defaultExpandedParentKeys\n }),\n\n renderContent: (h, { node, data, store }) => {\n return h(\n TreeSelectOption,\n {\n value: getNodeValByProp('value', data),\n label: getNodeValByProp('label', data),\n disabled: getNodeValByProp('disabled', data),\n },\n props.renderContent\n ? () => props.renderContent(h, { node, data, store })\n : slots.default\n ? () => slots.default({ node, data, store })\n : undefined\n )\n },\n filterNodeMethod: (value, data, node) => {\n if (props.filterNodeMethod)\n return props.filterNodeMethod(value, data, node)\n if (!value) return true\n return getNodeValByProp('label', data)?.includes(value)\n },\n onNodeClick: (data, node, e) => {\n attrs.onNodeClick?.(data, node, e)\n\n // `onCheck` is trigger when `checkOnClickNode`\n if (props.showCheckbox && props.checkOnClickNode) return\n\n // now `checkOnClickNode` is false, only no checkbox and `checkStrictly` or `isLeaf`\n if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) {\n if (!getNodeValByProp('disabled', data)) {\n const option = select.value?.options.get(\n getNodeValByProp('value', data)\n )\n select.value?.handleOptionSelect(option, true)\n }\n } else if (props.expandOnClickNode) {\n e.proxy.handleExpandIconClick()\n }\n },\n onCheck: (data, params) => {\n // ignore when no checkbox, like only `checkOnClickNode` is true\n if (!props.showCheckbox) return\n\n const dataValue = getNodeValByProp('value', data)\n\n // fix: checkedKeys has not cached keys\n const uncachedCheckedKeys = params.checkedKeys\n const cachedKeys = props.multiple\n ? toValidArray(props.modelValue).filter(\n (item) =>\n item in cacheOptionsMap.value &&\n !tree.value.getNode(item) &&\n !uncachedCheckedKeys.includes(item)\n )\n : []\n const checkedKeys = uncachedCheckedKeys.concat(cachedKeys)\n\n if (props.checkStrictly) {\n emit(\n UPDATE_MODEL_EVENT,\n // Checking for changes may come from `check-on-node-click`\n props.multiple\n ? checkedKeys\n : checkedKeys.includes(dataValue)\n ? dataValue\n : undefined\n )\n }\n // only can select leaf node\n else {\n if (props.multiple) {\n emit(\n UPDATE_MODEL_EVENT,\n (tree.value as InstanceType<typeof ElTree>).getCheckedKeys(true)\n )\n } else {\n // select first leaf node when check parent\n const firstLeaf = treeFind(\n [data],\n (data) =>\n !isValidArray(getNodeValByProp('children', data)) &&\n !getNodeValByProp('disabled', data),\n (data) => getNodeValByProp('children', data)\n )\n const firstLeafKey = firstLeaf\n ? getNodeValByProp('value', firstLeaf)\n : undefined\n\n // unselect when any child checked\n const hasCheckedChild =\n isValidValue(props.modelValue) &&\n !!treeFind(\n [data],\n (data) => getNodeValByProp('value', data) === props.modelValue,\n (data) => getNodeValByProp('children', data)\n )\n\n emit(\n UPDATE_MODEL_EVENT,\n firstLeafKey === props.modelValue || hasCheckedChild\n ? undefined\n : firstLeafKey\n )\n }\n }\n\n nextTick(() => {\n const checkedKeys = toValidArray(props.modelValue)\n tree.value.setCheckedKeys(checkedKeys)\n\n attrs.onCheck?.(data, {\n checkedKeys: tree.value.getCheckedKeys(),\n checkedNodes: tree.value.getCheckedNodes(),\n halfCheckedKeys: tree.value.getHalfCheckedKeys(),\n halfCheckedNodes: tree.value.getHalfCheckedNodes(),\n })\n })\n },\n\n // else\n cacheOptions,\n }\n}\n"],"names":["ElTree","TreeSelectOption"],"mappings":";;;;;;;;;;AAaY,MAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IA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CAAC,UAAU,CAAC,CAAC;AAC5D,QAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;AAChD,QAAQ,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;AACrE,UAAU,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE;AAClD,UAAU,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE;AACpD,UAAU,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE;AAC1D,UAAU,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE;AAC5D,SAAS,CAAC,CAAC;AACX,OAAO,CAAC,CAAC;AACT,KAAK;AACL,IAAI,YAAY;AAChB,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"tree.mjs","sources":["../../../../../../packages/components/tree-select/src/tree.ts"],"sourcesContent":["// @ts-nocheck\nimport { computed, nextTick, toRefs, watch } from 'vue'\nimport { isEqual, pick } from 'lodash-unified'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { isFunction } from '@element-plus/utils'\nimport ElTree from '@element-plus/components/tree'\nimport TreeSelectOption from './tree-select-option'\nimport {\n isValidArray,\n isValidValue,\n toValidArray,\n treeEach,\n treeFind,\n} from './utils'\nimport type { CacheOption } from './cache-options'\nimport type { Ref } from 'vue'\nimport type ElSelect from '@element-plus/components/select'\nimport type Node from '@element-plus/components/tree/src/model/node'\nimport type { TreeNodeData } from '@element-plus/components/tree/src/tree.type'\n\nexport const useTree = (\n props,\n { attrs, slots, emit },\n {\n select,\n tree,\n key,\n }: {\n select: Ref<InstanceType<typeof ElSelect> | undefined>\n tree: Ref<InstanceType<typeof ElTree> | undefined>\n key: Ref<string>\n }\n) => {\n watch(\n () => props.modelValue,\n () => {\n if (props.showCheckbox) {\n nextTick(() => {\n const treeInstance = tree.value\n if (\n treeInstance &&\n !isEqual(\n treeInstance.getCheckedKeys(),\n toValidArray(props.modelValue)\n )\n ) {\n treeInstance.setCheckedKeys(toValidArray(props.modelValue))\n }\n })\n }\n },\n {\n immediate: true,\n deep: true,\n }\n )\n\n const propsMap = computed(() => ({\n value: key.value,\n label: 'label',\n children: 'children',\n disabled: 'disabled',\n isLeaf: 'isLeaf',\n ...props.props,\n }))\n\n const getNodeValByProp = (\n prop: 'value' | 'label' | 'children' | 'disabled' | 'isLeaf',\n data: TreeNodeData\n ) => {\n const propVal = propsMap.value[prop]\n if (isFunction(propVal)) {\n return propVal(\n data,\n tree.value?.getNode(getNodeValByProp('value', data)) as Node\n )\n } else {\n return data[propVal as string]\n }\n }\n\n const defaultExpandedParentKeys = toValidArray(props.modelValue)\n .map((value) => {\n return treeFind(\n props.data || [],\n (data) => getNodeValByProp('value', data) === value,\n (data) => getNodeValByProp('children', data),\n (data, index, array, parent) =>\n parent && getNodeValByProp('value', parent)\n )\n })\n .filter((item) => isValidValue(item))\n\n const cacheOptions = computed(() => {\n if (!props.renderAfterExpand && !props.lazy) return []\n\n const options: CacheOption[] = []\n\n treeEach(\n props.data.concat(props.cacheData),\n (node) => {\n const value = getNodeValByProp('value', node)\n options.push({\n value,\n currentLabel: getNodeValByProp('label', node),\n isDisabled: getNodeValByProp('disabled', node),\n })\n },\n (data) => getNodeValByProp('children', data)\n )\n\n return options\n })\n\n const cacheOptionsMap = computed(() => {\n return cacheOptions.value.reduce(\n (prev, next) => ({ ...prev, [next.value]: next }),\n {}\n )\n })\n\n return {\n ...pick(toRefs(props), Object.keys(ElTree.props)),\n ...attrs,\n nodeKey: key,\n\n // only expand on click node when the `check-strictly` is false\n expandOnClickNode: computed(() => {\n return !props.checkStrictly && props.expandOnClickNode\n }),\n\n // show current selected node only first time,\n // fix the problem of expanding multiple nodes when checking multiple nodes\n defaultExpandedKeys: computed(() => {\n return props.defaultExpandedKeys\n ? props.defaultExpandedKeys.concat(defaultExpandedParentKeys)\n : defaultExpandedParentKeys\n }),\n\n renderContent: (h, { node, data, store }) => {\n return h(\n TreeSelectOption,\n {\n value: getNodeValByProp('value', data),\n label: getNodeValByProp('label', data),\n disabled: getNodeValByProp('disabled', data),\n },\n props.renderContent\n ? () => props.renderContent(h, { node, data, store })\n : slots.default\n ? () => slots.default({ node, data, store })\n : undefined\n )\n },\n filterNodeMethod: (value, data, node) => {\n if (props.filterNodeMethod)\n return props.filterNodeMethod(value, data, node)\n if (!value) return true\n return getNodeValByProp('label', data)?.includes(value)\n },\n onNodeClick: (data, node, e) => {\n attrs.onNodeClick?.(data, node, e)\n\n // `onCheck` is trigger when `checkOnClickNode`\n if (props.showCheckbox && props.checkOnClickNode) return\n\n // now `checkOnClickNode` is false, only no checkbox and `checkStrictly` or `isLeaf`\n if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) {\n if (!getNodeValByProp('disabled', data)) {\n const option = select.value?.options.get(\n getNodeValByProp('value', data)\n )\n select.value?.handleOptionSelect(option)\n }\n } else if (props.expandOnClickNode) {\n e.proxy.handleExpandIconClick()\n }\n },\n onCheck: (data, params) => {\n // ignore when no checkbox, like only `checkOnClickNode` is true\n if (!props.showCheckbox) return\n\n const dataValue = getNodeValByProp('value', data)\n\n // fix: checkedKeys has not cached keys\n const uncachedCheckedKeys = params.checkedKeys\n const cachedKeys = props.multiple\n ? toValidArray(props.modelValue).filter(\n (item) =>\n item in cacheOptionsMap.value &&\n !tree.value.getNode(item) &&\n !uncachedCheckedKeys.includes(item)\n )\n : []\n const checkedKeys = uncachedCheckedKeys.concat(cachedKeys)\n\n if (props.checkStrictly) {\n emit(\n UPDATE_MODEL_EVENT,\n // Checking for changes may come from `check-on-node-click`\n props.multiple\n ? checkedKeys\n : checkedKeys.includes(dataValue)\n ? dataValue\n : undefined\n )\n }\n // only can select leaf node\n else {\n if (props.multiple) {\n emit(\n UPDATE_MODEL_EVENT,\n (tree.value as InstanceType<typeof ElTree>).getCheckedKeys(true)\n )\n } else {\n // select first leaf node when check parent\n const firstLeaf = treeFind(\n [data],\n (data) =>\n !isValidArray(getNodeValByProp('children', data)) &&\n !getNodeValByProp('disabled', data),\n (data) => getNodeValByProp('children', data)\n )\n const firstLeafKey = firstLeaf\n ? getNodeValByProp('value', firstLeaf)\n : undefined\n\n // unselect when any child checked\n const hasCheckedChild =\n isValidValue(props.modelValue) &&\n !!treeFind(\n [data],\n (data) => getNodeValByProp('value', data) === props.modelValue,\n (data) => getNodeValByProp('children', data)\n )\n\n emit(\n UPDATE_MODEL_EVENT,\n firstLeafKey === props.modelValue || hasCheckedChild\n ? undefined\n : firstLeafKey\n )\n }\n }\n\n nextTick(() => {\n const checkedKeys = toValidArray(props.modelValue)\n tree.value.setCheckedKeys(checkedKeys)\n\n attrs.onCheck?.(data, {\n checkedKeys: tree.value.getCheckedKeys(),\n checkedNodes: tree.value.getCheckedNodes(),\n halfCheckedKeys: tree.value.getHalfCheckedKeys(),\n halfCheckedNodes: tree.value.getHalfCheckedNodes(),\n })\n })\n },\n\n // else\n cacheOptions,\n }\n}\n"],"names":["ElTree","TreeSelectOption"],"mappings":";;;;;;;;;;AAaY,MAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;AACvD,EAAE,MAAM;AACR,EAAE,IAAI;AACN,EAAE,GAAG;AACL,CAAC,KAAK;AACN,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,UAAU,EAAE,MAAM;AACtC,IAAI,IAAI,KAAK,CAAC,YAAY,EAAE;AAC5B,MAAM,QAAQ,CAAC,MAAM;AACrB,QAAQ,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC;AACxC,QAAQ,IAAI,YAAY,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,YAAY,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE;AACrG,UAAU,YAAY,CAAC,c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IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE;AAC5D,SAAS,CAAC,CAAC;AACX,OAAO,CAAC,CAAC;AACT,KAAK;AACL,IAAI,YAAY;AAChB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -13,8 +13,9 @@ import { useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs'
|
|
|
13
13
|
const _hoisted_1 = ["onKeydown"];
|
|
14
14
|
const _hoisted_2 = ["src"];
|
|
15
15
|
const _hoisted_3 = ["onClick"];
|
|
16
|
-
const _hoisted_4 = ["
|
|
16
|
+
const _hoisted_4 = ["title"];
|
|
17
17
|
const _hoisted_5 = ["onClick"];
|
|
18
|
+
const _hoisted_6 = ["onClick"];
|
|
18
19
|
const __default__ = defineComponent({
|
|
19
20
|
name: "ElUploadList"
|
|
20
21
|
});
|
|
@@ -81,8 +82,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
81
82
|
_: 1
|
|
82
83
|
}, 8, ["class"]),
|
|
83
84
|
createElementVNode("span", {
|
|
84
|
-
class: normalizeClass(unref(nsUpload).be("list", "item-file-name"))
|
|
85
|
-
|
|
85
|
+
class: normalizeClass(unref(nsUpload).be("list", "item-file-name")),
|
|
86
|
+
title: file.name
|
|
87
|
+
}, toDisplayString(file.name), 11, _hoisted_4)
|
|
86
88
|
], 10, _hoisted_3),
|
|
87
89
|
file.status === "uploading" ? (openBlock(), createBlock(unref(ElProgress), {
|
|
88
90
|
key: 0,
|
|
@@ -146,7 +148,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
148
|
]),
|
|
147
149
|
_: 1
|
|
148
150
|
}, 8, ["class"])
|
|
149
|
-
], 10,
|
|
151
|
+
], 10, _hoisted_5),
|
|
150
152
|
!unref(disabled) ? (openBlock(), createElementBlock("span", {
|
|
151
153
|
key: 0,
|
|
152
154
|
class: normalizeClass(unref(nsUpload).be("list", "item-delete")),
|
|
@@ -160,7 +162,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
160
162
|
]),
|
|
161
163
|
_: 1
|
|
162
164
|
}, 8, ["class"])
|
|
163
|
-
], 10,
|
|
165
|
+
], 10, _hoisted_6)) : createCommentVNode("v-if", true)
|
|
164
166
|
], 2)) : createCommentVNode("v-if", true)
|
|
165
167
|
])
|
|
166
168
|
], 42, _hoisted_1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-list2.mjs","sources":["../../../../../../packages/components/upload/src/upload-list.vue"],"sourcesContent":["<template>\n <transition-group\n tag=\"ul\"\n :class=\"[\n nsUpload.b('list'),\n nsUpload.bm('list', listType),\n nsUpload.is('disabled', disabled),\n ]\"\n :name=\"nsList.b()\"\n >\n <li\n v-for=\"file in files\"\n :key=\"file.uid || file.name\"\n :class=\"[\n nsUpload.be('list', 'item'),\n nsUpload.is(file.status),\n { focusing },\n ]\"\n tabindex=\"0\"\n @keydown.delete=\"!disabled && handleRemove(file)\"\n @focus=\"focusing = true\"\n @blur=\"focusing = false\"\n @click=\"focusing = false\"\n >\n <slot :file=\"file\">\n <img\n v-if=\"\n listType === 'picture' ||\n (file.status !== 'uploading' && listType === 'picture-card')\n \"\n :class=\"nsUpload.be('list', 'item-thumbnail')\"\n :src=\"file.url\"\n alt=\"\"\n />\n <div\n v-if=\"file.status === 'uploading' || listType !== 'picture-card'\"\n :class=\"nsUpload.be('list', 'item-info')\"\n >\n <a\n :class=\"nsUpload.be('list', 'item-name')\"\n @click.prevent=\"handlePreview(file)\"\n >\n <el-icon :class=\"nsIcon.m('document')\">\n <Document />\n </el-icon>\n <span
|
|
1
|
+
{"version":3,"file":"upload-list2.mjs","sources":["../../../../../../packages/components/upload/src/upload-list.vue"],"sourcesContent":["<template>\n <transition-group\n tag=\"ul\"\n :class=\"[\n nsUpload.b('list'),\n nsUpload.bm('list', listType),\n nsUpload.is('disabled', disabled),\n ]\"\n :name=\"nsList.b()\"\n >\n <li\n v-for=\"file in files\"\n :key=\"file.uid || file.name\"\n :class=\"[\n nsUpload.be('list', 'item'),\n nsUpload.is(file.status),\n { focusing },\n ]\"\n tabindex=\"0\"\n @keydown.delete=\"!disabled && handleRemove(file)\"\n @focus=\"focusing = true\"\n @blur=\"focusing = false\"\n @click=\"focusing = false\"\n >\n <slot :file=\"file\">\n <img\n v-if=\"\n listType === 'picture' ||\n (file.status !== 'uploading' && listType === 'picture-card')\n \"\n :class=\"nsUpload.be('list', 'item-thumbnail')\"\n :src=\"file.url\"\n alt=\"\"\n />\n <div\n v-if=\"file.status === 'uploading' || listType !== 'picture-card'\"\n :class=\"nsUpload.be('list', 'item-info')\"\n >\n <a\n :class=\"nsUpload.be('list', 'item-name')\"\n @click.prevent=\"handlePreview(file)\"\n >\n <el-icon :class=\"nsIcon.m('document')\">\n <Document />\n </el-icon>\n <span\n :class=\"nsUpload.be('list', 'item-file-name')\"\n :title=\"file.name\"\n >\n {{ file.name }}\n </span>\n </a>\n <el-progress\n v-if=\"file.status === 'uploading'\"\n :type=\"listType === 'picture-card' ? 'circle' : 'line'\"\n :stroke-width=\"listType === 'picture-card' ? 6 : 2\"\n :percentage=\"Number(file.percentage)\"\n :style=\"listType === 'picture-card' ? '' : 'margin-top: 0.5rem'\"\n />\n </div>\n\n <label :class=\"nsUpload.be('list', 'item-status-label')\">\n <el-icon\n v-if=\"listType === 'text'\"\n :class=\"[nsIcon.m('upload-success'), nsIcon.m('circle-check')]\"\n >\n <circle-check />\n </el-icon>\n <el-icon\n v-else-if=\"['picture-card', 'picture'].includes(listType)\"\n :class=\"[nsIcon.m('upload-success'), nsIcon.m('check')]\"\n >\n <Check />\n </el-icon>\n </label>\n <el-icon\n v-if=\"!disabled\"\n :class=\"nsIcon.m('close')\"\n @click=\"handleRemove(file)\"\n >\n <Close />\n </el-icon>\n <!-- Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn-->\n <!-- This is a bug which needs to be fixed -->\n <!-- TODO: Fix the incorrect navigation interaction -->\n <i v-if=\"!disabled\" :class=\"nsIcon.m('close-tip')\">{{\n t('el.upload.deleteTip')\n }}</i>\n <span\n v-if=\"listType === 'picture-card'\"\n :class=\"nsUpload.be('list', 'item-actions')\"\n >\n <span\n :class=\"nsUpload.be('list', 'item-preview')\"\n @click=\"handlePreview(file)\"\n >\n <el-icon :class=\"nsIcon.m('zoom-in')\"><zoom-in /></el-icon>\n </span>\n <span\n v-if=\"!disabled\"\n :class=\"nsUpload.be('list', 'item-delete')\"\n @click=\"handleRemove(file)\"\n >\n <el-icon :class=\"nsIcon.m('delete')\">\n <Delete />\n </el-icon>\n </span>\n </span>\n </slot>\n </li>\n <slot name=\"append\" />\n </transition-group>\n</template>\n<script lang=\"ts\" setup>\nimport { ref } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n Check,\n CircleCheck,\n Close,\n Delete,\n Document,\n ZoomIn,\n} from '@element-plus/icons-vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport ElProgress from '@element-plus/components/progress'\nimport { useFormDisabled } from '@element-plus/components/form'\n\nimport { uploadListEmits, uploadListProps } from './upload-list'\nimport type { UploadFile } from './upload'\n\ndefineOptions({\n name: 'ElUploadList',\n})\n\ndefineProps(uploadListProps)\nconst emit = defineEmits(uploadListEmits)\n\nconst { t } = useLocale()\nconst nsUpload = useNamespace('upload')\nconst nsIcon = useNamespace('icon')\nconst nsList = useNamespace('list')\nconst disabled = useFormDisabled()\n\nconst focusing = ref(false)\n\nconst handleRemove = (file: UploadFile) => {\n emit('remove', file)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;mCAmIc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAKA,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,QAAA,GAAW,aAAa,QAAQ,CAAA,CAAA;AACtC,IAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA,CAAA;AAClC,IAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA,CAAA;AAClC,IAAA,MAAM,WAAW,eAAgB,EAAA,CAAA;AAEjC,IAAM,MAAA,QAAA,GAAW,IAAI,KAAK,CAAA,CAAA;AAE1B,IAAM,MAAA,YAAA,GAAe,CAAC,IAAqB,KAAA;AACzC,MAAA,IAAA,CAAK,UAAU,IAAI,CAAA,CAAA;AAAA,KACrB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/hooks/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export * from './use-model-toggle';
|
|
|
9
9
|
export * from './use-prevent-global';
|
|
10
10
|
export * from './use-prop';
|
|
11
11
|
export * from './use-popper';
|
|
12
|
-
export * from './use-restore-active';
|
|
13
12
|
export * from './use-same-target';
|
|
14
13
|
export * from './use-teleport';
|
|
15
14
|
export * from './use-throttle-render';
|
package/es/hooks/index.mjs
CHANGED
|
@@ -9,7 +9,6 @@ export { createModelToggleComposable, useModelToggle, useModelToggleEmits, useMo
|
|
|
9
9
|
export { usePreventGlobal } from './use-prevent-global/index.mjs';
|
|
10
10
|
export { useProp } from './use-prop/index.mjs';
|
|
11
11
|
export { usePopper } from './use-popper/index.mjs';
|
|
12
|
-
export { useRestoreActive } from './use-restore-active/index.mjs';
|
|
13
12
|
export { useSameTarget } from './use-same-target/index.mjs';
|
|
14
13
|
export { useTeleport } from './use-teleport/index.mjs';
|
|
15
14
|
export { useThrottleRender } from './use-throttle-render/index.mjs';
|
package/es/hooks/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -135,7 +135,7 @@ export { RowAlign, RowJustify, rowProps } from './components/row/src/row.mjs';
|
|
|
135
135
|
export { rowContextKey } from './components/row/src/constants.mjs';
|
|
136
136
|
export { ElRow } from './components/row/index.mjs';
|
|
137
137
|
export { BAR_MAP, GAP, renderThumbStyle } from './components/scrollbar/src/util.mjs';
|
|
138
|
-
export { scrollbarEmits, scrollbarProps } from './components/scrollbar/src/
|
|
138
|
+
export { scrollbarEmits, scrollbarProps } from './components/scrollbar/src/scrollbar2.mjs';
|
|
139
139
|
export { thumbProps } from './components/scrollbar/src/thumb.mjs';
|
|
140
140
|
export { scrollbarContextKey } from './components/scrollbar/src/constants.mjs';
|
|
141
141
|
export { ElScrollbar } from './components/scrollbar/index.mjs';
|
|
@@ -238,7 +238,6 @@ export { createModelToggleComposable, useModelToggle, useModelToggleEmits, useMo
|
|
|
238
238
|
export { usePreventGlobal } from './hooks/use-prevent-global/index.mjs';
|
|
239
239
|
export { useProp } from './hooks/use-prop/index.mjs';
|
|
240
240
|
export { usePopper } from './hooks/use-popper/index.mjs';
|
|
241
|
-
export { useRestoreActive } from './hooks/use-restore-active/index.mjs';
|
|
242
241
|
export { useSameTarget } from './hooks/use-same-target/index.mjs';
|
|
243
242
|
export { useTeleport } from './hooks/use-teleport/index.mjs';
|
|
244
243
|
export { useThrottleRender } from './hooks/use-throttle-render/index.mjs';
|
package/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../packages/element-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@element-plus/components'\nexport * from '@element-plus/constants'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n\nexport { default as dayjs } from 'dayjs'\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../packages/element-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@element-plus/components'\nexport * from '@element-plus/constants'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n\nexport { default as dayjs } from 'dayjs'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
|
package/es/locale/lang/sr.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var sr = {
|
|
|
6
6
|
clear: "\u041F\u043E\u043D\u0438\u0448\u0442\u0438"
|
|
7
7
|
},
|
|
8
8
|
datepicker: {
|
|
9
|
-
now: "\u0421\u0430\u0434",
|
|
9
|
+
now: "\u0421\u0430\u0434\u0430",
|
|
10
10
|
today: "\u0414\u0430\u043D\u0430\u0441",
|
|
11
11
|
cancel: "\u041E\u0442\u043A\u0430\u0436\u0438",
|
|
12
12
|
clear: "\u0411\u0440\u0438\u0448\u0438",
|
|
@@ -76,10 +76,10 @@ var sr = {
|
|
|
76
76
|
pagesize: "/\u0441\u0442\u0440\u0430\u043D\u0438",
|
|
77
77
|
total: "\u0423\u043A\u0443\u043F\u043D\u043E {total}",
|
|
78
78
|
pageClassifier: "",
|
|
79
|
-
page: "
|
|
80
|
-
prev: "
|
|
81
|
-
next: "
|
|
82
|
-
currentPage: "
|
|
79
|
+
page: "\u0421\u0442\u0440\u0430\u043D\u0430",
|
|
80
|
+
prev: "\u0418\u0434\u0438 \u043D\u0430 \u043F\u0440\u0435\u0442\u0445\u043E\u0434\u043D\u0443 \u0441\u0442\u0440\u0430\u043D\u0443",
|
|
81
|
+
next: "\u0418\u0434\u0438 \u043D\u0430 \u0441\u043B\u0435\u0434\u0435\u045B\u0443 \u0441\u0442\u0440\u0430\u043D\u0443",
|
|
82
|
+
currentPage: "\u0441\u0442\u0440\u0430\u043D\u0430 {pager}",
|
|
83
83
|
prevPages: "Previous {pager} pages",
|
|
84
84
|
nextPages: "Next {pager} pages"
|
|
85
85
|
},
|
|
@@ -114,14 +114,14 @@ var sr = {
|
|
|
114
114
|
hasCheckedFormat: "{checked}/{total} \u043E\u0431\u0435\u043B\u0435\u0436\u0435\u043D\u0438\u0445"
|
|
115
115
|
},
|
|
116
116
|
image: {
|
|
117
|
-
error: "
|
|
117
|
+
error: "\u041D\u0415\u0423\u0421\u041F\u0415\u0428\u041D\u041E"
|
|
118
118
|
},
|
|
119
119
|
pageHeader: {
|
|
120
|
-
title: "
|
|
120
|
+
title: "\u041D\u0430\u0437\u0430\u0434"
|
|
121
121
|
},
|
|
122
122
|
popconfirm: {
|
|
123
|
-
confirmButtonText: "
|
|
124
|
-
cancelButtonText: "
|
|
123
|
+
confirmButtonText: "\u0414\u0430",
|
|
124
|
+
cancelButtonText: "\u041D\u0435"
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sr.mjs","sources":["../../../../../packages/locale/lang/sr.ts"],"sourcesContent":["export default {\n name: 'sr',\n el: {\n colorpicker: {\n confirm: 'OK',\n clear: 'Поништи',\n },\n datepicker: {\n now: '
|
|
1
|
+
{"version":3,"file":"sr.mjs","sources":["../../../../../packages/locale/lang/sr.ts"],"sourcesContent":["export default {\n name: 'sr',\n el: {\n colorpicker: {\n confirm: 'OK',\n clear: 'Поништи',\n },\n datepicker: {\n now: 'Сада',\n today: 'Данас',\n cancel: 'Откажи',\n clear: 'Бриши',\n confirm: 'OK',\n selectDate: 'Изабери датум',\n selectTime: 'Изабери време',\n startDate: 'Датум почетка',\n startTime: 'Време почетка',\n endDate: 'Датум завршетка',\n endTime: 'Време завршетка',\n prevYear: 'Претходна година',\n nextYear: 'Следећа година',\n prevMonth: 'Претходни месец',\n nextMonth: 'Следећи месец',\n year: 'година',\n month1: 'јануар',\n month2: 'фебруар',\n month3: 'март',\n month4: 'април',\n month5: 'мај',\n month6: 'јун',\n month7: 'јул',\n month8: 'август',\n month9: 'септембар',\n month10: 'октобар',\n month11: 'новембар',\n month12: 'децембар',\n week: 'седмица',\n weeks: {\n sun: 'Нед',\n mon: 'Пон',\n tue: 'Уто',\n wed: 'Сре',\n thu: 'Чет',\n fri: 'Пет',\n sat: 'Суб',\n },\n months: {\n jan: 'јан',\n feb: 'феб',\n mar: 'мар',\n apr: 'апр',\n may: 'мај',\n jun: 'јун',\n jul: 'јул',\n aug: 'авг',\n sep: 'сеп',\n oct: 'окт',\n nov: 'нов',\n dec: 'дец',\n },\n },\n select: {\n loading: 'Учитавање',\n noMatch: 'Нема резултата',\n noData: 'Нема података',\n placeholder: 'Изабери',\n },\n cascader: {\n noMatch: 'Нема резултата',\n loading: 'Учитавање',\n placeholder: 'Изабери',\n noData: 'Нема података',\n },\n pagination: {\n goto: 'Иди на',\n pagesize: '/страни',\n total: 'Укупно {total}',\n pageClassifier: '',\n page: 'Страна',\n prev: 'Иди на претходну страну',\n next: 'Иди на следећу страну',\n currentPage: 'страна {pager}',\n prevPages: 'Previous {pager} pages', // to be translated\n nextPages: 'Next {pager} pages', // to be translated\n },\n messagebox: {\n title: 'Порука',\n confirm: 'OK',\n cancel: 'Откажи',\n error: 'Неисправан унос',\n },\n upload: {\n deleteTip: 'притисни БРИШИ да обришеш',\n delete: 'Бриши',\n preview: 'Види',\n continue: 'Настави',\n },\n table: {\n emptyText: 'Нема података',\n confirmFilter: 'Потврди',\n resetFilter: 'Ресетуј',\n clearFilter: 'Све',\n sumText: 'Збир',\n },\n tree: {\n emptyText: 'Нема података',\n },\n transfer: {\n noMatch: 'Нема резултата',\n noData: 'Нема података',\n titles: ['Листа 1', 'Листа 2'], // to be translated\n filterPlaceholder: 'Унеси кључну реч',\n noCheckedFormat: '{total} ставки',\n hasCheckedFormat: '{checked}/{total} обележених',\n },\n image: {\n error: 'НЕУСПЕШНО',\n },\n pageHeader: {\n title: 'Назад',\n },\n popconfirm: {\n confirmButtonText: 'Да',\n cancelButtonText: 'Не',\n },\n },\n}\n"],"names":[],"mappings":"AAAA,SAAe;AACf,EAAE,IAAI,EAAE,IAAI;AACZ,EAAE,EAAE,EAAE;AACN,IAAI,WAAW,EAAE;AACjB,MAAM,OAAO,EAAE,IAAI;AACnB,MAAM,KAAK,EAAE,4CAA4C;AACzD,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,MAAM,GAAG,EAAE,0BAA0B;AACrC,MAAM,KAAK,EAAE,gCAAgC;AAC7C,MAAM,MAAM,EAAE,sCAAsC;AACpD,MAAM,KAAK,EAAE,gCAAgC;AAC7C,MAAM,OAAO,EAAE,IAAI;AACnB,MAAM,UAAU,EAAE,2EAA2E;AAC7F,MAAM,UAAU,EAAE,2EAA2E;AAC7F,MAAM,SAAS,EAAE,2EAA2E;AAC5F,MAAM,SAAS,EAAE,2EAA2E;AAC5F,MAAM,OAAO,EAAE,uFAAuF;AACtG,MAAM,OAAO,EAAE,uFAAuF;AACtG,MAAM,QAAQ,EAAE,6FAA6F;AAC7G,MAAM,QAAQ,EAAE,iFAAiF;AACjG,MAAM,SAAS,EAAE,uFAAuF;AACxG,MAAM,SAAS,EAAE,2EAA2E;AAC5F,MAAM,IAAI,EAAE,sCAAsC;AAClD,MAAM,MAAM,EAAE,sCAAsC;AACpD,MAAM,MAAM,EAAE,4CAA4C;AAC1D,MAAM,MAAM,EAAE,0BAA0B;AACxC,MAAM,MAAM,EAAE,gCAAgC;AAC9C,MAAM,MAAM,EAAE,oBA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,MAAM,eAAe,EAAE,8CAA8C;AACrE,MAAM,gBAAgB,EAAE,gFAAgF;AACxG,KAAK;AACL,IAAI,KAAK,EAAE;AACX,MAAM,KAAK,EAAE,wDAAwD;AACrE,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,MAAM,KAAK,EAAE,gCAAgC;AAC7C,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,MAAM,iBAAiB,EAAE,cAAc;AACvC,MAAM,gBAAgB,EAAE,cAAc;AACtC,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.3.
|
|
1
|
+
export declare const version = "2.3.7";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.3.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.3.7'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-backtop.js","sources":["../../../../../../packages/components/backtop/src/use-backtop.ts"],"sourcesContent":["import { onMounted, ref, shallowRef } from 'vue'\nimport { useEventListener, useThrottleFn } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport type { SetupContext } from 'vue'\nimport type { BacktopEmits, BacktopProps } from './backtop'\n\nexport const useBackTop = (\n props: BacktopProps,\n emit: SetupContext<BacktopEmits>['emit'],\n componentName: string\n) => {\n const el = shallowRef<HTMLElement>()\n const container = shallowRef<Document | HTMLElement>()\n const visible = ref(false)\n\n const handleScroll = () => {\n if (el.value) visible.value = el.value.scrollTop >= props.visibilityHeight\n }\n\n const handleClick = (event: MouseEvent) => {\n el.value?.scrollTo({ top: 0, behavior: 'smooth' })\n emit('click', event)\n }\n\n const handleScrollThrottled = useThrottleFn(handleScroll, 300, true)\n\n useEventListener(container, 'scroll', handleScrollThrottled)\n onMounted(() => {\n container.value = document\n el.value = document.documentElement\n\n if (props.target) {\n el.value = document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!el.value) {\n throwError(componentName, `target does not exist: ${props.target}`)\n }\n container.value = el.value\n }\n })\n\n return {\n visible,\n handleClick,\n }\n}\n"],"names":["shallowRef","ref","useThrottleFn","useEventListener","onMounted","throwError"],"mappings":";;;;;;;;;AAGY,MAAC,UAAU,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,KAAK;AAC1D,EAAE,MAAM,EAAE,GAAGA,cAAU,EAAE,CAAC;AAC1B,EAAE,MAAM,SAAS,GAAGA,cAAU,EAAE,CAAC;AACjC,EAAE,MAAM,OAAO,GAAGC,OAAG,CAAC,KAAK,CAAC,CAAC;AAC7B,EAAE,MAAM,YAAY,GAAG,MAAM;AAC7B,IAAI,IAAI,EAAE,CAAC,KAAK;AAChB,MAAM,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,gBAAgB,CAAC;AACnE,GAAG,CAAC;AACJ,EAAE,MAAM,WAAW,GAAG,CAAC,KAAK,KAAK;AACjC,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;AACnF,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACzB,GAAG,CAAC;AACJ,EAAE,MAAM,qBAAqB,GAAGC,kBAAa,CAAC,YAAY,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACvE,EAAEC,qBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,qBAAqB,CAAC,CAAC;AAC/D,EAAEC,aAAS,CAAC,MAAM;AAClB,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,SAAS,CAAC,KAAK,GAAG,QAAQ,CAAC;AAC/B,IAAI,EAAE,CAAC,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC;AACxC,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE;AACtB,MAAM,EAAE,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AACnF,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;AACrB,QAAQC,gBAAU,CAAC,aAAa,EAAE,CAAC,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC5E,OAAO;AACP,MAAM,SAAS,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;AACjC,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"use-backtop.js","sources":["../../../../../../packages/components/backtop/src/use-backtop.ts"],"sourcesContent":["import { onMounted, ref, shallowRef } from 'vue'\nimport { useEventListener, useThrottleFn } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport type { SetupContext } from 'vue'\nimport type { BacktopEmits, BacktopProps } from './backtop'\n\nexport const useBackTop = (\n props: BacktopProps,\n emit: SetupContext<BacktopEmits>['emit'],\n componentName: string\n) => {\n const el = shallowRef<HTMLElement>()\n const container = shallowRef<Document | HTMLElement>()\n const visible = ref(false)\n\n const handleScroll = () => {\n if (el.value) visible.value = el.value.scrollTop >= props.visibilityHeight\n }\n\n const handleClick = (event: MouseEvent) => {\n el.value?.scrollTo({ top: 0, behavior: 'smooth' })\n emit('click', event)\n }\n\n const handleScrollThrottled = useThrottleFn(handleScroll, 300, true)\n\n useEventListener(container, 'scroll', handleScrollThrottled)\n onMounted(() => {\n container.value = document\n el.value = document.documentElement\n\n if (props.target) {\n el.value = document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!el.value) {\n throwError(componentName, `target does not exist: ${props.target}`)\n }\n container.value = el.value\n }\n // Give visible an initial value, fix #13066\n handleScroll()\n })\n\n return {\n visible,\n handleClick,\n }\n}\n"],"names":["shallowRef","ref","useThrottleFn","useEventListener","onMounted","throwError"],"mappings":";;;;;;;;;AAGY,MAAC,UAAU,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,KAAK;AAC1D,EAAE,MAAM,EAAE,GAAGA,cAAU,EAAE,CAAC;AAC1B,EAAE,MAAM,SAAS,GAAGA,cAAU,EAAE,CAAC;AACjC,EAAE,MAAM,OAAO,GAAGC,OAAG,CAAC,KAAK,CAAC,CAAC;AAC7B,EAAE,MAAM,YAAY,GAAG,MAAM;AAC7B,IAAI,IAAI,EAAE,CAAC,KAAK;AAChB,MAAM,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,gBAAgB,CAAC;AACnE,GAAG,CAAC;AACJ,EAAE,MAAM,WAAW,GAAG,CAAC,KAAK,KAAK;AACjC,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;AACnF,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACzB,GAAG,CAAC;AACJ,EAAE,MAAM,qBAAqB,GAAGC,kBAAa,CAAC,YAAY,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACvE,EAAEC,qBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,qBAAqB,CAAC,CAAC;AAC/D,EAAEC,aAAS,CAAC,MAAM;AAClB,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,SAAS,CAAC,KAAK,GAAG,QAAQ,CAAC;AAC/B,IAAI,EAAE,CAAC,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC;AACxC,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE;AACtB,MAAM,EAAE,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AACnF,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;AACrB,QAAQC,gBAAU,CAAC,aAAa,EAAE,CAAC,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC5E,OAAO;AACP,MAAM,SAAS,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;AACjC,KAAK;AACL,IAAI,YAAY,EAAE,CAAC;AACnB,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -524,4 +524,4 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
524
524
|
}, {}>> & Record<string, any>;
|
|
525
525
|
export default ElCalendar;
|
|
526
526
|
export * from './src/calendar';
|
|
527
|
-
export type { CalendarDateTableInstance, DateTableInstance, } from './src/instance';
|
|
527
|
+
export type { CalendarDateTableInstance, DateTableInstance, CalendarInstance, } from './src/instance';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../packages/components/calendar/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Calendar from './src/calendar.vue'\n\nexport const ElCalendar = withInstall(Calendar)\nexport default ElCalendar\n\nexport * from './src/calendar'\nexport type {\n CalendarDateTableInstance,\n DateTableInstance,\n} from './src/instance'\n"],"names":["withInstall","Calendar"],"mappings":";;;;;;;;;AAEY,MAAC,UAAU,GAAGA,mBAAW,CAACC,qBAAQ;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/calendar/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Calendar from './src/calendar.vue'\n\nexport const ElCalendar = withInstall(Calendar)\nexport default ElCalendar\n\nexport * from './src/calendar'\nexport type {\n CalendarDateTableInstance,\n DateTableInstance,\n CalendarInstance,\n} from './src/instance'\n"],"names":["withInstall","Calendar"],"mappings":";;;;;;;;;AAEY,MAAC,UAAU,GAAGA,mBAAW,CAACC,qBAAQ;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-content.js","sources":["../../../../../../packages/components/dialog/src/dialog-content.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nexport const dialogContentProps = buildProps({\n center: {\n type: Boolean,\n default: false,\n },\n alignCenter: {\n type: Boolean,\n default: false,\n },\n closeIcon: {\n type: iconPropType,\n },\n customClass: {\n type: String,\n default: '',\n },\n draggable: {\n type: Boolean,\n default: false,\n },\n fullscreen: {\n type: Boolean,\n default: false,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n title: {\n type: String,\n default: '',\n },\n} as const)\n\nexport const dialogContentEmits = {\n close: () => true,\n}\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;;AACY,MAAC,kBAAkB,GAAGA,kBAAU,CAAC;AAC7C,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;;"}
|
|
1
|
+
{"version":3,"file":"dialog-content.js","sources":["../../../../../../packages/components/dialog/src/dialog-content.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nexport const dialogContentProps = buildProps({\n center: {\n type: Boolean,\n default: false,\n },\n alignCenter: {\n type: Boolean,\n default: false,\n },\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @deprecated will be removed in version 2.4.0, please use class\n */\n customClass: {\n type: String,\n default: '',\n },\n draggable: {\n type: Boolean,\n default: false,\n },\n fullscreen: {\n type: Boolean,\n default: false,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n title: {\n type: String,\n default: '',\n },\n} as const)\n\nexport const dialogContentEmits = {\n close: () => true,\n}\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;;AACY,MAAC,kBAAkB,GAAGA,kBAAU,CAAC;AAC7C,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;;"}
|
|
@@ -17,7 +17,7 @@ export declare const ElForm: import("element-plus/es/utils").SFCWithInstall<impo
|
|
|
17
17
|
readonly statusIcon: BooleanConstructor;
|
|
18
18
|
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
19
19
|
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
20
|
-
readonly hideRequiredAsterisk:
|
|
20
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
21
21
|
readonly scrollToError: BooleanConstructor;
|
|
22
22
|
readonly scrollIntoViewOptions: {
|
|
23
23
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
@@ -51,7 +51,7 @@ export declare const ElForm: import("element-plus/es/utils").SFCWithInstall<impo
|
|
|
51
51
|
readonly statusIcon: BooleanConstructor;
|
|
52
52
|
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
53
53
|
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
54
|
-
readonly hideRequiredAsterisk:
|
|
54
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
55
55
|
readonly scrollToError: BooleanConstructor;
|
|
56
56
|
readonly scrollIntoViewOptions: {
|
|
57
57
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
@@ -122,7 +122,7 @@ export declare const ElForm: import("element-plus/es/utils").SFCWithInstall<impo
|
|
|
122
122
|
readonly statusIcon: BooleanConstructor;
|
|
123
123
|
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
124
124
|
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
125
|
-
readonly hideRequiredAsterisk:
|
|
125
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
126
126
|
readonly scrollToError: BooleanConstructor;
|
|
127
127
|
readonly scrollIntoViewOptions: {
|
|
128
128
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
@@ -147,10 +147,10 @@ export declare const ElForm: import("element-plus/es/utils").SFCWithInstall<impo
|
|
|
147
147
|
readonly labelSuffix: string;
|
|
148
148
|
readonly showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
149
149
|
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
150
|
-
readonly hideRequiredAsterisk: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
151
150
|
readonly inline: boolean;
|
|
152
151
|
readonly inlineMessage: boolean;
|
|
153
152
|
readonly statusIcon: boolean;
|
|
153
|
+
readonly hideRequiredAsterisk: boolean;
|
|
154
154
|
readonly scrollToError: boolean;
|
|
155
155
|
}>> & {
|
|
156
156
|
FormItem: import("vue").DefineComponent<{
|
|
@@ -26,7 +26,7 @@ export declare const formProps: {
|
|
|
26
26
|
readonly statusIcon: BooleanConstructor;
|
|
27
27
|
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
28
28
|
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
29
|
-
readonly hideRequiredAsterisk:
|
|
29
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
30
30
|
readonly scrollToError: BooleanConstructor;
|
|
31
31
|
readonly scrollIntoViewOptions: {
|
|
32
32
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
@@ -51,10 +51,7 @@ const formProps = runtime.buildProps({
|
|
|
51
51
|
type: Boolean,
|
|
52
52
|
default: true
|
|
53
53
|
},
|
|
54
|
-
hideRequiredAsterisk:
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: false
|
|
57
|
-
},
|
|
54
|
+
hideRequiredAsterisk: Boolean,
|
|
58
55
|
scrollToError: Boolean,
|
|
59
56
|
scrollIntoViewOptions: {
|
|
60
57
|
type: [Object, Boolean]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nconst formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType<FormRules>(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk:
|
|
1
|
+
{"version":3,"file":"form.js","sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nconst formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType<FormRules>(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: [Object, Boolean],\n },\n} as const)\nexport type FormProps = ExtractPropTypes<typeof formProps>\nexport type FormMetaProps = ExtractPropTypes<typeof formMetaProps>\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n"],"names":["buildProps","componentSizes","definePropType","isArray","isString","isBoolean"],"mappings":";;;;;;;;;;;AAQA,MAAM,aAAa,GAAGA,kB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AE;AACzB,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC3B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,CAACC,cAAO,CAAC,IAAI,CAAC,IAAIC,eAAQ,CAAC,IAAI,CAAC,KAAKC,eAAS,CAAC,OAAO,CAAC,IAAID,eAAQ,CAAC,OAAO,CAAC;AACpH;;;;;"}
|
|
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
readonly statusIcon: BooleanConstructor;
|
|
19
19
|
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
20
20
|
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
21
|
-
readonly hideRequiredAsterisk:
|
|
21
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
22
22
|
readonly scrollToError: BooleanConstructor;
|
|
23
23
|
readonly scrollIntoViewOptions: {
|
|
24
24
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
@@ -52,7 +52,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
52
|
readonly statusIcon: BooleanConstructor;
|
|
53
53
|
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
54
54
|
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
55
|
-
readonly hideRequiredAsterisk:
|
|
55
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
56
56
|
readonly scrollToError: BooleanConstructor;
|
|
57
57
|
readonly scrollIntoViewOptions: {
|
|
58
58
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
@@ -123,7 +123,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
123
123
|
readonly statusIcon: BooleanConstructor;
|
|
124
124
|
readonly showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
125
125
|
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
126
|
-
readonly hideRequiredAsterisk:
|
|
126
|
+
readonly hideRequiredAsterisk: BooleanConstructor;
|
|
127
127
|
readonly scrollToError: BooleanConstructor;
|
|
128
128
|
readonly scrollIntoViewOptions: {
|
|
129
129
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
|
|
@@ -148,10 +148,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
148
148
|
readonly labelSuffix: string;
|
|
149
149
|
readonly showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
150
150
|
readonly validateOnRuleChange: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
151
|
-
readonly hideRequiredAsterisk: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
152
151
|
readonly inline: boolean;
|
|
153
152
|
readonly inlineMessage: boolean;
|
|
154
153
|
readonly statusIcon: boolean;
|
|
154
|
+
readonly hideRequiredAsterisk: boolean;
|
|
155
155
|
readonly scrollToError: boolean;
|
|
156
156
|
}>;
|
|
157
157
|
export default _default;
|
|
@@ -2,6 +2,7 @@ import type { SetupContext, UnwrapRef } from 'vue';
|
|
|
2
2
|
import type { RuleItem, ValidateError, ValidateFieldsError } from 'async-validator';
|
|
3
3
|
import type { ComponentSize } from 'element-plus/es/constants';
|
|
4
4
|
import type { Arrayable } from 'element-plus/es/utils';
|
|
5
|
+
import type { MaybeRef } from '@vueuse/core';
|
|
5
6
|
import type { FormItemProp, FormItemProps, FormItemValidateState } from './form-item';
|
|
6
7
|
import type { FormEmits, FormProps } from './form';
|
|
7
8
|
import type { useFormLabelWidth } from './utils';
|
|
@@ -9,7 +10,66 @@ export declare type FormLabelWidthContext = ReturnType<typeof useFormLabelWidth>
|
|
|
9
10
|
export interface FormItemRule extends RuleItem {
|
|
10
11
|
trigger?: Arrayable<string>;
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
declare type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
14
|
+
/**
|
|
15
|
+
* Check whether it is tuple
|
|
16
|
+
*
|
|
17
|
+
* 检查是否为元组
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* IsTuple<[1, 2, 3]> => true
|
|
21
|
+
* IsTuple<Array[number]> => false
|
|
22
|
+
*/
|
|
23
|
+
declare type IsTuple<T extends ReadonlyArray<any>> = number extends T['length'] ? false : true;
|
|
24
|
+
/**
|
|
25
|
+
* Array method key
|
|
26
|
+
*
|
|
27
|
+
* 数组方法键
|
|
28
|
+
*/
|
|
29
|
+
declare type ArrayMethodKey = keyof any[];
|
|
30
|
+
/**
|
|
31
|
+
* Tuple index key
|
|
32
|
+
*
|
|
33
|
+
* 元组下标键
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* TupleKey<[1, 2, 3]> => '0' | '1' | '2'
|
|
37
|
+
*/
|
|
38
|
+
declare type TupleKey<T extends ReadonlyArray<any>> = Exclude<keyof T, ArrayMethodKey>;
|
|
39
|
+
/**
|
|
40
|
+
* Array index key
|
|
41
|
+
*
|
|
42
|
+
* 数组下标键
|
|
43
|
+
*/
|
|
44
|
+
declare type ArrayKey = number;
|
|
45
|
+
/**
|
|
46
|
+
* Helper type for recursively constructing paths through a type
|
|
47
|
+
*
|
|
48
|
+
* 用于通过一个类型递归构建路径的辅助类型
|
|
49
|
+
*/
|
|
50
|
+
declare type PathImpl<K extends string | number, V> = V extends Primitive ? `${K}` : `${K}` | `${K}.${Path<V>}`;
|
|
51
|
+
/**
|
|
52
|
+
* Type which collects all paths through a type
|
|
53
|
+
*
|
|
54
|
+
* 通过一个类型收集所有路径的类型
|
|
55
|
+
*
|
|
56
|
+
* @see {@link FieldPath}
|
|
57
|
+
*/
|
|
58
|
+
declare type Path<T> = T extends ReadonlyArray<infer V> ? IsTuple<T> extends true ? {
|
|
59
|
+
[K in TupleKey<T>]-?: PathImpl<Exclude<K, symbol>, T[K]>;
|
|
60
|
+
}[TupleKey<T>] : PathImpl<ArrayKey, V> : {
|
|
61
|
+
[K in keyof T]-?: PathImpl<Exclude<K, symbol>, T[K]>;
|
|
62
|
+
}[keyof T];
|
|
63
|
+
/**
|
|
64
|
+
* Type which collects all paths through a type
|
|
65
|
+
*
|
|
66
|
+
* 通过一个类型收集所有路径的类型
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* FieldPath<{ 1: number; a: number; b: string; c: { d: number; e: string }; f: [{ value: string }]; g: { value: string }[] }> => '1' | 'a' | 'b' | 'c' | 'f' | 'g' | 'c.d' | 'c.e' | 'f.0' | 'f.0.value' | 'g.number' | 'g.number.value'
|
|
70
|
+
*/
|
|
71
|
+
declare type FieldPath<T> = T extends object ? Path<T> : never;
|
|
72
|
+
export declare type FormRules<T extends MaybeRef<Record<string, any> | string> = string> = Partial<Record<UnwrapRef<T> extends string ? UnwrapRef<T> : FieldPath<UnwrapRef<T>>, Arrayable<FormItemRule>>>;
|
|
13
73
|
export declare type FormValidationResult = Promise<boolean>;
|
|
14
74
|
export declare type FormValidateCallback = (isValid: boolean, invalidFields?: ValidateFieldsError) => void;
|
|
15
75
|
export interface FormValidateFailure {
|
|
@@ -38,3 +98,4 @@ export interface FormItemContext extends FormItemProps {
|
|
|
38
98
|
resetField(): void;
|
|
39
99
|
clearValidate(): void;
|
|
40
100
|
}
|
|
101
|
+
export {};
|