@element-plus/nightly 0.0.20250107 → 0.0.20250108
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- 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/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +25 -118
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +118 -25
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -53
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +53 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb.mjs +10 -37
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +37 -10
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +38 -14
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +14 -38
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +28 -16
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +16 -28
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +10 -62
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +62 -10
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/form/index.mjs +4 -4
- package/es/components/form/src/form-item.mjs +47 -319
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +319 -47
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.mjs +53 -153
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +153 -53
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/index.mjs +15 -15
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +68 -142
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +142 -68
- 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/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +65 -34
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +34 -65
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +170 -55
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +55 -170
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs +1 -1
- package/es/components/slider/index.mjs +2 -2
- package/es/components/slider/src/slider.mjs +88 -238
- package/es/components/slider/src/slider.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +238 -88
- package/es/components/slider/src/slider2.mjs.map +1 -1
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +69 -25
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +25 -69
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +95 -7
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +7 -95
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +3 -3
- package/es/components/tooltip-v2/src/tooltip.mjs +19 -77
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +77 -19
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- 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/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +19 -130
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +130 -19
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +210 -27
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +27 -210
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +15 -15
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +26 -118
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +118 -26
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -53
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +53 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb.js +10 -37
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +37 -10
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +38 -15
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +15 -38
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +28 -18
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +18 -28
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +9 -62
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +62 -9
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/form/index.js +4 -4
- package/lib/components/form/src/form-item.js +48 -323
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +323 -48
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.js +54 -152
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form2.js +152 -54
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/index.js +15 -15
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +69 -141
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +141 -69
- 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/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +65 -35
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +35 -65
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +170 -56
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +56 -170
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +22 -17
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +17 -22
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js +1 -1
- package/lib/components/slider/index.js +2 -2
- package/lib/components/slider/src/slider.js +89 -238
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/slider/src/slider2.js +238 -89
- package/lib/components/slider/src/slider2.js.map +1 -1
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +69 -25
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +25 -69
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +95 -7
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +7 -95
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/tooltip-v2/index.js +3 -3
- package/lib/components/tooltip-v2/src/tooltip.js +19 -77
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +77 -19
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- 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/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +21 -130
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +130 -21
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +210 -27
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +27 -210
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +15 -15
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
@@ -3,68 +3,15 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var vue = require('vue');
|
6
|
-
var
|
7
|
-
var collectionItem = require('./collection-item.js');
|
6
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
8
7
|
|
9
|
-
const
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
...collection["default"],
|
17
|
-
name: COLLECTION_NAME,
|
18
|
-
setup() {
|
19
|
-
const collectionRef = vue.ref(null);
|
20
|
-
const itemMap = /* @__PURE__ */ new Map();
|
21
|
-
const getItems = () => {
|
22
|
-
const collectionEl = vue.unref(collectionRef);
|
23
|
-
if (!collectionEl)
|
24
|
-
return [];
|
25
|
-
const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
|
26
|
-
const items = [...itemMap.values()];
|
27
|
-
return items.sort((a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref));
|
28
|
-
};
|
29
|
-
vue.provide(COLLECTION_INJECTION_KEY, {
|
30
|
-
itemMap,
|
31
|
-
getItems,
|
32
|
-
collectionRef
|
33
|
-
});
|
34
|
-
}
|
35
|
-
};
|
36
|
-
const ElCollectionItem = {
|
37
|
-
...collectionItem["default"],
|
38
|
-
name: COLLECTION_ITEM_NAME,
|
39
|
-
setup(_, { attrs }) {
|
40
|
-
const collectionItemRef = vue.ref(null);
|
41
|
-
const collectionInjection = vue.inject(COLLECTION_INJECTION_KEY, void 0);
|
42
|
-
vue.provide(COLLECTION_ITEM_INJECTION_KEY, {
|
43
|
-
collectionItemRef
|
44
|
-
});
|
45
|
-
vue.onMounted(() => {
|
46
|
-
const collectionItemEl = vue.unref(collectionItemRef);
|
47
|
-
if (collectionItemEl) {
|
48
|
-
collectionInjection.itemMap.set(collectionItemEl, {
|
49
|
-
ref: collectionItemEl,
|
50
|
-
...attrs
|
51
|
-
});
|
52
|
-
}
|
53
|
-
});
|
54
|
-
vue.onBeforeUnmount(() => {
|
55
|
-
const collectionItemEl = vue.unref(collectionItemRef);
|
56
|
-
collectionInjection.itemMap.delete(collectionItemEl);
|
57
|
-
});
|
58
|
-
}
|
59
|
-
};
|
60
|
-
return {
|
61
|
-
COLLECTION_INJECTION_KEY,
|
62
|
-
COLLECTION_ITEM_INJECTION_KEY,
|
63
|
-
ElCollection,
|
64
|
-
ElCollectionItem
|
65
|
-
};
|
66
|
-
};
|
8
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
9
|
+
inheritAttrs: false
|
10
|
+
});
|
11
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
12
|
+
return vue.renderSlot(_ctx.$slots, "default");
|
13
|
+
}
|
14
|
+
var Collection = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "collection.vue"]]);
|
67
15
|
|
68
|
-
exports
|
69
|
-
exports.createCollectionWithScope = createCollectionWithScope;
|
16
|
+
exports["default"] = Collection;
|
70
17
|
//# sourceMappingURL=collection.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collection.js","sources":["../../../../../../packages/components/collection/src/collection.
|
1
|
+
{"version":3,"file":"collection.js","sources":["../../../../../../packages/components/collection/src/collection.vue"],"sourcesContent":["<template>\n <slot />\n</template>\n\n<script lang=\"ts\" setup>\ndefineOptions({\n inheritAttrs: false,\n})\n</script>\n"],"names":["DO_defineComponent","_renderSlot"],"mappings":";;;;;;;kCAKcA,mBAAA,CAAA;AAAA,EACZ,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;SANEC,cAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA;;;;;;"}
|
@@ -3,15 +3,68 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var vue = require('vue');
|
6
|
-
var
|
6
|
+
var collection = require('./collection.js');
|
7
|
+
var collectionItem = require('./collection-item.js');
|
7
8
|
|
8
|
-
const
|
9
|
-
|
10
|
-
}
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
|
10
|
+
const createCollectionWithScope = (name) => {
|
11
|
+
const COLLECTION_NAME = `El${name}Collection`;
|
12
|
+
const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
|
13
|
+
const COLLECTION_INJECTION_KEY = Symbol(COLLECTION_NAME);
|
14
|
+
const COLLECTION_ITEM_INJECTION_KEY = Symbol(COLLECTION_ITEM_NAME);
|
15
|
+
const ElCollection = {
|
16
|
+
...collection["default"],
|
17
|
+
name: COLLECTION_NAME,
|
18
|
+
setup() {
|
19
|
+
const collectionRef = vue.ref(null);
|
20
|
+
const itemMap = /* @__PURE__ */ new Map();
|
21
|
+
const getItems = () => {
|
22
|
+
const collectionEl = vue.unref(collectionRef);
|
23
|
+
if (!collectionEl)
|
24
|
+
return [];
|
25
|
+
const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
|
26
|
+
const items = [...itemMap.values()];
|
27
|
+
return items.sort((a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref));
|
28
|
+
};
|
29
|
+
vue.provide(COLLECTION_INJECTION_KEY, {
|
30
|
+
itemMap,
|
31
|
+
getItems,
|
32
|
+
collectionRef
|
33
|
+
});
|
34
|
+
}
|
35
|
+
};
|
36
|
+
const ElCollectionItem = {
|
37
|
+
...collectionItem["default"],
|
38
|
+
name: COLLECTION_ITEM_NAME,
|
39
|
+
setup(_, { attrs }) {
|
40
|
+
const collectionItemRef = vue.ref(null);
|
41
|
+
const collectionInjection = vue.inject(COLLECTION_INJECTION_KEY, void 0);
|
42
|
+
vue.provide(COLLECTION_ITEM_INJECTION_KEY, {
|
43
|
+
collectionItemRef
|
44
|
+
});
|
45
|
+
vue.onMounted(() => {
|
46
|
+
const collectionItemEl = vue.unref(collectionItemRef);
|
47
|
+
if (collectionItemEl) {
|
48
|
+
collectionInjection.itemMap.set(collectionItemEl, {
|
49
|
+
ref: collectionItemEl,
|
50
|
+
...attrs
|
51
|
+
});
|
52
|
+
}
|
53
|
+
});
|
54
|
+
vue.onBeforeUnmount(() => {
|
55
|
+
const collectionItemEl = vue.unref(collectionItemRef);
|
56
|
+
collectionInjection.itemMap.delete(collectionItemEl);
|
57
|
+
});
|
58
|
+
}
|
59
|
+
};
|
60
|
+
return {
|
61
|
+
COLLECTION_INJECTION_KEY,
|
62
|
+
COLLECTION_ITEM_INJECTION_KEY,
|
63
|
+
ElCollection,
|
64
|
+
ElCollectionItem
|
65
|
+
};
|
66
|
+
};
|
15
67
|
|
16
|
-
exports
|
68
|
+
exports.COLLECTION_ITEM_SIGN = COLLECTION_ITEM_SIGN;
|
69
|
+
exports.createCollectionWithScope = createCollectionWithScope;
|
17
70
|
//# sourceMappingURL=collection2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collection2.js","sources":["../../../../../../packages/components/collection/src/collection.
|
1
|
+
{"version":3,"file":"collection2.js","sources":["../../../../../../packages/components/collection/src/collection.ts"],"sourcesContent":["import { inject, onBeforeUnmount, onMounted, provide, ref, unref } from 'vue'\nimport Collection from './collection.vue'\nimport CollectionItem from './collection-item.vue'\n\nimport type { InjectionKey } from 'vue'\nimport type { SetupContext } from '@vue/runtime-core'\nimport type {\n ElCollectionInjectionContext,\n ElCollectionItemInjectionContext,\n} from './tokens'\n\nexport const COLLECTION_ITEM_SIGN = `data-el-collection-item`\n\n// Make sure the first letter of name is capitalized\nexport const createCollectionWithScope = (name: string) => {\n const COLLECTION_NAME = `El${name}Collection`\n const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`\n const COLLECTION_INJECTION_KEY: InjectionKey<ElCollectionInjectionContext> =\n Symbol(COLLECTION_NAME)\n const COLLECTION_ITEM_INJECTION_KEY: InjectionKey<ElCollectionItemInjectionContext> =\n Symbol(COLLECTION_ITEM_NAME)\n\n const ElCollection = {\n ...Collection,\n name: COLLECTION_NAME,\n setup() {\n const collectionRef = ref<HTMLElement | null>(null)\n const itemMap: ElCollectionInjectionContext['itemMap'] = new Map()\n const getItems = () => {\n const collectionEl = unref(collectionRef)\n\n if (!collectionEl) return []\n const orderedNodes = Array.from(\n collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`)\n )\n\n const items = [...itemMap.values()]\n\n return items.sort(\n (a, b) => orderedNodes.indexOf(a.ref!) - orderedNodes.indexOf(b.ref!)\n )\n }\n\n provide(COLLECTION_INJECTION_KEY, {\n itemMap,\n getItems,\n collectionRef,\n })\n },\n }\n\n const ElCollectionItem = {\n ...CollectionItem,\n name: COLLECTION_ITEM_NAME,\n setup(_: unknown, { attrs }: SetupContext) {\n const collectionItemRef = ref<HTMLElement | null>(null)\n const collectionInjection = inject(COLLECTION_INJECTION_KEY, undefined)!\n\n provide(COLLECTION_ITEM_INJECTION_KEY, {\n collectionItemRef,\n })\n\n onMounted(() => {\n const collectionItemEl = unref(collectionItemRef)\n if (collectionItemEl) {\n collectionInjection.itemMap.set(collectionItemEl, {\n ref: collectionItemEl,\n ...attrs,\n })\n }\n })\n\n onBeforeUnmount(() => {\n const collectionItemEl = unref(collectionItemRef)!\n collectionInjection.itemMap.delete(collectionItemEl)\n })\n },\n }\n\n return {\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n ElCollection,\n ElCollectionItem,\n }\n}\n"],"names":["Collection","ref","unref","provide","CollectionItem","inject","onMounted","onBeforeUnmount"],"mappings":"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"}
|
@@ -9,7 +9,7 @@ var tokens = require('./tokens.js');
|
|
9
9
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
10
|
var rovingFocusGroup = require('../../roving-focus-group/src/roving-focus-group.js');
|
11
11
|
var tokens$1 = require('../../roving-focus-group/src/tokens.js');
|
12
|
-
var collection = require('../../collection/src/
|
12
|
+
var collection = require('../../collection/src/collection2.js');
|
13
13
|
var index$1 = require('../../../hooks/use-namespace/index.js');
|
14
14
|
var refs = require('../../../utils/vue/refs.js');
|
15
15
|
var event = require('../../../utils/dom/event.js');
|
@@ -7,7 +7,7 @@ var runtime = require('../../../utils/vue/props/runtime.js');
|
|
7
7
|
var aria = require('../../../constants/aria.js');
|
8
8
|
var content = require('../../tooltip/src/content.js');
|
9
9
|
var icon = require('../../../utils/vue/icon.js');
|
10
|
-
var collection = require('../../collection/src/
|
10
|
+
var collection = require('../../collection/src/collection2.js');
|
11
11
|
|
12
12
|
const dropdownProps = runtime.buildProps({
|
13
13
|
trigger: trigger.useTooltipTriggerProps.trigger,
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var form$1 = require('./src/
|
6
|
-
var formItem$1 = require('./src/form-
|
7
|
-
var form = require('./src/
|
8
|
-
var formItem = require('./src/form-
|
5
|
+
var form$1 = require('./src/form2.js');
|
6
|
+
var formItem$1 = require('./src/form-item2.js');
|
7
|
+
var form = require('./src/form.js');
|
8
|
+
var formItem = require('./src/form-item.js');
|
9
9
|
var constants = require('./src/constants.js');
|
10
10
|
var install = require('../../utils/vue/install.js');
|
11
11
|
var useFormCommonProps = require('./src/hooks/use-form-common-props.js');
|
@@ -2,331 +2,56 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var lodashUnified = require('lodash-unified');
|
8
|
-
var core = require('@vueuse/core');
|
9
|
-
var formItem = require('./form-item2.js');
|
10
|
-
var formLabelWrap = require('./form-label-wrap.js');
|
11
|
-
var constants = require('./constants.js');
|
12
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
13
|
-
var objects = require('../../../utils/objects.js');
|
14
|
-
var useFormCommonProps = require('./hooks/use-form-common-props.js');
|
15
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
16
|
-
var index$1 = require('../../../hooks/use-id/index.js');
|
17
|
-
var style = require('../../../utils/dom/style.js');
|
18
|
-
var types = require('../../../utils/types.js');
|
19
|
-
var shared = require('@vue/shared');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
6
|
+
var size = require('../../../constants/size.js');
|
20
7
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
return { marginLeft: labelWidth };
|
66
|
-
}
|
67
|
-
return {};
|
68
|
-
});
|
69
|
-
const formItemClasses = vue.computed(() => [
|
70
|
-
ns.b(),
|
71
|
-
ns.m(_size.value),
|
72
|
-
ns.is("error", validateState.value === "error"),
|
73
|
-
ns.is("validating", validateState.value === "validating"),
|
74
|
-
ns.is("success", validateState.value === "success"),
|
75
|
-
ns.is("required", isRequired.value || props.required),
|
76
|
-
ns.is("no-asterisk", formContext == null ? void 0 : formContext.hideRequiredAsterisk),
|
77
|
-
(formContext == null ? void 0 : formContext.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
|
78
|
-
{
|
79
|
-
[ns.m("feedback")]: formContext == null ? void 0 : formContext.statusIcon,
|
80
|
-
[ns.m(`label-${labelPosition.value}`)]: labelPosition.value
|
81
|
-
}
|
82
|
-
]);
|
83
|
-
const _inlineMessage = vue.computed(() => types.isBoolean(props.inlineMessage) ? props.inlineMessage : (formContext == null ? void 0 : formContext.inlineMessage) || false);
|
84
|
-
const validateClasses = vue.computed(() => [
|
85
|
-
ns.e("error"),
|
86
|
-
{ [ns.em("error", "inline")]: _inlineMessage.value }
|
87
|
-
]);
|
88
|
-
const propString = vue.computed(() => {
|
89
|
-
if (!props.prop)
|
90
|
-
return "";
|
91
|
-
return shared.isString(props.prop) ? props.prop : props.prop.join(".");
|
92
|
-
});
|
93
|
-
const hasLabel = vue.computed(() => {
|
94
|
-
return !!(props.label || slots.label);
|
95
|
-
});
|
96
|
-
const labelFor = vue.computed(() => {
|
97
|
-
return props.for || (inputIds.value.length === 1 ? inputIds.value[0] : void 0);
|
98
|
-
});
|
99
|
-
const isGroup = vue.computed(() => {
|
100
|
-
return !labelFor.value && hasLabel.value;
|
101
|
-
});
|
102
|
-
const isNested = !!parentFormItemContext;
|
103
|
-
const fieldValue = vue.computed(() => {
|
104
|
-
const model = formContext == null ? void 0 : formContext.model;
|
105
|
-
if (!model || !props.prop) {
|
106
|
-
return;
|
107
|
-
}
|
108
|
-
return objects.getProp(model, props.prop).value;
|
109
|
-
});
|
110
|
-
const normalizedRules = vue.computed(() => {
|
111
|
-
const { required } = props;
|
112
|
-
const rules = [];
|
113
|
-
if (props.rules) {
|
114
|
-
rules.push(...lodashUnified.castArray(props.rules));
|
115
|
-
}
|
116
|
-
const formRules = formContext == null ? void 0 : formContext.rules;
|
117
|
-
if (formRules && props.prop) {
|
118
|
-
const _rules = objects.getProp(formRules, props.prop).value;
|
119
|
-
if (_rules) {
|
120
|
-
rules.push(...lodashUnified.castArray(_rules));
|
121
|
-
}
|
122
|
-
}
|
123
|
-
if (required !== void 0) {
|
124
|
-
const requiredRules = rules.map((rule, i) => [rule, i]).filter(([rule]) => Object.keys(rule).includes("required"));
|
125
|
-
if (requiredRules.length > 0) {
|
126
|
-
for (const [rule, i] of requiredRules) {
|
127
|
-
if (rule.required === required)
|
128
|
-
continue;
|
129
|
-
rules[i] = { ...rule, required };
|
130
|
-
}
|
131
|
-
} else {
|
132
|
-
rules.push({ required });
|
133
|
-
}
|
134
|
-
}
|
135
|
-
return rules;
|
136
|
-
});
|
137
|
-
const validateEnabled = vue.computed(() => normalizedRules.value.length > 0);
|
138
|
-
const getFilteredRule = (trigger) => {
|
139
|
-
const rules = normalizedRules.value;
|
140
|
-
return rules.filter((rule) => {
|
141
|
-
if (!rule.trigger || !trigger)
|
142
|
-
return true;
|
143
|
-
if (shared.isArray(rule.trigger)) {
|
144
|
-
return rule.trigger.includes(trigger);
|
145
|
-
} else {
|
146
|
-
return rule.trigger === trigger;
|
147
|
-
}
|
148
|
-
}).map(({ trigger: trigger2, ...rule }) => rule);
|
149
|
-
};
|
150
|
-
const isRequired = vue.computed(() => normalizedRules.value.some((rule) => rule.required));
|
151
|
-
const shouldShowError = vue.computed(() => {
|
152
|
-
var _a;
|
153
|
-
return validateStateDebounced.value === "error" && props.showMessage && ((_a = formContext == null ? void 0 : formContext.showMessage) != null ? _a : true);
|
154
|
-
});
|
155
|
-
const currentLabel = vue.computed(() => `${props.label || ""}${(formContext == null ? void 0 : formContext.labelSuffix) || ""}`);
|
156
|
-
const setValidationState = (state) => {
|
157
|
-
validateState.value = state;
|
158
|
-
};
|
159
|
-
const onValidationFailed = (error) => {
|
160
|
-
var _a, _b;
|
161
|
-
const { errors, fields } = error;
|
162
|
-
if (!errors || !fields) {
|
163
|
-
console.error(error);
|
164
|
-
}
|
165
|
-
setValidationState("error");
|
166
|
-
validateMessage.value = errors ? (_b = (_a = errors == null ? void 0 : errors[0]) == null ? void 0 : _a.message) != null ? _b : `${props.prop} is required` : "";
|
167
|
-
formContext == null ? void 0 : formContext.emit("validate", props.prop, false, validateMessage.value);
|
168
|
-
};
|
169
|
-
const onValidationSucceeded = () => {
|
170
|
-
setValidationState("success");
|
171
|
-
formContext == null ? void 0 : formContext.emit("validate", props.prop, true, "");
|
172
|
-
};
|
173
|
-
const doValidate = async (rules) => {
|
174
|
-
const modelName = propString.value;
|
175
|
-
const validator = new AsyncValidator__default["default"]({
|
176
|
-
[modelName]: rules
|
177
|
-
});
|
178
|
-
return validator.validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => {
|
179
|
-
onValidationSucceeded();
|
180
|
-
return true;
|
181
|
-
}).catch((err) => {
|
182
|
-
onValidationFailed(err);
|
183
|
-
return Promise.reject(err);
|
184
|
-
});
|
185
|
-
};
|
186
|
-
const validate = async (trigger, callback) => {
|
187
|
-
if (isResettingField || !props.prop) {
|
188
|
-
return false;
|
189
|
-
}
|
190
|
-
const hasCallback = shared.isFunction(callback);
|
191
|
-
if (!validateEnabled.value) {
|
192
|
-
callback == null ? void 0 : callback(false);
|
193
|
-
return false;
|
194
|
-
}
|
195
|
-
const rules = getFilteredRule(trigger);
|
196
|
-
if (rules.length === 0) {
|
197
|
-
callback == null ? void 0 : callback(true);
|
198
|
-
return true;
|
199
|
-
}
|
200
|
-
setValidationState("validating");
|
201
|
-
return doValidate(rules).then(() => {
|
202
|
-
callback == null ? void 0 : callback(true);
|
203
|
-
return true;
|
204
|
-
}).catch((err) => {
|
205
|
-
const { fields } = err;
|
206
|
-
callback == null ? void 0 : callback(false, fields);
|
207
|
-
return hasCallback ? false : Promise.reject(fields);
|
208
|
-
});
|
209
|
-
};
|
210
|
-
const clearValidate = () => {
|
211
|
-
setValidationState("");
|
212
|
-
validateMessage.value = "";
|
213
|
-
isResettingField = false;
|
214
|
-
};
|
215
|
-
const resetField = async () => {
|
216
|
-
const model = formContext == null ? void 0 : formContext.model;
|
217
|
-
if (!model || !props.prop)
|
218
|
-
return;
|
219
|
-
const computedValue = objects.getProp(model, props.prop);
|
220
|
-
isResettingField = true;
|
221
|
-
computedValue.value = lodashUnified.clone(initialValue);
|
222
|
-
await vue.nextTick();
|
223
|
-
clearValidate();
|
224
|
-
isResettingField = false;
|
225
|
-
};
|
226
|
-
const addInputId = (id) => {
|
227
|
-
if (!inputIds.value.includes(id)) {
|
228
|
-
inputIds.value.push(id);
|
229
|
-
}
|
230
|
-
};
|
231
|
-
const removeInputId = (id) => {
|
232
|
-
inputIds.value = inputIds.value.filter((listId) => listId !== id);
|
233
|
-
};
|
234
|
-
vue.watch(() => props.error, (val) => {
|
235
|
-
validateMessage.value = val || "";
|
236
|
-
setValidationState(val ? "error" : "");
|
237
|
-
}, { immediate: true });
|
238
|
-
vue.watch(() => props.validateStatus, (val) => setValidationState(val || ""));
|
239
|
-
const context = vue.reactive({
|
240
|
-
...vue.toRefs(props),
|
241
|
-
$el: formItemRef,
|
242
|
-
size: _size,
|
243
|
-
validateState,
|
244
|
-
labelId,
|
245
|
-
inputIds,
|
246
|
-
isGroup,
|
247
|
-
hasLabel,
|
248
|
-
fieldValue,
|
249
|
-
addInputId,
|
250
|
-
removeInputId,
|
251
|
-
resetField,
|
252
|
-
clearValidate,
|
253
|
-
validate
|
254
|
-
});
|
255
|
-
vue.provide(constants.formItemContextKey, context);
|
256
|
-
vue.onMounted(() => {
|
257
|
-
if (props.prop) {
|
258
|
-
formContext == null ? void 0 : formContext.addField(context);
|
259
|
-
initialValue = lodashUnified.clone(fieldValue.value);
|
260
|
-
}
|
261
|
-
});
|
262
|
-
vue.onBeforeUnmount(() => {
|
263
|
-
formContext == null ? void 0 : formContext.removeField(context);
|
264
|
-
});
|
265
|
-
expose({
|
266
|
-
size: _size,
|
267
|
-
validateMessage,
|
268
|
-
validateState,
|
269
|
-
validate,
|
270
|
-
clearValidate,
|
271
|
-
resetField
|
272
|
-
});
|
273
|
-
return (_ctx, _cache) => {
|
274
|
-
var _a;
|
275
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
276
|
-
ref_key: "formItemRef",
|
277
|
-
ref: formItemRef,
|
278
|
-
class: vue.normalizeClass(vue.unref(formItemClasses)),
|
279
|
-
role: vue.unref(isGroup) ? "group" : void 0,
|
280
|
-
"aria-labelledby": vue.unref(isGroup) ? vue.unref(labelId) : void 0
|
281
|
-
}, [
|
282
|
-
vue.createVNode(vue.unref(formLabelWrap["default"]), {
|
283
|
-
"is-auto-width": vue.unref(labelStyle).width === "auto",
|
284
|
-
"update-all": ((_a = vue.unref(formContext)) == null ? void 0 : _a.labelWidth) === "auto"
|
285
|
-
}, {
|
286
|
-
default: vue.withCtx(() => [
|
287
|
-
vue.unref(hasLabel) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(labelFor) ? "label" : "div"), {
|
288
|
-
key: 0,
|
289
|
-
id: vue.unref(labelId),
|
290
|
-
for: vue.unref(labelFor),
|
291
|
-
class: vue.normalizeClass(vue.unref(ns).e("label")),
|
292
|
-
style: vue.normalizeStyle(vue.unref(labelStyle))
|
293
|
-
}, {
|
294
|
-
default: vue.withCtx(() => [
|
295
|
-
vue.renderSlot(_ctx.$slots, "label", { label: vue.unref(currentLabel) }, () => [
|
296
|
-
vue.createTextVNode(vue.toDisplayString(vue.unref(currentLabel)), 1)
|
297
|
-
])
|
298
|
-
]),
|
299
|
-
_: 3
|
300
|
-
}, 8, ["id", "for", "class", "style"])) : vue.createCommentVNode("v-if", true)
|
301
|
-
]),
|
302
|
-
_: 3
|
303
|
-
}, 8, ["is-auto-width", "update-all"]),
|
304
|
-
vue.createElementVNode("div", {
|
305
|
-
class: vue.normalizeClass(vue.unref(ns).e("content")),
|
306
|
-
style: vue.normalizeStyle(vue.unref(contentStyle))
|
307
|
-
}, [
|
308
|
-
vue.renderSlot(_ctx.$slots, "default"),
|
309
|
-
vue.createVNode(vue.TransitionGroup, {
|
310
|
-
name: `${vue.unref(ns).namespace.value}-zoom-in-top`
|
311
|
-
}, {
|
312
|
-
default: vue.withCtx(() => [
|
313
|
-
vue.unref(shouldShowError) ? vue.renderSlot(_ctx.$slots, "error", {
|
314
|
-
key: 0,
|
315
|
-
error: validateMessage.value
|
316
|
-
}, () => [
|
317
|
-
vue.createElementVNode("div", {
|
318
|
-
class: vue.normalizeClass(vue.unref(validateClasses))
|
319
|
-
}, vue.toDisplayString(validateMessage.value), 3)
|
320
|
-
]) : vue.createCommentVNode("v-if", true)
|
321
|
-
]),
|
322
|
-
_: 3
|
323
|
-
}, 8, ["name"])
|
324
|
-
], 6)
|
325
|
-
], 10, ["role", "aria-labelledby"]);
|
326
|
-
};
|
8
|
+
const formItemValidateStates = [
|
9
|
+
"",
|
10
|
+
"error",
|
11
|
+
"validating",
|
12
|
+
"success"
|
13
|
+
];
|
14
|
+
const formItemProps = runtime.buildProps({
|
15
|
+
label: String,
|
16
|
+
labelWidth: {
|
17
|
+
type: [String, Number],
|
18
|
+
default: ""
|
19
|
+
},
|
20
|
+
labelPosition: {
|
21
|
+
type: String,
|
22
|
+
values: ["left", "right", "top", ""],
|
23
|
+
default: ""
|
24
|
+
},
|
25
|
+
prop: {
|
26
|
+
type: runtime.definePropType([String, Array])
|
27
|
+
},
|
28
|
+
required: {
|
29
|
+
type: Boolean,
|
30
|
+
default: void 0
|
31
|
+
},
|
32
|
+
rules: {
|
33
|
+
type: runtime.definePropType([Object, Array])
|
34
|
+
},
|
35
|
+
error: String,
|
36
|
+
validateStatus: {
|
37
|
+
type: String,
|
38
|
+
values: formItemValidateStates
|
39
|
+
},
|
40
|
+
for: String,
|
41
|
+
inlineMessage: {
|
42
|
+
type: [String, Boolean],
|
43
|
+
default: ""
|
44
|
+
},
|
45
|
+
showMessage: {
|
46
|
+
type: Boolean,
|
47
|
+
default: true
|
48
|
+
},
|
49
|
+
size: {
|
50
|
+
type: String,
|
51
|
+
values: size.componentSizes
|
327
52
|
}
|
328
53
|
});
|
329
|
-
var FormItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "form-item.vue"]]);
|
330
54
|
|
331
|
-
exports
|
55
|
+
exports.formItemProps = formItemProps;
|
56
|
+
exports.formItemValidateStates = formItemValidateStates;
|
332
57
|
//# sourceMappingURL=form-item.js.map
|