@element-plus/nightly 0.0.20241007 → 0.0.20241009
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/dist/index.full.js +22 -4
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +22 -4
- 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 +11 -11
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.js.map +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.min.mjs.map +1 -1
- package/dist/locale/de.mjs +11 -11
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/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 +26 -119
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +119 -26
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse-item.mjs +19 -90
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +90 -19
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/descriptions/index.mjs +2 -2
- package/es/components/descriptions/src/description.mjs +22 -127
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +127 -22
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +48 -321
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +321 -48
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +8 -36
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +36 -8
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +45 -392
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +392 -45
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +15 -15
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +103 -445
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +445 -103
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/mention/src/mention.mjs +1 -1
- package/es/components/mention/src/mention.vue.d.ts +1 -0
- package/es/components/mention/src/mention2.mjs +5 -3
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +17 -102
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +102 -17
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +66 -111
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +111 -66
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +6 -66
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +66 -6
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +83 -259
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +259 -83
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +1 -1
- package/es/components/scrollbar/src/bar.mjs +11 -64
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +64 -11
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/scrollbar/src/thumb.mjs +11 -130
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +130 -11
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/select/src/useSelect.mjs +8 -0
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/src/useSelect.mjs +8 -0
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +4 -4
- package/es/components/tooltip-v2/src/content.mjs +49 -111
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +111 -49
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +21 -78
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +78 -21
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/mask.mjs +19 -76
- package/es/components/tour/src/mask.mjs.map +1 -1
- package/es/components/tour/src/mask2.mjs +76 -19
- package/es/components/tour/src/mask2.mjs.map +1 -1
- package/es/components/tour/src/tour.mjs +69 -158
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +158 -69
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/transfer/index.mjs +2 -2
- package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +1 -1
- package/es/components/transfer/src/transfer.mjs +69 -161
- package/es/components/transfer/src/transfer.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +161 -69
- package/es/components/transfer/src/transfer2.mjs.map +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-dragger.mjs +11 -49
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +49 -11
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/components/visual-hidden/index.mjs +3 -3
- package/es/components/visual-hidden/src/visual-hidden.mjs +7 -35
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
- package/es/components/visual-hidden/src/visual-hidden2.mjs +35 -7
- package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
- package/es/index.mjs +15 -15
- package/es/locale/lang/de.mjs +10 -10
- package/es/locale/lang/de.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +27 -119
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +119 -27
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse-item.js +19 -90
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +90 -19
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/descriptions/index.js +2 -2
- package/lib/components/descriptions/src/description.js +22 -127
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +127 -22
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +49 -325
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +325 -49
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +8 -36
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +36 -8
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +46 -392
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +392 -46
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +15 -15
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +103 -444
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +444 -103
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/mention/src/mention.js +1 -1
- package/lib/components/mention/src/mention.vue.d.ts +1 -0
- package/lib/components/mention/src/mention2.js +5 -3
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +18 -102
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +102 -18
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +67 -111
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +111 -67
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +6 -66
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +66 -6
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +83 -258
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +258 -83
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/src/bar.js +11 -64
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +64 -11
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/scrollbar/src/thumb.js +11 -130
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +130 -11
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/select/src/useSelect.js +8 -0
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/src/useSelect.js +8 -0
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +4 -4
- package/lib/components/tooltip-v2/src/content.js +49 -111
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +111 -49
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +21 -78
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +78 -21
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger.js +12 -89
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +89 -12
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/mask.js +19 -76
- package/lib/components/tour/src/mask.js.map +1 -1
- package/lib/components/tour/src/mask2.js +76 -19
- package/lib/components/tour/src/mask2.js.map +1 -1
- package/lib/components/tour/src/tour.js +69 -157
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +157 -69
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/transfer/index.js +2 -2
- package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +1 -1
- package/lib/components/transfer/src/transfer.js +73 -161
- package/lib/components/transfer/src/transfer.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +161 -73
- package/lib/components/transfer/src/transfer2.js.map +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-dragger.js +12 -49
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +49 -12
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/components/visual-hidden/index.js +2 -2
- package/lib/components/visual-hidden/src/visual-hidden.js +7 -35
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
- package/lib/components/visual-hidden/src/visual-hidden2.js +35 -7
- package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
- package/lib/index.js +15 -15
- package/lib/locale/lang/de.js +10 -10
- package/lib/locale/lang/de.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description.mjs","sources":["../../../../../../packages/components/descriptions/src/description.
|
|
1
|
+
{"version":3,"file":"description.mjs","sources":["../../../../../../packages/components/descriptions/src/description.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Description from './description.vue'\n\nexport const descriptionProps = buildProps({\n /**\n * @description with or without border\n */\n border: Boolean,\n /**\n * @description numbers of `Descriptions Item` in one line\n */\n column: {\n type: Number,\n default: 3,\n },\n /**\n * @description direction of list\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description size of list\n */\n size: useSizeProp,\n /**\n * @description title text, display on the top left\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description extra text, display on the top right\n */\n extra: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type DescriptionProps = ExtractPropTypes<typeof descriptionProps>\nexport type DescriptionInstance = InstanceType<typeof Description>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,29 +1,134 @@
|
|
|
1
|
+
import { defineComponent, useSlots, provide, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createBlock } from 'vue';
|
|
1
2
|
import '../../../utils/index.mjs';
|
|
2
3
|
import '../../../hooks/index.mjs';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
4
|
+
import '../../form/index.mjs';
|
|
5
|
+
import ElDescriptionsRow from './descriptions-row2.mjs';
|
|
6
|
+
import { descriptionsKey } from './token.mjs';
|
|
7
|
+
import { descriptionProps } from './description.mjs';
|
|
8
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
10
|
+
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
11
|
+
import { flattedChildren } from '../../../utils/vue/vnode.mjs';
|
|
5
12
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
const __default__ = defineComponent({
|
|
14
|
+
name: "ElDescriptions"
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: descriptionProps,
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const ns = useNamespace("descriptions");
|
|
22
|
+
const descriptionsSize = useFormSize();
|
|
23
|
+
const slots = useSlots();
|
|
24
|
+
provide(descriptionsKey, props);
|
|
25
|
+
const descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)]);
|
|
26
|
+
const filledNode = (node, span, count, isLast = false) => {
|
|
27
|
+
if (!node.props) {
|
|
28
|
+
node.props = {};
|
|
29
|
+
}
|
|
30
|
+
if (span > count) {
|
|
31
|
+
node.props.span = count;
|
|
32
|
+
}
|
|
33
|
+
if (isLast) {
|
|
34
|
+
node.props.span = span;
|
|
35
|
+
}
|
|
36
|
+
return node;
|
|
37
|
+
};
|
|
38
|
+
const getRows = () => {
|
|
39
|
+
if (!slots.default)
|
|
40
|
+
return [];
|
|
41
|
+
const children = flattedChildren(slots.default()).filter((node) => {
|
|
42
|
+
var _a;
|
|
43
|
+
return ((_a = node == null ? void 0 : node.type) == null ? void 0 : _a.name) === "ElDescriptionsItem";
|
|
44
|
+
});
|
|
45
|
+
const rows = [];
|
|
46
|
+
let temp = [];
|
|
47
|
+
let count = props.column;
|
|
48
|
+
let totalSpan = 0;
|
|
49
|
+
const rowspanTemp = [];
|
|
50
|
+
children.forEach((node, index) => {
|
|
51
|
+
var _a, _b, _c;
|
|
52
|
+
const span = ((_a = node.props) == null ? void 0 : _a.span) || 1;
|
|
53
|
+
const rowspan = ((_b = node.props) == null ? void 0 : _b.rowspan) || 1;
|
|
54
|
+
const rowNo = rows.length;
|
|
55
|
+
rowspanTemp[rowNo] || (rowspanTemp[rowNo] = 0);
|
|
56
|
+
if (rowspan > 1) {
|
|
57
|
+
for (let i = 1; i < rowspan; i++) {
|
|
58
|
+
rowspanTemp[_c = rowNo + i] || (rowspanTemp[_c] = 0);
|
|
59
|
+
rowspanTemp[rowNo + i]++;
|
|
60
|
+
totalSpan++;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (rowspanTemp[rowNo] > 0) {
|
|
64
|
+
count -= rowspanTemp[rowNo];
|
|
65
|
+
rowspanTemp[rowNo] = 0;
|
|
66
|
+
}
|
|
67
|
+
if (index < children.length - 1) {
|
|
68
|
+
totalSpan += span > count ? count : span;
|
|
69
|
+
}
|
|
70
|
+
if (index === children.length - 1) {
|
|
71
|
+
const lastSpan = props.column - totalSpan % props.column;
|
|
72
|
+
temp.push(filledNode(node, lastSpan, count, true));
|
|
73
|
+
rows.push(temp);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (span < count) {
|
|
77
|
+
count -= span;
|
|
78
|
+
temp.push(node);
|
|
79
|
+
} else {
|
|
80
|
+
temp.push(filledNode(node, span, count));
|
|
81
|
+
rows.push(temp);
|
|
82
|
+
count = props.column;
|
|
83
|
+
temp = [];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
return rows;
|
|
87
|
+
};
|
|
88
|
+
return (_ctx, _cache) => {
|
|
89
|
+
return openBlock(), createElementBlock("div", {
|
|
90
|
+
class: normalizeClass(unref(descriptionKls))
|
|
91
|
+
}, [
|
|
92
|
+
_ctx.title || _ctx.extra || _ctx.$slots.title || _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: normalizeClass(unref(ns).e("header"))
|
|
95
|
+
}, [
|
|
96
|
+
createElementVNode("div", {
|
|
97
|
+
class: normalizeClass(unref(ns).e("title"))
|
|
98
|
+
}, [
|
|
99
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
100
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
101
|
+
])
|
|
102
|
+
], 2),
|
|
103
|
+
createElementVNode("div", {
|
|
104
|
+
class: normalizeClass(unref(ns).e("extra"))
|
|
105
|
+
}, [
|
|
106
|
+
renderSlot(_ctx.$slots, "extra", {}, () => [
|
|
107
|
+
createTextVNode(toDisplayString(_ctx.extra), 1)
|
|
108
|
+
])
|
|
109
|
+
], 2)
|
|
110
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
111
|
+
createElementVNode("div", {
|
|
112
|
+
class: normalizeClass(unref(ns).e("body"))
|
|
113
|
+
}, [
|
|
114
|
+
createElementVNode("table", {
|
|
115
|
+
class: normalizeClass([unref(ns).e("table"), unref(ns).is("bordered", _ctx.border)])
|
|
116
|
+
}, [
|
|
117
|
+
createElementVNode("tbody", null, [
|
|
118
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(getRows(), (row, _index) => {
|
|
119
|
+
return openBlock(), createBlock(ElDescriptionsRow, {
|
|
120
|
+
key: _index,
|
|
121
|
+
row
|
|
122
|
+
}, null, 8, ["row"]);
|
|
123
|
+
}), 128))
|
|
124
|
+
])
|
|
125
|
+
], 2)
|
|
126
|
+
], 2)
|
|
127
|
+
], 2);
|
|
128
|
+
};
|
|
25
129
|
}
|
|
26
130
|
});
|
|
131
|
+
var Descriptions = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "description.vue"]]);
|
|
27
132
|
|
|
28
|
-
export {
|
|
133
|
+
export { Descriptions as default };
|
|
29
134
|
//# sourceMappingURL=description2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description2.mjs","sources":["../../../../../../packages/components/descriptions/src/description.
|
|
1
|
+
{"version":3,"file":"description2.mjs","sources":["../../../../../../packages/components/descriptions/src/description.vue"],"sourcesContent":["<template>\n <div :class=\"descriptionKls\">\n <div\n v-if=\"title || extra || $slots.title || $slots.extra\"\n :class=\"ns.e('header')\"\n >\n <div :class=\"ns.e('title')\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div :class=\"ns.e('extra')\">\n <slot name=\"extra\">{{ extra }}</slot>\n </div>\n </div>\n\n <div :class=\"ns.e('body')\">\n <table :class=\"[ns.e('table'), ns.is('bordered', border)]\">\n <tbody>\n <template v-for=\"(row, _index) in getRows()\" :key=\"_index\">\n <el-descriptions-row :row=\"row\" />\n </template>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, useSlots } from 'vue'\nimport { flattedChildren } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport ElDescriptionsRow from './descriptions-row.vue'\nimport { descriptionsKey } from './token'\nimport { descriptionProps } from './description'\n\nimport type { IDescriptionsInject } from './descriptions.type'\nimport type { DescriptionItemVNode } from './description-item'\n\ndefineOptions({\n name: 'ElDescriptions',\n})\n\nconst props = defineProps(descriptionProps)\n\nconst ns = useNamespace('descriptions')\n\nconst descriptionsSize = useFormSize()\n\nconst slots = useSlots()\n\nprovide(descriptionsKey, props as IDescriptionsInject)\n\nconst descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)])\n\nconst filledNode = (\n node: DescriptionItemVNode,\n span: number,\n count: number,\n isLast = false\n) => {\n if (!node.props) {\n node.props = {}\n }\n if (span > count) {\n node.props.span = count\n }\n if (isLast) {\n // set the last span\n node.props.span = span\n }\n return node\n}\n\nconst getRows = () => {\n if (!slots.default) return []\n\n const children = flattedChildren(slots.default()).filter(\n (node): node is DescriptionItemVNode =>\n (node as any)?.type?.name === 'ElDescriptionsItem'\n )\n const rows: DescriptionItemVNode[][] = []\n let temp: DescriptionItemVNode[] = []\n let count = props.column\n let totalSpan = 0 // all spans number of item\n const rowspanTemp: number[] = [] // the number of row spans\n\n children.forEach((node, index) => {\n const span = node.props?.span || 1\n const rowspan = node.props?.rowspan || 1\n const rowNo = rows.length\n rowspanTemp[rowNo] ||= 0\n\n if (rowspan > 1) {\n for (let i = 1; i < rowspan; i++) {\n rowspanTemp[rowNo + i] ||= 0\n rowspanTemp[rowNo + i]++\n totalSpan++\n }\n }\n if (rowspanTemp[rowNo] > 0) {\n count -= rowspanTemp[rowNo]\n rowspanTemp[rowNo] = 0\n }\n if (index < children.length - 1) {\n totalSpan += span > count ? count : span\n }\n\n if (index === children.length - 1) {\n // calculate the last item span\n const lastSpan = props.column - (totalSpan % props.column)\n temp.push(filledNode(node, lastSpan, count, true))\n rows.push(temp)\n return\n }\n\n if (span < count) {\n count -= span\n temp.push(node)\n } else {\n temp.push(filledNode(node, span, count))\n rows.push(temp)\n count = props.column\n temp = []\n }\n })\n\n return rows\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;mCAsCc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,cAAc,CAAA,CAAA;AAEtC,IAAA,MAAM,mBAAmB,WAAY,EAAA,CAAA;AAErC,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAA,OAAA,CAAQ,iBAAiB,KAA4B,CAAA,CAAA;AAErD,IAAA,MAAM,cAAiB,GAAA,QAAA,CAAS,MAAM,CAAC,EAAG,CAAA,CAAA,EAAK,EAAA,EAAA,CAAG,CAAE,CAAA,gBAAA,CAAiB,KAAK,CAAC,CAAC,CAAA,CAAA;AAE5E,IAAA,MAAM,aAAa,CACjB,IAAA,EACA,IACA,EAAA,KAAA,EACA,SAAS,KACN,KAAA;AACH,MAAI,IAAA,CAAC,KAAK,KAAO,EAAA;AACf,QAAA,IAAA,CAAK,QAAQ,EAAC,CAAA;AAAA,OAChB;AACA,MAAA,IAAI,OAAO,KAAO,EAAA;AAChB,QAAA,IAAA,CAAK,MAAM,IAAO,GAAA,KAAA,CAAA;AAAA,OACpB;AACA,MAAA,IAAI,MAAQ,EAAA;AAEV,QAAA,IAAA,CAAK,MAAM,IAAO,GAAA,IAAA,CAAA;AAAA,OACpB;AACA,MAAO,OAAA,IAAA,CAAA;AAAA,KACT,CAAA;AAEA,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,IAAI,CAAC,KAAA,CAAM,OAAS;AAEpB,QAAA,OAAiB,EAAA,CAAA;AAAiC,MAAA,MAC/C,QACgB,GAAA,eAAe,CAAA,KAAA,CAAA,OAAA,EAAA,CAAA,CAAA,MAAA,CAAA,CAAA,IAAA,KAAA;AAAA,QAClC,IAAA,EAAA,CAAA;AACA,QAAA,WAAuC,GAAC,IAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,IAAA,CAAA,IAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,MAAA,oBAAA,CAAA;AACxC,OAAA,CAAA,CAAA;AACA,MAAA,aAAkB,EAAA,CAAA;AAClB,MAAA,IAAI,IAAY,GAAA,EAAA,CAAA;AAChB,MAAA,IAAA,oBAA+B,CAAA;AAE/B,MAAS,IAAA,SAAA,GAAA,CAAQ,CAAC;AAChB,MAAM,MAAA,WAAY,GAAA,EAAA,CAAA;AAClB,MAAM,QAAA,CAAA,OAAA,CAAA,CAAU,IAAK,EAAA,KAAA,KAAkB;AACvC,QAAA,IAAA,EAAM,QAAQ,CAAK;AACnB,QAAA,MAAA,IAAA,OAAiB,GAAM,IAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,KAAA,CAAA,CAAA;AAEvB,QAAA,gBAAiB,CAAA,CAAA,EAAA,GAAA,IAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAA,KAAA,CAAA,CAAA;AACf,QAAA,MAAA,KAAS,GAAI,IAAG,CAAI,MAAA,CAAA;AAClB,QAAY,WAAA,CAAA,KAAA,CAAA,KAAA,WAAe,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AAC3B,QAAA,IAAA,OAAA,GAAA,CAAA;AACA,UAAA,KAAA,IAAA,CAAA,GAAA,CAAA,EAAA,CAAA,GAAA,OAAA,EAAA,CAAA,EAAA,EAAA;AAAA,YACF,WAAA,CAAA,EAAA,GAAA,KAAA,GAAA,CAAA,CAAA,KAAA,WAAA,CAAA,EAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AAAA,YACF,WAAA,CAAA,KAAA,GAAA,CAAA,CAAA,EAAA,CAAA;AACA,YAAI,SAAA,EAAA,CAAY;AACd,WAAA;AACA,SAAA;AAAqB,QACvB,IAAA,WAAA,CAAA,KAAA,CAAA,GAAA,CAAA,EAAA;AACA,UAAI,KAAA,IAAA,WAAiB,CAAA,KAAA,CAAA,CAAS;AAC5B,UAAa,WAAA,CAAA,KAAA,CAAA;AAAuB,SACtC;AAEA,QAAI,IAAA,KAAA,GAAA,QAAmB,CAAA,MAAA,GAAA,CAAA,EAAY;AAEjC,UAAA,SAAiB,IAAA,IAAA,GAAA,KAAgB,GAAA,KAAA,GAAA,IAAA,CAAA;AACjC,SAAA;AACA,QAAA,IAAA,UAAc,QAAA,CAAA,MAAA,GAAA,CAAA,EAAA;AACd,UAAA,MAAA,QAAA,GAAA,KAAA,CAAA,MAAA,GAAA,SAAA,GAAA,KAAA,CAAA,MAAA,CAAA;AAAA,UACF,IAAA,CAAA,IAAA,CAAA,UAAA,CAAA,IAAA,EAAA,QAAA,EAAA,KAAA,EAAA,IAAA,CAAA,CAAA,CAAA;AAEA,UAAA,SAAW,CAAO,IAAA,CAAA,CAAA;AAChB,UAAS,OAAA;AACT,SAAA;AAAc,QAChB,IAAO,IAAA,GAAA,KAAA,EAAA;AACL,UAAA,KAAK,IAAK,IAAA,CAAA;AACV,UAAA,IAAA,CAAK,KAAK,IAAI,CAAA,CAAA;AACd,SAAA,MAAA;AACA,UAAA,IAAA,CAAA,IAAQ,CAAA,UAAA,CAAA,IAAA,EAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAAA,UACV,IAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA;AAAA,UACD,KAAA,GAAA,KAAA,CAAA,MAAA,CAAA;AAED,UAAO,IAAA,GAAA,EAAA,CAAA;AAAA,SACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import Form from './src/form2.mjs';
|
|
3
|
-
import FormItem from './src/form-
|
|
3
|
+
import FormItem from './src/form-item2.mjs';
|
|
4
4
|
export { formEmits, formMetaProps, formProps } from './src/form.mjs';
|
|
5
|
-
export { formItemProps, formItemValidateStates } from './src/form-
|
|
5
|
+
export { formItemProps, formItemValidateStates } from './src/form-item.mjs';
|
|
6
6
|
import './src/types.mjs';
|
|
7
7
|
export { formContextKey, formItemContextKey } from './src/constants.mjs';
|
|
8
8
|
import './src/hooks/index.mjs';
|
|
@@ -1,327 +1,54 @@
|
|
|
1
|
-
import
|
|
2
|
-
import AsyncValidator from 'async-validator';
|
|
3
|
-
import { castArray, clone } from 'lodash-unified';
|
|
4
|
-
import { refDebounced } from '@vueuse/core';
|
|
1
|
+
import '../../../constants/index.mjs';
|
|
5
2
|
import '../../../utils/index.mjs';
|
|
6
|
-
import '../../../
|
|
7
|
-
import '
|
|
8
|
-
import { formItemProps } from './form-item2.mjs';
|
|
9
|
-
import FormLabelWrap from './form-label-wrap.mjs';
|
|
10
|
-
import { formContextKey, formItemContextKey } from './constants.mjs';
|
|
11
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
12
|
-
import { useFormSize } from './hooks/use-form-common-props.mjs';
|
|
13
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
14
|
-
import { useId } from '../../../hooks/use-id/index.mjs';
|
|
15
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
16
|
-
import { isBoolean } from '../../../utils/types.mjs';
|
|
17
|
-
import { isString, isFunction } from '@vue/shared';
|
|
18
|
-
import { getProp } from '../../../utils/objects.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { componentSizes } from '../../../constants/size.mjs';
|
|
19
5
|
|
|
20
|
-
const
|
|
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
|
-
const formItemClasses = computed(() => [
|
|
65
|
-
ns.b(),
|
|
66
|
-
ns.m(_size.value),
|
|
67
|
-
ns.is("error", validateState.value === "error"),
|
|
68
|
-
ns.is("validating", validateState.value === "validating"),
|
|
69
|
-
ns.is("success", validateState.value === "success"),
|
|
70
|
-
ns.is("required", isRequired.value || props.required),
|
|
71
|
-
ns.is("no-asterisk", formContext == null ? void 0 : formContext.hideRequiredAsterisk),
|
|
72
|
-
(formContext == null ? void 0 : formContext.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
|
|
73
|
-
{
|
|
74
|
-
[ns.m("feedback")]: formContext == null ? void 0 : formContext.statusIcon,
|
|
75
|
-
[ns.m(`label-${labelPosition.value}`)]: labelPosition.value
|
|
76
|
-
}
|
|
77
|
-
]);
|
|
78
|
-
const _inlineMessage = computed(() => isBoolean(props.inlineMessage) ? props.inlineMessage : (formContext == null ? void 0 : formContext.inlineMessage) || false);
|
|
79
|
-
const validateClasses = computed(() => [
|
|
80
|
-
ns.e("error"),
|
|
81
|
-
{ [ns.em("error", "inline")]: _inlineMessage.value }
|
|
82
|
-
]);
|
|
83
|
-
const propString = computed(() => {
|
|
84
|
-
if (!props.prop)
|
|
85
|
-
return "";
|
|
86
|
-
return isString(props.prop) ? props.prop : props.prop.join(".");
|
|
87
|
-
});
|
|
88
|
-
const hasLabel = computed(() => {
|
|
89
|
-
return !!(props.label || slots.label);
|
|
90
|
-
});
|
|
91
|
-
const labelFor = computed(() => {
|
|
92
|
-
return props.for || (inputIds.value.length === 1 ? inputIds.value[0] : void 0);
|
|
93
|
-
});
|
|
94
|
-
const isGroup = computed(() => {
|
|
95
|
-
return !labelFor.value && hasLabel.value;
|
|
96
|
-
});
|
|
97
|
-
const isNested = !!parentFormItemContext;
|
|
98
|
-
const fieldValue = computed(() => {
|
|
99
|
-
const model = formContext == null ? void 0 : formContext.model;
|
|
100
|
-
if (!model || !props.prop) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
return getProp(model, props.prop).value;
|
|
104
|
-
});
|
|
105
|
-
const normalizedRules = computed(() => {
|
|
106
|
-
const { required } = props;
|
|
107
|
-
const rules = [];
|
|
108
|
-
if (props.rules) {
|
|
109
|
-
rules.push(...castArray(props.rules));
|
|
110
|
-
}
|
|
111
|
-
const formRules = formContext == null ? void 0 : formContext.rules;
|
|
112
|
-
if (formRules && props.prop) {
|
|
113
|
-
const _rules = getProp(formRules, props.prop).value;
|
|
114
|
-
if (_rules) {
|
|
115
|
-
rules.push(...castArray(_rules));
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
if (required !== void 0) {
|
|
119
|
-
const requiredRules = rules.map((rule, i) => [rule, i]).filter(([rule]) => Object.keys(rule).includes("required"));
|
|
120
|
-
if (requiredRules.length > 0) {
|
|
121
|
-
for (const [rule, i] of requiredRules) {
|
|
122
|
-
if (rule.required === required)
|
|
123
|
-
continue;
|
|
124
|
-
rules[i] = { ...rule, required };
|
|
125
|
-
}
|
|
126
|
-
} else {
|
|
127
|
-
rules.push({ required });
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return rules;
|
|
131
|
-
});
|
|
132
|
-
const validateEnabled = computed(() => normalizedRules.value.length > 0);
|
|
133
|
-
const getFilteredRule = (trigger) => {
|
|
134
|
-
const rules = normalizedRules.value;
|
|
135
|
-
return rules.filter((rule) => {
|
|
136
|
-
if (!rule.trigger || !trigger)
|
|
137
|
-
return true;
|
|
138
|
-
if (Array.isArray(rule.trigger)) {
|
|
139
|
-
return rule.trigger.includes(trigger);
|
|
140
|
-
} else {
|
|
141
|
-
return rule.trigger === trigger;
|
|
142
|
-
}
|
|
143
|
-
}).map(({ trigger: trigger2, ...rule }) => rule);
|
|
144
|
-
};
|
|
145
|
-
const isRequired = computed(() => normalizedRules.value.some((rule) => rule.required));
|
|
146
|
-
const shouldShowError = computed(() => {
|
|
147
|
-
var _a;
|
|
148
|
-
return validateStateDebounced.value === "error" && props.showMessage && ((_a = formContext == null ? void 0 : formContext.showMessage) != null ? _a : true);
|
|
149
|
-
});
|
|
150
|
-
const currentLabel = computed(() => `${props.label || ""}${(formContext == null ? void 0 : formContext.labelSuffix) || ""}`);
|
|
151
|
-
const setValidationState = (state) => {
|
|
152
|
-
validateState.value = state;
|
|
153
|
-
};
|
|
154
|
-
const onValidationFailed = (error) => {
|
|
155
|
-
var _a, _b;
|
|
156
|
-
const { errors, fields } = error;
|
|
157
|
-
if (!errors || !fields) {
|
|
158
|
-
console.error(error);
|
|
159
|
-
}
|
|
160
|
-
setValidationState("error");
|
|
161
|
-
validateMessage.value = errors ? (_b = (_a = errors == null ? void 0 : errors[0]) == null ? void 0 : _a.message) != null ? _b : `${props.prop} is required` : "";
|
|
162
|
-
formContext == null ? void 0 : formContext.emit("validate", props.prop, false, validateMessage.value);
|
|
163
|
-
};
|
|
164
|
-
const onValidationSucceeded = () => {
|
|
165
|
-
setValidationState("success");
|
|
166
|
-
formContext == null ? void 0 : formContext.emit("validate", props.prop, true, "");
|
|
167
|
-
};
|
|
168
|
-
const doValidate = async (rules) => {
|
|
169
|
-
const modelName = propString.value;
|
|
170
|
-
const validator = new AsyncValidator({
|
|
171
|
-
[modelName]: rules
|
|
172
|
-
});
|
|
173
|
-
return validator.validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => {
|
|
174
|
-
onValidationSucceeded();
|
|
175
|
-
return true;
|
|
176
|
-
}).catch((err) => {
|
|
177
|
-
onValidationFailed(err);
|
|
178
|
-
return Promise.reject(err);
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
|
-
const validate = async (trigger, callback) => {
|
|
182
|
-
if (isResettingField || !props.prop) {
|
|
183
|
-
return false;
|
|
184
|
-
}
|
|
185
|
-
const hasCallback = isFunction(callback);
|
|
186
|
-
if (!validateEnabled.value) {
|
|
187
|
-
callback == null ? void 0 : callback(false);
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
const rules = getFilteredRule(trigger);
|
|
191
|
-
if (rules.length === 0) {
|
|
192
|
-
callback == null ? void 0 : callback(true);
|
|
193
|
-
return true;
|
|
194
|
-
}
|
|
195
|
-
setValidationState("validating");
|
|
196
|
-
return doValidate(rules).then(() => {
|
|
197
|
-
callback == null ? void 0 : callback(true);
|
|
198
|
-
return true;
|
|
199
|
-
}).catch((err) => {
|
|
200
|
-
const { fields } = err;
|
|
201
|
-
callback == null ? void 0 : callback(false, fields);
|
|
202
|
-
return hasCallback ? false : Promise.reject(fields);
|
|
203
|
-
});
|
|
204
|
-
};
|
|
205
|
-
const clearValidate = () => {
|
|
206
|
-
setValidationState("");
|
|
207
|
-
validateMessage.value = "";
|
|
208
|
-
isResettingField = false;
|
|
209
|
-
};
|
|
210
|
-
const resetField = async () => {
|
|
211
|
-
const model = formContext == null ? void 0 : formContext.model;
|
|
212
|
-
if (!model || !props.prop)
|
|
213
|
-
return;
|
|
214
|
-
const computedValue = getProp(model, props.prop);
|
|
215
|
-
isResettingField = true;
|
|
216
|
-
computedValue.value = clone(initialValue);
|
|
217
|
-
await nextTick();
|
|
218
|
-
clearValidate();
|
|
219
|
-
isResettingField = false;
|
|
220
|
-
};
|
|
221
|
-
const addInputId = (id) => {
|
|
222
|
-
if (!inputIds.value.includes(id)) {
|
|
223
|
-
inputIds.value.push(id);
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
const removeInputId = (id) => {
|
|
227
|
-
inputIds.value = inputIds.value.filter((listId) => listId !== id);
|
|
228
|
-
};
|
|
229
|
-
watch(() => props.error, (val) => {
|
|
230
|
-
validateMessage.value = val || "";
|
|
231
|
-
setValidationState(val ? "error" : "");
|
|
232
|
-
}, { immediate: true });
|
|
233
|
-
watch(() => props.validateStatus, (val) => setValidationState(val || ""));
|
|
234
|
-
const context = reactive({
|
|
235
|
-
...toRefs(props),
|
|
236
|
-
$el: formItemRef,
|
|
237
|
-
size: _size,
|
|
238
|
-
validateState,
|
|
239
|
-
labelId,
|
|
240
|
-
inputIds,
|
|
241
|
-
isGroup,
|
|
242
|
-
hasLabel,
|
|
243
|
-
fieldValue,
|
|
244
|
-
addInputId,
|
|
245
|
-
removeInputId,
|
|
246
|
-
resetField,
|
|
247
|
-
clearValidate,
|
|
248
|
-
validate
|
|
249
|
-
});
|
|
250
|
-
provide(formItemContextKey, context);
|
|
251
|
-
onMounted(() => {
|
|
252
|
-
if (props.prop) {
|
|
253
|
-
formContext == null ? void 0 : formContext.addField(context);
|
|
254
|
-
initialValue = clone(fieldValue.value);
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
onBeforeUnmount(() => {
|
|
258
|
-
formContext == null ? void 0 : formContext.removeField(context);
|
|
259
|
-
});
|
|
260
|
-
expose({
|
|
261
|
-
size: _size,
|
|
262
|
-
validateMessage,
|
|
263
|
-
validateState,
|
|
264
|
-
validate,
|
|
265
|
-
clearValidate,
|
|
266
|
-
resetField
|
|
267
|
-
});
|
|
268
|
-
return (_ctx, _cache) => {
|
|
269
|
-
var _a;
|
|
270
|
-
return openBlock(), createElementBlock("div", {
|
|
271
|
-
ref_key: "formItemRef",
|
|
272
|
-
ref: formItemRef,
|
|
273
|
-
class: normalizeClass(unref(formItemClasses)),
|
|
274
|
-
role: unref(isGroup) ? "group" : void 0,
|
|
275
|
-
"aria-labelledby": unref(isGroup) ? unref(labelId) : void 0
|
|
276
|
-
}, [
|
|
277
|
-
createVNode(unref(FormLabelWrap), {
|
|
278
|
-
"is-auto-width": unref(labelStyle).width === "auto",
|
|
279
|
-
"update-all": ((_a = unref(formContext)) == null ? void 0 : _a.labelWidth) === "auto"
|
|
280
|
-
}, {
|
|
281
|
-
default: withCtx(() => [
|
|
282
|
-
unref(hasLabel) ? (openBlock(), createBlock(resolveDynamicComponent(unref(labelFor) ? "label" : "div"), {
|
|
283
|
-
key: 0,
|
|
284
|
-
id: unref(labelId),
|
|
285
|
-
for: unref(labelFor),
|
|
286
|
-
class: normalizeClass(unref(ns).e("label")),
|
|
287
|
-
style: normalizeStyle(unref(labelStyle))
|
|
288
|
-
}, {
|
|
289
|
-
default: withCtx(() => [
|
|
290
|
-
renderSlot(_ctx.$slots, "label", { label: unref(currentLabel) }, () => [
|
|
291
|
-
createTextVNode(toDisplayString(unref(currentLabel)), 1)
|
|
292
|
-
])
|
|
293
|
-
]),
|
|
294
|
-
_: 3
|
|
295
|
-
}, 8, ["id", "for", "class", "style"])) : createCommentVNode("v-if", true)
|
|
296
|
-
]),
|
|
297
|
-
_: 3
|
|
298
|
-
}, 8, ["is-auto-width", "update-all"]),
|
|
299
|
-
createElementVNode("div", {
|
|
300
|
-
class: normalizeClass(unref(ns).e("content")),
|
|
301
|
-
style: normalizeStyle(unref(contentStyle))
|
|
302
|
-
}, [
|
|
303
|
-
renderSlot(_ctx.$slots, "default"),
|
|
304
|
-
createVNode(TransitionGroup, {
|
|
305
|
-
name: `${unref(ns).namespace.value}-zoom-in-top`
|
|
306
|
-
}, {
|
|
307
|
-
default: withCtx(() => [
|
|
308
|
-
unref(shouldShowError) ? renderSlot(_ctx.$slots, "error", {
|
|
309
|
-
key: 0,
|
|
310
|
-
error: validateMessage.value
|
|
311
|
-
}, () => [
|
|
312
|
-
createElementVNode("div", {
|
|
313
|
-
class: normalizeClass(unref(validateClasses))
|
|
314
|
-
}, toDisplayString(validateMessage.value), 3)
|
|
315
|
-
]) : createCommentVNode("v-if", true)
|
|
316
|
-
]),
|
|
317
|
-
_: 3
|
|
318
|
-
}, 8, ["name"])
|
|
319
|
-
], 6)
|
|
320
|
-
], 10, ["role", "aria-labelledby"]);
|
|
321
|
-
};
|
|
6
|
+
const formItemValidateStates = [
|
|
7
|
+
"",
|
|
8
|
+
"error",
|
|
9
|
+
"validating",
|
|
10
|
+
"success"
|
|
11
|
+
];
|
|
12
|
+
const formItemProps = buildProps({
|
|
13
|
+
label: String,
|
|
14
|
+
labelWidth: {
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
labelPosition: {
|
|
19
|
+
type: String,
|
|
20
|
+
values: ["left", "right", "top", ""],
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
prop: {
|
|
24
|
+
type: definePropType([String, Array])
|
|
25
|
+
},
|
|
26
|
+
required: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: void 0
|
|
29
|
+
},
|
|
30
|
+
rules: {
|
|
31
|
+
type: definePropType([Object, Array])
|
|
32
|
+
},
|
|
33
|
+
error: String,
|
|
34
|
+
validateStatus: {
|
|
35
|
+
type: String,
|
|
36
|
+
values: formItemValidateStates
|
|
37
|
+
},
|
|
38
|
+
for: String,
|
|
39
|
+
inlineMessage: {
|
|
40
|
+
type: [String, Boolean],
|
|
41
|
+
default: ""
|
|
42
|
+
},
|
|
43
|
+
showMessage: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
type: String,
|
|
49
|
+
values: componentSizes
|
|
322
50
|
}
|
|
323
51
|
});
|
|
324
|
-
var FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "form-item.vue"]]);
|
|
325
52
|
|
|
326
|
-
export {
|
|
53
|
+
export { formItemProps, formItemValidateStates };
|
|
327
54
|
//# sourceMappingURL=form-item.mjs.map
|