@element-plus/nightly 0.0.20250712 → 0.0.20250714
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.full.js +29 -19
- package/dist/index.full.min.js +9 -9
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +29 -19
- 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/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.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/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.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/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.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-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.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/autocomplete/src/autocomplete.mjs +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +134 -16
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +16 -134
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/date-table.mjs +31 -89
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +89 -31
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +3 -3
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +44 -399
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +399 -44
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form.mjs +161 -54
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +54 -161
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/index.mjs +14 -14
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +71 -25
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +25 -71
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +140 -73
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +73 -140
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/pagination/src/components/total.mjs +26 -6
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +6 -26
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/arrow.mjs +30 -7
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +7 -30
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/popper/src/content.mjs +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +34 -65
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +65 -34
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +187 -53
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +53 -187
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/src/option2.mjs +4 -4
- package/es/components/select/src/option2.mjs.map +1 -1
- package/es/components/select/src/select.d.ts +12 -2
- package/es/components/select/src/select.mjs +8 -4
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +24 -4
- package/es/components/select-v2/src/defaults.d.ts +12 -2
- package/es/components/select-v2/src/defaults.mjs +7 -3
- package/es/components/select-v2/src/defaults.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +24 -4
- package/es/components/table/src/filter-panel.mjs +1 -1
- package/es/components/tooltip/index.mjs +3 -3
- package/es/components/tooltip/src/content.mjs +29 -196
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs +198 -29
- package/es/components/tooltip/src/content2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +30 -169
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +169 -30
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/content.mjs +110 -48
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +48 -110
- package/es/components/tooltip-v2/src/content2.mjs.map +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/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +154 -69
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +69 -154
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +130 -19
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +19 -130
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/components/upload/index.mjs +2 -2
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-dragger.mjs +61 -8
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +8 -61
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/components/upload/src/upload-list.mjs +173 -25
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +25 -173
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/index.d.ts +72 -12
- package/es/index.mjs +14 -14
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.js +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +134 -17
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +17 -134
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/date-table.js +35 -89
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +89 -35
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +2 -2
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +45 -398
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +398 -45
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form.js +160 -55
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form2.js +55 -160
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/index.js +14 -14
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +71 -26
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +26 -71
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +139 -74
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +74 -139
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/pagination/src/components/total.js +26 -6
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +6 -26
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/arrow.js +30 -8
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +8 -30
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/popper/src/content.js +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +35 -65
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +65 -35
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +187 -54
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +54 -187
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/src/option2.js +4 -4
- package/lib/components/select/src/option2.js.map +1 -1
- package/lib/components/select/src/select.d.ts +12 -2
- package/lib/components/select/src/select.js +8 -4
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +24 -4
- package/lib/components/select-v2/src/defaults.d.ts +12 -2
- package/lib/components/select-v2/src/defaults.js +7 -3
- package/lib/components/select-v2/src/defaults.js.map +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +24 -4
- package/lib/components/table/src/filter-panel.js +1 -1
- package/lib/components/tooltip/index.js +3 -3
- package/lib/components/tooltip/src/content.js +29 -196
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content2.js +198 -29
- package/lib/components/tooltip/src/content2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +32 -167
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +167 -32
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/content.js +110 -48
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +48 -110
- package/lib/components/tooltip-v2/src/content2.js.map +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/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +153 -69
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +69 -153
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +130 -21
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +21 -130
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-dragger.js +61 -9
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +9 -61
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/components/upload/src/upload-list.js +173 -26
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +26 -173
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/index.d.ts +72 -12
- package/lib/index.js +14 -14
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/web-types.json +1 -1
@@ -1,60 +1,167 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
1
|
+
import { defineComponent, ref, reactive, computed, watch, provide, toRefs, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
|
2
|
+
import { formContextKey } from './constants.mjs';
|
3
|
+
import { formProps, formEmits } from './form2.mjs';
|
4
|
+
import { useFormLabelWidth, filterFields } from './utils.mjs';
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
+
import { useFormSize } from './hooks/use-form-common-props.mjs';
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
8
|
+
import { debugWarn } from '../../../utils/error.mjs';
|
9
|
+
import { isFunction } from '@vue/shared';
|
5
10
|
|
6
|
-
const
|
7
|
-
|
8
|
-
|
9
|
-
values: componentSizes
|
10
|
-
},
|
11
|
-
disabled: Boolean
|
11
|
+
const COMPONENT_NAME = "ElForm";
|
12
|
+
const __default__ = defineComponent({
|
13
|
+
name: COMPONENT_NAME
|
12
14
|
});
|
13
|
-
const
|
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
|
-
|
15
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
16
|
+
...__default__,
|
17
|
+
props: formProps,
|
18
|
+
emits: formEmits,
|
19
|
+
setup(__props, { expose, emit }) {
|
20
|
+
const props = __props;
|
21
|
+
const formRef = ref();
|
22
|
+
const fields = reactive([]);
|
23
|
+
const formSize = useFormSize();
|
24
|
+
const ns = useNamespace("form");
|
25
|
+
const formClasses = computed(() => {
|
26
|
+
const { labelPosition, inline } = props;
|
27
|
+
return [
|
28
|
+
ns.b(),
|
29
|
+
ns.m(formSize.value || "default"),
|
30
|
+
{
|
31
|
+
[ns.m(`label-${labelPosition}`)]: labelPosition,
|
32
|
+
[ns.m("inline")]: inline
|
33
|
+
}
|
34
|
+
];
|
35
|
+
});
|
36
|
+
const getField = (prop) => {
|
37
|
+
return filterFields(fields, [prop])[0];
|
38
|
+
};
|
39
|
+
const addField = (field) => {
|
40
|
+
fields.push(field);
|
41
|
+
};
|
42
|
+
const removeField = (field) => {
|
43
|
+
if (field.prop) {
|
44
|
+
fields.splice(fields.indexOf(field), 1);
|
45
|
+
}
|
46
|
+
};
|
47
|
+
const resetFields = (properties = []) => {
|
48
|
+
if (!props.model) {
|
49
|
+
debugWarn(COMPONENT_NAME, "model is required for resetFields to work.");
|
50
|
+
return;
|
51
|
+
}
|
52
|
+
filterFields(fields, properties).forEach((field) => field.resetField());
|
53
|
+
};
|
54
|
+
const clearValidate = (props2 = []) => {
|
55
|
+
filterFields(fields, props2).forEach((field) => field.clearValidate());
|
56
|
+
};
|
57
|
+
const isValidatable = computed(() => {
|
58
|
+
const hasModel = !!props.model;
|
59
|
+
if (!hasModel) {
|
60
|
+
debugWarn(COMPONENT_NAME, "model is required for validate to work.");
|
61
|
+
}
|
62
|
+
return hasModel;
|
63
|
+
});
|
64
|
+
const obtainValidateFields = (props2) => {
|
65
|
+
if (fields.length === 0)
|
66
|
+
return [];
|
67
|
+
const filteredFields = filterFields(fields, props2);
|
68
|
+
if (!filteredFields.length) {
|
69
|
+
debugWarn(COMPONENT_NAME, "please pass correct props!");
|
70
|
+
return [];
|
71
|
+
}
|
72
|
+
return filteredFields;
|
73
|
+
};
|
74
|
+
const validate = async (callback) => validateField(void 0, callback);
|
75
|
+
const doValidateField = async (props2 = []) => {
|
76
|
+
if (!isValidatable.value)
|
77
|
+
return false;
|
78
|
+
const fields2 = obtainValidateFields(props2);
|
79
|
+
if (fields2.length === 0)
|
80
|
+
return true;
|
81
|
+
let validationErrors = {};
|
82
|
+
for (const field of fields2) {
|
83
|
+
try {
|
84
|
+
await field.validate("");
|
85
|
+
if (field.validateState === "error")
|
86
|
+
field.resetField();
|
87
|
+
} catch (fields3) {
|
88
|
+
validationErrors = {
|
89
|
+
...validationErrors,
|
90
|
+
...fields3
|
91
|
+
};
|
92
|
+
}
|
93
|
+
}
|
94
|
+
if (Object.keys(validationErrors).length === 0)
|
95
|
+
return true;
|
96
|
+
return Promise.reject(validationErrors);
|
97
|
+
};
|
98
|
+
const validateField = async (modelProps = [], callback) => {
|
99
|
+
let result = false;
|
100
|
+
const shouldThrow = !isFunction(callback);
|
101
|
+
try {
|
102
|
+
result = await doValidateField(modelProps);
|
103
|
+
if (result === true) {
|
104
|
+
await (callback == null ? void 0 : callback(result));
|
105
|
+
}
|
106
|
+
return result;
|
107
|
+
} catch (e) {
|
108
|
+
if (e instanceof Error)
|
109
|
+
throw e;
|
110
|
+
const invalidFields = e;
|
111
|
+
if (props.scrollToError) {
|
112
|
+
if (formRef.value) {
|
113
|
+
const formItem = formRef.value.querySelector(`.${ns.b()}-item.is-error`);
|
114
|
+
formItem == null ? void 0 : formItem.scrollIntoView(props.scrollIntoViewOptions);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
!result && await (callback == null ? void 0 : callback(false, invalidFields));
|
118
|
+
return shouldThrow && Promise.reject(invalidFields);
|
119
|
+
}
|
120
|
+
};
|
121
|
+
const scrollToField = (prop) => {
|
122
|
+
var _a;
|
123
|
+
const field = getField(prop);
|
124
|
+
if (field) {
|
125
|
+
(_a = field.$el) == null ? void 0 : _a.scrollIntoView(props.scrollIntoViewOptions);
|
126
|
+
}
|
127
|
+
};
|
128
|
+
watch(() => props.rules, () => {
|
129
|
+
if (props.validateOnRuleChange) {
|
130
|
+
validate().catch((err) => debugWarn(err));
|
131
|
+
}
|
132
|
+
}, { deep: true, flush: "post" });
|
133
|
+
provide(formContextKey, reactive({
|
134
|
+
...toRefs(props),
|
135
|
+
emit,
|
136
|
+
resetFields,
|
137
|
+
clearValidate,
|
138
|
+
validateField,
|
139
|
+
getField,
|
140
|
+
addField,
|
141
|
+
removeField,
|
142
|
+
...useFormLabelWidth()
|
143
|
+
}));
|
144
|
+
expose({
|
145
|
+
validate,
|
146
|
+
validateField,
|
147
|
+
resetFields,
|
148
|
+
clearValidate,
|
149
|
+
scrollToField,
|
150
|
+
getField,
|
151
|
+
fields
|
152
|
+
});
|
153
|
+
return (_ctx, _cache) => {
|
154
|
+
return openBlock(), createElementBlock("form", {
|
155
|
+
ref_key: "formRef",
|
156
|
+
ref: formRef,
|
157
|
+
class: normalizeClass(unref(formClasses))
|
158
|
+
}, [
|
159
|
+
renderSlot(_ctx.$slots, "default")
|
160
|
+
], 2);
|
161
|
+
};
|
53
162
|
}
|
54
163
|
});
|
55
|
-
|
56
|
-
validate: (prop, isValid, message) => (isArray(prop) || isString(prop)) && isBoolean(isValid) && isString(message)
|
57
|
-
};
|
164
|
+
var Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "form.vue"]]);
|
58
165
|
|
59
|
-
export {
|
166
|
+
export { Form as default };
|
60
167
|
//# sourceMappingURL=form.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"form.mjs","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, __ExtractPublicPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nexport const 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 default: true,\n },\n} as const)\nexport type FormProps = ExtractPropTypes<typeof formProps>\nexport type FormPropsPublic = __ExtractPublicPropTypes<typeof formProps>\n\nexport type FormMetaProps = ExtractPropTypes<typeof formMetaProps>\nexport type FormMetaPropsPublic = __ExtractPublicPropTypes<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":[],"mappings":";;;;;AAQY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,cAAc;AAC1B,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC,EAAE;AACS,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,GAAG,aAAa;AAClB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;AACpC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,uBAAuB,EAAE;AAC3B,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC7B,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,oBAAoB,EAAE;AACxB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,oBAAoB,EAAE,OAAO;AAC/B,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,qBAAqB,EAAE;AACzB,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC3B,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC;AACpH;;;;"}
|
1
|
+
{"version":3,"file":"form.mjs","sources":["../../../../../../packages/components/form/src/form.vue"],"sourcesContent":["<template>\n <form ref=\"formRef\" :class=\"formClasses\">\n <slot />\n </form>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, reactive, ref, toRefs, watch } from 'vue'\nimport { debugWarn, isFunction } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from './hooks'\nimport { formContextKey } from './constants'\nimport { formEmits, formProps } from './form'\nimport { filterFields, useFormLabelWidth } from './utils'\n\nimport type { ValidateFieldsError } from 'async-validator'\nimport type { Arrayable } from '@element-plus/utils'\nimport type {\n FormContext,\n FormItemContext,\n FormValidateCallback,\n FormValidationResult,\n} from './types'\nimport type { FormItemProp } from './form-item'\n\nconst COMPONENT_NAME = 'ElForm'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(formProps)\nconst emit = defineEmits(formEmits)\n\nconst formRef = ref<HTMLElement>()\nconst fields = reactive<FormItemContext[]>([])\n\nconst formSize = useFormSize()\nconst ns = useNamespace('form')\nconst formClasses = computed(() => {\n const { labelPosition, inline } = props\n return [\n ns.b(),\n ns.m(formSize.value || 'default'),\n {\n [ns.m(`label-${labelPosition}`)]: labelPosition,\n [ns.m('inline')]: inline,\n },\n ]\n})\n\nconst getField: FormContext['getField'] = (prop) => {\n return filterFields(fields, [prop])[0]\n}\n\nconst addField: FormContext['addField'] = (field) => {\n fields.push(field)\n}\n\nconst removeField: FormContext['removeField'] = (field) => {\n if (field.prop) {\n fields.splice(fields.indexOf(field), 1)\n }\n}\n\nconst resetFields: FormContext['resetFields'] = (properties = []) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for resetFields to work.')\n return\n }\n filterFields(fields, properties).forEach((field) => field.resetField())\n}\n\nconst clearValidate: FormContext['clearValidate'] = (props = []) => {\n filterFields(fields, props).forEach((field) => field.clearValidate())\n}\n\nconst isValidatable = computed(() => {\n const hasModel = !!props.model\n if (!hasModel) {\n debugWarn(COMPONENT_NAME, 'model is required for validate to work.')\n }\n return hasModel\n})\n\nconst obtainValidateFields = (props: Arrayable<FormItemProp>) => {\n if (fields.length === 0) return []\n\n const filteredFields = filterFields(fields, props)\n if (!filteredFields.length) {\n debugWarn(COMPONENT_NAME, 'please pass correct props!')\n return []\n }\n return filteredFields\n}\n\nconst validate = async (\n callback?: FormValidateCallback\n): FormValidationResult => validateField(undefined, callback)\n\nconst doValidateField = async (\n props: Arrayable<FormItemProp> = []\n): Promise<boolean> => {\n if (!isValidatable.value) return false\n\n const fields = obtainValidateFields(props)\n if (fields.length === 0) return true\n\n let validationErrors: ValidateFieldsError = {}\n for (const field of fields) {\n try {\n await field.validate('')\n if (field.validateState === 'error') field.resetField()\n } catch (fields) {\n validationErrors = {\n ...validationErrors,\n ...(fields as ValidateFieldsError),\n }\n }\n }\n\n if (Object.keys(validationErrors).length === 0) return true\n return Promise.reject(validationErrors)\n}\n\nconst validateField: FormContext['validateField'] = async (\n modelProps = [],\n callback\n) => {\n let result = false\n const shouldThrow = !isFunction(callback)\n try {\n result = await doValidateField(modelProps)\n // When result is false meaning that the fields are not validatable\n if (result === true) {\n await callback?.(result)\n }\n return result\n } catch (e) {\n if (e instanceof Error) throw e\n\n const invalidFields = e as ValidateFieldsError\n\n if (props.scrollToError) {\n // form-item may be dynamically rendered based on the judgment conditions, and the order in invalidFields is uncertain.\n // Therefore, the first form field with an error is determined by directly looking for the rendered element.\n if (formRef.value) {\n const formItem = formRef.value!.querySelector(\n `.${ns.b()}-item.is-error`\n )\n formItem?.scrollIntoView(props.scrollIntoViewOptions)\n }\n }\n !result && (await callback?.(false, invalidFields))\n return shouldThrow && Promise.reject(invalidFields)\n }\n}\n\nconst scrollToField = (prop: FormItemProp) => {\n const field = getField(prop)\n if (field) {\n field.$el?.scrollIntoView(props.scrollIntoViewOptions)\n }\n}\n\nwatch(\n () => props.rules,\n () => {\n if (props.validateOnRuleChange) {\n validate().catch((err) => debugWarn(err))\n }\n },\n { deep: true, flush: 'post' }\n)\n\nprovide(\n formContextKey,\n reactive({\n ...toRefs(props),\n emit,\n\n resetFields,\n clearValidate,\n validateField,\n getField,\n addField,\n removeField,\n\n ...useFormLabelWidth(),\n })\n)\n\ndefineExpose({\n /**\n * @description Validate the whole form. Receives a callback or returns `Promise`.\n */\n validate,\n /**\n * @description Validate specified fields.\n */\n validateField,\n /**\n * @description Reset specified fields and remove validation result.\n */\n resetFields,\n /**\n * @description Clear validation message for specified fields.\n */\n clearValidate,\n /**\n * @description Scroll to the specified fields.\n */\n scrollToField,\n /**\n * @description Get a field context.\n */\n getField,\n /**\n * @description All fields context.\n */\n fields,\n})\n</script>\n"],"names":["props","fields","_openBlock","_createElementBlock","_normalizeClass","_unref","_renderSlot"],"mappings":";;;;;;;;;;;mCA0Bc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAIA,IAAA,MAAM,UAAU,GAAiB,EAAA,CAAA;AACjC,IAAM,MAAA,MAAA,GAAS,QAA4B,CAAA,EAAE,CAAA,CAAA;AAE7C,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAC9B,IAAM,MAAA,WAAA,GAAc,SAAS,MAAM;AACjC,MAAM,MAAA,EAAE,aAAe,EAAA,MAAA,EAAW,GAAA,KAAA,CAAA;AAClC,MAAO,OAAA;AAAA,QACL,GAAG,CAAE,EAAA;AAAA,QACL,EAAG,CAAA,CAAA,CAAE,QAAS,CAAA,KAAA,IAAS,SAAS,CAAA;AAAA,QAChC;AAAA,UACE,CAAC,EAAG,CAAA,CAAA,CAAE,SAAS,aAAa,CAAA,CAAE,CAAC,GAAG,aAAA;AAAA,UAClC,CAAC,EAAA,CAAG,CAAE,CAAA,QAAQ,CAAC,GAAG,MAAA;AAAA,SACpB;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,QAAA,GAAoC,CAAC,IAAS,KAAA;AAClD,MAAA,OAAO,aAAa,MAAQ,EAAA,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA,CAAA;AAA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AAA;AAAA,KAAA,CAAA;AAAA,GAIA;AAAA,CAAA,CAAA,CAAA;AAAA,WAAA,gBAAA,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,UAAA,CAAA,CAAA,CAAA;;;;"}
|
@@ -1,167 +1,60 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
-
import { useFormSize } from './hooks/use-form-common-props.mjs';
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
8
|
-
import { debugWarn } from '../../../utils/error.mjs';
|
9
|
-
import { isFunction } from '@vue/shared';
|
1
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
2
|
+
import { componentSizes } from '../../../constants/size.mjs';
|
3
|
+
import { isArray, isString } from '@vue/shared';
|
4
|
+
import { isBoolean } from '../../../utils/types.mjs';
|
10
5
|
|
11
|
-
const
|
12
|
-
|
13
|
-
|
6
|
+
const formMetaProps = buildProps({
|
7
|
+
size: {
|
8
|
+
type: String,
|
9
|
+
values: componentSizes
|
10
|
+
},
|
11
|
+
disabled: Boolean
|
14
12
|
});
|
15
|
-
const
|
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
|
-
filterFields(fields, props2).forEach((field) => field.clearValidate());
|
56
|
-
};
|
57
|
-
const isValidatable = computed(() => {
|
58
|
-
const hasModel = !!props.model;
|
59
|
-
if (!hasModel) {
|
60
|
-
debugWarn(COMPONENT_NAME, "model is required for validate to work.");
|
61
|
-
}
|
62
|
-
return hasModel;
|
63
|
-
});
|
64
|
-
const obtainValidateFields = (props2) => {
|
65
|
-
if (fields.length === 0)
|
66
|
-
return [];
|
67
|
-
const filteredFields = filterFields(fields, props2);
|
68
|
-
if (!filteredFields.length) {
|
69
|
-
debugWarn(COMPONENT_NAME, "please pass correct props!");
|
70
|
-
return [];
|
71
|
-
}
|
72
|
-
return filteredFields;
|
73
|
-
};
|
74
|
-
const validate = async (callback) => validateField(void 0, callback);
|
75
|
-
const doValidateField = async (props2 = []) => {
|
76
|
-
if (!isValidatable.value)
|
77
|
-
return false;
|
78
|
-
const fields2 = obtainValidateFields(props2);
|
79
|
-
if (fields2.length === 0)
|
80
|
-
return true;
|
81
|
-
let validationErrors = {};
|
82
|
-
for (const field of fields2) {
|
83
|
-
try {
|
84
|
-
await field.validate("");
|
85
|
-
if (field.validateState === "error")
|
86
|
-
field.resetField();
|
87
|
-
} catch (fields3) {
|
88
|
-
validationErrors = {
|
89
|
-
...validationErrors,
|
90
|
-
...fields3
|
91
|
-
};
|
92
|
-
}
|
93
|
-
}
|
94
|
-
if (Object.keys(validationErrors).length === 0)
|
95
|
-
return true;
|
96
|
-
return Promise.reject(validationErrors);
|
97
|
-
};
|
98
|
-
const validateField = async (modelProps = [], callback) => {
|
99
|
-
let result = false;
|
100
|
-
const shouldThrow = !isFunction(callback);
|
101
|
-
try {
|
102
|
-
result = await doValidateField(modelProps);
|
103
|
-
if (result === true) {
|
104
|
-
await (callback == null ? void 0 : callback(result));
|
105
|
-
}
|
106
|
-
return result;
|
107
|
-
} catch (e) {
|
108
|
-
if (e instanceof Error)
|
109
|
-
throw e;
|
110
|
-
const invalidFields = e;
|
111
|
-
if (props.scrollToError) {
|
112
|
-
if (formRef.value) {
|
113
|
-
const formItem = formRef.value.querySelector(`.${ns.b()}-item.is-error`);
|
114
|
-
formItem == null ? void 0 : formItem.scrollIntoView(props.scrollIntoViewOptions);
|
115
|
-
}
|
116
|
-
}
|
117
|
-
!result && await (callback == null ? void 0 : callback(false, invalidFields));
|
118
|
-
return shouldThrow && Promise.reject(invalidFields);
|
119
|
-
}
|
120
|
-
};
|
121
|
-
const scrollToField = (prop) => {
|
122
|
-
var _a;
|
123
|
-
const field = getField(prop);
|
124
|
-
if (field) {
|
125
|
-
(_a = field.$el) == null ? void 0 : _a.scrollIntoView(props.scrollIntoViewOptions);
|
126
|
-
}
|
127
|
-
};
|
128
|
-
watch(() => props.rules, () => {
|
129
|
-
if (props.validateOnRuleChange) {
|
130
|
-
validate().catch((err) => debugWarn(err));
|
131
|
-
}
|
132
|
-
}, { deep: true, flush: "post" });
|
133
|
-
provide(formContextKey, reactive({
|
134
|
-
...toRefs(props),
|
135
|
-
emit,
|
136
|
-
resetFields,
|
137
|
-
clearValidate,
|
138
|
-
validateField,
|
139
|
-
getField,
|
140
|
-
addField,
|
141
|
-
removeField,
|
142
|
-
...useFormLabelWidth()
|
143
|
-
}));
|
144
|
-
expose({
|
145
|
-
validate,
|
146
|
-
validateField,
|
147
|
-
resetFields,
|
148
|
-
clearValidate,
|
149
|
-
scrollToField,
|
150
|
-
getField,
|
151
|
-
fields
|
152
|
-
});
|
153
|
-
return (_ctx, _cache) => {
|
154
|
-
return openBlock(), createElementBlock("form", {
|
155
|
-
ref_key: "formRef",
|
156
|
-
ref: formRef,
|
157
|
-
class: normalizeClass(unref(formClasses))
|
158
|
-
}, [
|
159
|
-
renderSlot(_ctx.$slots, "default")
|
160
|
-
], 2);
|
161
|
-
};
|
13
|
+
const formProps = buildProps({
|
14
|
+
...formMetaProps,
|
15
|
+
model: Object,
|
16
|
+
rules: {
|
17
|
+
type: definePropType(Object)
|
18
|
+
},
|
19
|
+
labelPosition: {
|
20
|
+
type: String,
|
21
|
+
values: ["left", "right", "top"],
|
22
|
+
default: "right"
|
23
|
+
},
|
24
|
+
requireAsteriskPosition: {
|
25
|
+
type: String,
|
26
|
+
values: ["left", "right"],
|
27
|
+
default: "left"
|
28
|
+
},
|
29
|
+
labelWidth: {
|
30
|
+
type: [String, Number],
|
31
|
+
default: ""
|
32
|
+
},
|
33
|
+
labelSuffix: {
|
34
|
+
type: String,
|
35
|
+
default: ""
|
36
|
+
},
|
37
|
+
inline: Boolean,
|
38
|
+
inlineMessage: Boolean,
|
39
|
+
statusIcon: Boolean,
|
40
|
+
showMessage: {
|
41
|
+
type: Boolean,
|
42
|
+
default: true
|
43
|
+
},
|
44
|
+
validateOnRuleChange: {
|
45
|
+
type: Boolean,
|
46
|
+
default: true
|
47
|
+
},
|
48
|
+
hideRequiredAsterisk: Boolean,
|
49
|
+
scrollToError: Boolean,
|
50
|
+
scrollIntoViewOptions: {
|
51
|
+
type: [Object, Boolean],
|
52
|
+
default: true
|
162
53
|
}
|
163
54
|
});
|
164
|
-
|
55
|
+
const formEmits = {
|
56
|
+
validate: (prop, isValid, message) => (isArray(prop) || isString(prop)) && isBoolean(isValid) && isString(message)
|
57
|
+
};
|
165
58
|
|
166
|
-
export {
|
59
|
+
export { formEmits, formMetaProps, formProps };
|
167
60
|
//# sourceMappingURL=form2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"form2.mjs","sources":["../../../../../../packages/components/form/src/form.vue"],"sourcesContent":["<template>\n <form ref=\"formRef\" :class=\"formClasses\">\n <slot />\n </form>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, reactive, ref, toRefs, watch } from 'vue'\nimport { debugWarn, isFunction } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from './hooks'\nimport { formContextKey } from './constants'\nimport { formEmits, formProps } from './form'\nimport { filterFields, useFormLabelWidth } from './utils'\n\nimport type { ValidateFieldsError } from 'async-validator'\nimport type { Arrayable } from '@element-plus/utils'\nimport type {\n FormContext,\n FormItemContext,\n FormValidateCallback,\n FormValidationResult,\n} from './types'\nimport type { FormItemProp } from './form-item'\n\nconst COMPONENT_NAME = 'ElForm'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(formProps)\nconst emit = defineEmits(formEmits)\n\nconst formRef = ref<HTMLElement>()\nconst fields = reactive<FormItemContext[]>([])\n\nconst formSize = useFormSize()\nconst ns = useNamespace('form')\nconst formClasses = computed(() => {\n const { labelPosition, inline } = props\n return [\n ns.b(),\n ns.m(formSize.value || 'default'),\n {\n [ns.m(`label-${labelPosition}`)]: labelPosition,\n [ns.m('inline')]: inline,\n },\n ]\n})\n\nconst getField: FormContext['getField'] = (prop) => {\n return filterFields(fields, [prop])[0]\n}\n\nconst addField: FormContext['addField'] = (field) => {\n fields.push(field)\n}\n\nconst removeField: FormContext['removeField'] = (field) => {\n if (field.prop) {\n fields.splice(fields.indexOf(field), 1)\n }\n}\n\nconst resetFields: FormContext['resetFields'] = (properties = []) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for resetFields to work.')\n return\n }\n filterFields(fields, properties).forEach((field) => field.resetField())\n}\n\nconst clearValidate: FormContext['clearValidate'] = (props = []) => {\n filterFields(fields, props).forEach((field) => field.clearValidate())\n}\n\nconst isValidatable = computed(() => {\n const hasModel = !!props.model\n if (!hasModel) {\n debugWarn(COMPONENT_NAME, 'model is required for validate to work.')\n }\n return hasModel\n})\n\nconst obtainValidateFields = (props: Arrayable<FormItemProp>) => {\n if (fields.length === 0) return []\n\n const filteredFields = filterFields(fields, props)\n if (!filteredFields.length) {\n debugWarn(COMPONENT_NAME, 'please pass correct props!')\n return []\n }\n return filteredFields\n}\n\nconst validate = async (\n callback?: FormValidateCallback\n): FormValidationResult => validateField(undefined, callback)\n\nconst doValidateField = async (\n props: Arrayable<FormItemProp> = []\n): Promise<boolean> => {\n if (!isValidatable.value) return false\n\n const fields = obtainValidateFields(props)\n if (fields.length === 0) return true\n\n let validationErrors: ValidateFieldsError = {}\n for (const field of fields) {\n try {\n await field.validate('')\n if (field.validateState === 'error') field.resetField()\n } catch (fields) {\n validationErrors = {\n ...validationErrors,\n ...(fields as ValidateFieldsError),\n }\n }\n }\n\n if (Object.keys(validationErrors).length === 0) return true\n return Promise.reject(validationErrors)\n}\n\nconst validateField: FormContext['validateField'] = async (\n modelProps = [],\n callback\n) => {\n let result = false\n const shouldThrow = !isFunction(callback)\n try {\n result = await doValidateField(modelProps)\n // When result is false meaning that the fields are not validatable\n if (result === true) {\n await callback?.(result)\n }\n return result\n } catch (e) {\n if (e instanceof Error) throw e\n\n const invalidFields = e as ValidateFieldsError\n\n if (props.scrollToError) {\n // form-item may be dynamically rendered based on the judgment conditions, and the order in invalidFields is uncertain.\n // Therefore, the first form field with an error is determined by directly looking for the rendered element.\n if (formRef.value) {\n const formItem = formRef.value!.querySelector(\n `.${ns.b()}-item.is-error`\n )\n formItem?.scrollIntoView(props.scrollIntoViewOptions)\n }\n }\n !result && (await callback?.(false, invalidFields))\n return shouldThrow && Promise.reject(invalidFields)\n }\n}\n\nconst scrollToField = (prop: FormItemProp) => {\n const field = getField(prop)\n if (field) {\n field.$el?.scrollIntoView(props.scrollIntoViewOptions)\n }\n}\n\nwatch(\n () => props.rules,\n () => {\n if (props.validateOnRuleChange) {\n validate().catch((err) => debugWarn(err))\n }\n },\n { deep: true, flush: 'post' }\n)\n\nprovide(\n formContextKey,\n reactive({\n ...toRefs(props),\n emit,\n\n resetFields,\n clearValidate,\n validateField,\n getField,\n addField,\n removeField,\n\n ...useFormLabelWidth(),\n })\n)\n\ndefineExpose({\n /**\n * @description Validate the whole form. Receives a callback or returns `Promise`.\n */\n validate,\n /**\n * @description Validate specified fields.\n */\n validateField,\n /**\n * @description Reset specified fields and remove validation result.\n */\n resetFields,\n /**\n * @description Clear validation message for specified fields.\n */\n clearValidate,\n /**\n * @description Scroll to the specified fields.\n */\n scrollToField,\n /**\n * @description Get a field context.\n */\n getField,\n /**\n * @description All fields context.\n */\n fields,\n})\n</script>\n"],"names":["props","fields","_openBlock","_createElementBlock","_normalizeClass","_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,EAAA,EAAA,IAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,CAAA,CAAA;AAAA,IACE,OAAA,CAAA,cAAA,EAAA,QAAA,CAAA;AAAA,MACA,GAAS,MAAA,CAAA,KAAA,CAAA;AAAA,MACP,IAAA;AAAe,MACf,WAAA;AAAA,MAEA,aAAA;AAAA,MACA,aAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,WAAA;AAAA,MACA,GAAA,iBAAA,EAAA;AAAA,KAAA,CAAA,CAAA,CAEA;AAAqB,IAAA,MACtB,CAAA;AAAA,MACH,QAAA;AAEA,MAAa,aAAA;AAAA,MAAA,WAAA;AAAA,MAAA,aAAA;AAAA,MAAA,aAAA;AAAA,MAIX,QAAA;AAAA,MAAA,MAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAAA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MAIA,OAAAC,SAAA,EAAA,EAAAC,kBAAA,CAAA,MAAA,EAAA;AAAA,QAAA,OAAA,EAAA,SAAA;AAAA,QAAA,GAAA,EAAA,OAAA;AAAA,QAAA,KAAA,EAAAC,cAAA,CAAAC,KAAA,CAAA,WAAA,CAAA,CAAA;AAAA,OAIA,EAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,OAAA,EAAA,CAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAIA;AAAA,CAAA,CAAA,CAAA;AAAA,WAAA,gBAAA,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,UAAA,CAAA,CAAA,CAAA;;;;"}
|
1
|
+
{"version":3,"file":"form2.mjs","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, __ExtractPublicPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nexport const 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 default: true,\n },\n} as const)\nexport type FormProps = ExtractPropTypes<typeof formProps>\nexport type FormPropsPublic = __ExtractPublicPropTypes<typeof formProps>\n\nexport type FormMetaProps = ExtractPropTypes<typeof formMetaProps>\nexport type FormMetaPropsPublic = __ExtractPublicPropTypes<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":[],"mappings":";;;;;AAQY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,cAAc;AAC1B,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC,EAAE;AACS,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,GAAG,aAAa;AAClB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;AACpC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,uBAAuB,EAAE;AAC3B,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC7B,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,oBAAoB,EAAE;AACxB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,oBAAoB,EAAE,OAAO;AAC/B,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,qBAAqB,EAAE;AACzB,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC3B,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC;AACpH;;;;"}
|
package/es/components/index.mjs
CHANGED
@@ -96,7 +96,7 @@ export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item.mjs';
|
|
96
96
|
export { breadcrumbKey } from './breadcrumb/src/constants.mjs';
|
97
97
|
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button.mjs';
|
98
98
|
export { buttonGroupContextKey } from './button/src/constants.mjs';
|
99
|
-
export { calendarEmits, calendarProps } from './calendar/src/
|
99
|
+
export { calendarEmits, calendarProps } from './calendar/src/calendar2.mjs';
|
100
100
|
export { cardProps } from './card/src/card.mjs';
|
101
101
|
export { carouselEmits, carouselProps } from './carousel/src/carousel.mjs';
|
102
102
|
export { carouselItemProps } from './carousel/src/carousel-item.mjs';
|
@@ -112,7 +112,7 @@ export { colProps } from './col/src/col.mjs';
|
|
112
112
|
export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
|
113
113
|
export { collapseItemProps } from './collapse/src/collapse-item.mjs';
|
114
114
|
export { collapseContextKey } from './collapse/src/constants.mjs';
|
115
|
-
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-
|
115
|
+
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-picker.mjs';
|
116
116
|
export { messageConfig } from './config-provider/src/config-provider.mjs';
|
117
117
|
export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
|
118
118
|
export { configProviderContextKey } from './config-provider/src/constants.mjs';
|
@@ -130,7 +130,7 @@ export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
|
|
130
130
|
export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown.mjs';
|
131
131
|
export { DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY } from './dropdown/src/tokens.mjs';
|
132
132
|
export { emptyProps } from './empty/src/empty.mjs';
|
133
|
-
export { formEmits, formMetaProps, formProps } from './form/src/
|
133
|
+
export { formEmits, formMetaProps, formProps } from './form/src/form2.mjs';
|
134
134
|
export { formItemProps, formItemValidateStates } from './form/src/form-item.mjs';
|
135
135
|
export { formContextKey, formItemContextKey } from './form/src/constants.mjs';
|
136
136
|
export { useDisabled, useFormDisabled, useFormSize, useSize } from './form/src/hooks/use-form-common-props.mjs';
|
@@ -141,7 +141,7 @@ export { imageViewerEmits, imageViewerProps } from './image-viewer/src/image-vie
|
|
141
141
|
export { inputEmits, inputProps } from './input/src/input.mjs';
|
142
142
|
export { inputNumberEmits, inputNumberProps } from './input-number/src/input-number.mjs';
|
143
143
|
export { inputTagEmits, inputTagProps } from './input-tag/src/input-tag.mjs';
|
144
|
-
export { linkEmits, linkProps } from './link/src/
|
144
|
+
export { linkEmits, linkProps } from './link/src/link2.mjs';
|
145
145
|
export { menuEmits, menuProps } from './menu/src/menu.mjs';
|
146
146
|
export { menuItemEmits, menuItemProps } from './menu/src/menu-item.mjs';
|
147
147
|
export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
|
@@ -155,14 +155,14 @@ export { popconfirmEmits, popconfirmProps } from './popconfirm/src/popconfirm.mj
|
|
155
155
|
export { Effect, popperProps, roleTypes, usePopperProps } from './popper/src/popper.mjs';
|
156
156
|
export { popperTriggerProps, usePopperTriggerProps } from './popper/src/trigger.mjs';
|
157
157
|
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './popper/src/content.mjs';
|
158
|
-
export { popperArrowProps, usePopperArrowProps } from './popper/src/
|
158
|
+
export { popperArrowProps, usePopperArrowProps } from './popper/src/arrow2.mjs';
|
159
159
|
export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './popper/src/constants.mjs';
|
160
|
-
export { default as ElPopperArrow } from './popper/src/
|
160
|
+
export { default as ElPopperArrow } from './popper/src/arrow.mjs';
|
161
161
|
export { default as ElPopperTrigger } from './popper/src/trigger2.mjs';
|
162
162
|
export { default as ElPopperContent } from './popper/src/content2.mjs';
|
163
163
|
export { progressProps } from './progress/src/progress.mjs';
|
164
164
|
export { radioEmits, radioProps, radioPropsBase } from './radio/src/radio.mjs';
|
165
|
-
export { radioGroupEmits, radioGroupProps } from './radio/src/radio-
|
165
|
+
export { radioGroupEmits, radioGroupProps } from './radio/src/radio-group.mjs';
|
166
166
|
export { radioButtonProps } from './radio/src/radio-button.mjs';
|
167
167
|
export { radioGroupKey } from './radio/src/constants.mjs';
|
168
168
|
export { rateEmits, rateProps } from './rate/src/rate2.mjs';
|
@@ -170,7 +170,7 @@ export { IconComponentMap, IconMap, resultProps } from './result/src/result.mjs'
|
|
170
170
|
export { RowAlign, RowJustify, rowProps } from './row/src/row.mjs';
|
171
171
|
export { rowContextKey } from './row/src/constants.mjs';
|
172
172
|
export { BAR_MAP, GAP, renderThumbStyle } from './scrollbar/src/util.mjs';
|
173
|
-
export { scrollbarEmits, scrollbarProps } from './scrollbar/src/
|
173
|
+
export { scrollbarEmits, scrollbarProps } from './scrollbar/src/scrollbar2.mjs';
|
174
174
|
export { thumbProps } from './scrollbar/src/thumb.mjs';
|
175
175
|
export { scrollbarContextKey } from './scrollbar/src/constants.mjs';
|
176
176
|
export { selectGroupKey, selectKey } from './select/src/token.mjs';
|
@@ -209,22 +209,22 @@ export { default as TimePickPanel } from './time-picker/src/time-picker-com/pane
|
|
209
209
|
export { timeSelectProps } from './time-select/src/time-select.mjs';
|
210
210
|
export { timelineItemProps } from './timeline/src/timeline-item.mjs';
|
211
211
|
export { TIMELINE_INJECTION_KEY } from './timeline/src/tokens.mjs';
|
212
|
-
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './tooltip/src/
|
212
|
+
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './tooltip/src/tooltip.mjs';
|
213
213
|
export { useTooltipTriggerProps } from './tooltip/src/trigger.mjs';
|
214
|
-
export { useTooltipContentProps } from './tooltip/src/
|
214
|
+
export { useTooltipContentProps } from './tooltip/src/content.mjs';
|
215
215
|
export { TOOLTIP_INJECTION_KEY } from './tooltip/src/constants.mjs';
|
216
216
|
export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/transfer.mjs';
|
217
217
|
export { NODE_INSTANCE_INJECTION_KEY, ROOT_TREE_INJECTION_KEY, TREE_NODE_MAP_INJECTION_KEY } from './tree/src/tokens.mjs';
|
218
218
|
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './upload/src/upload.mjs';
|
219
219
|
export { uploadContentProps } from './upload/src/upload-content.mjs';
|
220
|
-
export { uploadListEmits, uploadListProps } from './upload/src/upload-
|
221
|
-
export { uploadDraggerEmits, uploadDraggerProps } from './upload/src/upload-
|
220
|
+
export { uploadListEmits, uploadListProps } from './upload/src/upload-list2.mjs';
|
221
|
+
export { uploadDraggerEmits, uploadDraggerProps } from './upload/src/upload-dragger2.mjs';
|
222
222
|
export { uploadContextKey } from './upload/src/constants.mjs';
|
223
223
|
export { default as FixedSizeList } from './virtual-list/src/components/fixed-size-list.mjs';
|
224
224
|
export { default as DynamicSizeList } from './virtual-list/src/components/dynamic-size-list.mjs';
|
225
225
|
export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './virtual-list/src/props.mjs';
|
226
226
|
export { watermarkProps } from './watermark/src/watermark.mjs';
|
227
|
-
export { tourEmits, tourProps } from './tour/src/
|
227
|
+
export { tourEmits, tourProps } from './tour/src/tour2.mjs';
|
228
228
|
export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
|
229
229
|
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content.mjs';
|
230
230
|
export { anchorEmits, anchorProps } from './anchor/src/anchor.mjs';
|
@@ -233,6 +233,6 @@ export { mentionEmits, mentionProps } from './mention/src/mention.mjs';
|
|
233
233
|
export { splitterProps } from './splitter/src/splitter.mjs';
|
234
234
|
export { splitterPanelProps } from './splitter/src/split-panel.mjs';
|
235
235
|
export { messageDefaults, messageEmits, messageProps, messageTypes } from './message/src/message.mjs';
|
236
|
-
export { notificationEmits, notificationProps, notificationTypes } from './notification/src/
|
236
|
+
export { notificationEmits, notificationProps, notificationTypes } from './notification/src/notification2.mjs';
|
237
237
|
export { popoverEmits, popoverProps } from './popover/src/popover.mjs';
|
238
238
|
//# sourceMappingURL=index.mjs.map
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Link from './src/
|
2
|
-
export { linkEmits, linkProps } from './src/
|
1
|
+
import Link from './src/link.mjs';
|
2
|
+
export { linkEmits, linkProps } from './src/link2.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElLink = withInstall(Link);
|