element-plus 2.10.0 → 2.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +191 -163
- package/dist/index.full.min.js +16 -16
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +16 -16
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +191 -163
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +6 -6
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.js.map +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.min.mjs.map +1 -1
- package/dist/locale/ru.mjs +6 -6
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +370 -80
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +80 -370
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +65 -31
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +31 -65
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +32 -71
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +71 -32
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +134 -16
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +16 -134
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.d.ts +6 -0
- package/es/components/cascader/src/cascader.mjs +3 -0
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +12 -0
- package/es/components/cascader/src/cascader2.mjs +31 -26
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +64 -43
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +43 -64
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +28 -23
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +23 -28
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/date-picker/src/composables/use-range-picker.d.ts +2 -1
- package/es/components/date-picker/src/composables/use-range-picker.mjs +2 -0
- package/es/components/date-picker/src/composables/use-range-picker.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +2 -2
- package/es/components/date-picker/src/date-picker-com/panel-month-range.mjs +9 -2
- package/es/components/date-picker/src/date-picker-com/panel-month-range.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-month-range.vue.d.ts +3 -0
- package/es/components/date-picker/src/date-picker-com/panel-year-range.mjs +77 -107
- package/es/components/date-picker/src/date-picker-com/panel-year-range.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-year-range.vue.d.ts +3 -0
- package/es/components/date-picker/src/panel-utils.d.ts +12 -5
- package/es/components/date-picker/src/props/panel-date-range.d.ts +1 -1
- package/es/components/date-picker/src/props/panel-date-range.mjs +1 -2
- package/es/components/date-picker/src/props/panel-date-range.mjs.map +1 -1
- package/es/components/date-picker/src/props/panel-month-range.d.ts +1 -0
- package/es/components/date-picker/src/props/panel-year-range.d.ts +1 -0
- package/es/components/date-picker/src/props/shared.d.ts +1 -0
- package/es/components/date-picker/src/props/shared.mjs +1 -0
- package/es/components/date-picker/src/props/shared.mjs.map +1 -1
- package/es/components/date-picker/src/utils.d.ts +2 -1
- package/es/components/date-picker/src/utils.mjs +5 -5
- package/es/components/date-picker/src/utils.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +1 -1
- package/es/components/descriptions/src/descriptions-row.mjs +63 -6
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row2.mjs +6 -63
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +52 -11
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +11 -52
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item2.mjs +5 -3
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.mjs +161 -54
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form.vue.d.ts +7 -1
- package/es/components/form/src/form2.mjs +54 -159
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/form/src/types.d.ts +3 -1
- package/es/components/form/src/utils.mjs +3 -2
- package/es/components/form/src/utils.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +226 -68
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +68 -226
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +14 -14
- package/es/components/mention/src/mention-dropdown.mjs +166 -15
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +15 -166
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +114 -45
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +45 -114
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +32 -22
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +22 -32
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +62 -30
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +30 -62
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +7 -1
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +168 -42
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +42 -168
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/select/src/select2.mjs +45 -15
- package/es/components/select/src/select2.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/skeleton2.mjs +1 -1
- package/es/components/splitter-panel/style/css.d.ts +1 -1
- package/es/components/splitter-panel/style/css.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/content.mjs +110 -48
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +48 -110
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +130 -19
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +19 -130
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +3 -2
- package/es/hooks/use-focus-controller/index.mjs.map +1 -1
- package/es/index.d.ts +27 -1
- package/es/index.mjs +14 -14
- package/es/locale/lang/ru.mjs +5 -5
- package/es/locale/lang/ru.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/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +368 -79
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +79 -368
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +65 -32
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +32 -65
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +32 -71
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +71 -32
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +134 -17
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +17 -134
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/cascader/src/cascader.d.ts +6 -0
- package/lib/components/cascader/src/cascader.js +3 -0
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +12 -0
- package/lib/components/cascader/src/cascader2.js +37 -32
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +64 -43
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +43 -64
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +28 -25
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +25 -28
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/date-picker/src/composables/use-range-picker.d.ts +2 -1
- package/lib/components/date-picker/src/composables/use-range-picker.js +2 -0
- package/lib/components/date-picker/src/composables/use-range-picker.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +2 -2
- package/lib/components/date-picker/src/date-picker-com/panel-month-range.js +8 -1
- package/lib/components/date-picker/src/date-picker-com/panel-month-range.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-month-range.vue.d.ts +3 -0
- package/lib/components/date-picker/src/date-picker-com/panel-year-range.js +79 -109
- package/lib/components/date-picker/src/date-picker-com/panel-year-range.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-year-range.vue.d.ts +3 -0
- package/lib/components/date-picker/src/panel-utils.d.ts +12 -5
- package/lib/components/date-picker/src/props/panel-date-range.d.ts +1 -1
- package/lib/components/date-picker/src/props/panel-date-range.js +1 -2
- package/lib/components/date-picker/src/props/panel-date-range.js.map +1 -1
- package/lib/components/date-picker/src/props/panel-month-range.d.ts +1 -0
- package/lib/components/date-picker/src/props/panel-year-range.d.ts +1 -0
- package/lib/components/date-picker/src/props/shared.d.ts +1 -0
- package/lib/components/date-picker/src/props/shared.js +1 -0
- package/lib/components/date-picker/src/props/shared.js.map +1 -1
- package/lib/components/date-picker/src/utils.d.ts +2 -1
- package/lib/components/date-picker/src/utils.js +5 -5
- package/lib/components/date-picker/src/utils.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +1 -1
- package/lib/components/descriptions/src/descriptions-row.js +63 -6
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row2.js +6 -63
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +52 -11
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +11 -52
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item2.js +4 -2
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.js +160 -55
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form.vue.d.ts +7 -1
- package/lib/components/form/src/form2.js +55 -158
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/form/src/types.d.ts +3 -1
- package/lib/components/form/src/utils.js +3 -2
- package/lib/components/form/src/utils.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +225 -68
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +68 -225
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +14 -14
- package/lib/components/mention/src/mention-dropdown.js +166 -16
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +16 -166
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +114 -46
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +46 -114
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +32 -25
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +25 -32
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +62 -32
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +32 -62
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +7 -1
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +168 -44
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +44 -168
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/select/src/select2.js +44 -14
- package/lib/components/select/src/select2.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/skeleton2.js +1 -1
- package/lib/components/splitter-panel/style/css.d.ts +1 -1
- package/lib/components/splitter-panel/style/css.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/content.js +110 -48
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +48 -110
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +130 -21
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +21 -130
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +3 -2
- package/lib/hooks/use-focus-controller/index.js.map +1 -1
- package/lib/index.d.ts +27 -1
- package/lib/index.js +14 -14
- package/lib/locale/lang/ru.js +5 -5
- package/lib/locale/lang/ru.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-drawer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/drawer.scss +1 -1
- package/web-types.json +1 -1
|
@@ -7,11 +7,12 @@ type DayRange = [Dayjs | undefined, Dayjs | undefined];
|
|
|
7
7
|
export declare const isValidRange: (range: DayRange) => boolean;
|
|
8
8
|
type GetDefaultValueParams = {
|
|
9
9
|
lang: string;
|
|
10
|
+
step?: number;
|
|
10
11
|
unit: 'month' | 'year';
|
|
11
12
|
unlinkPanels: boolean;
|
|
12
13
|
};
|
|
13
14
|
export type DefaultValue = [Date, Date] | Date | undefined;
|
|
14
|
-
export declare const getDefaultValue: (defaultValue: DefaultValue, { lang, unit, unlinkPanels }: GetDefaultValueParams) => dayjs.Dayjs[];
|
|
15
|
+
export declare const getDefaultValue: (defaultValue: DefaultValue, { lang, step, unit, unlinkPanels }: GetDefaultValueParams) => dayjs.Dayjs[];
|
|
15
16
|
type Dimension = {
|
|
16
17
|
row: number;
|
|
17
18
|
column: number;
|
|
@@ -8,12 +8,12 @@ const isValidRange = (range) => {
|
|
|
8
8
|
const [left, right] = range;
|
|
9
9
|
return dayjs.isDayjs(left) && dayjs.isDayjs(right) && dayjs(left).isValid() && dayjs(right).isValid() && left.isSameOrBefore(right);
|
|
10
10
|
};
|
|
11
|
-
const getDefaultValue = (defaultValue, { lang, unit, unlinkPanels }) => {
|
|
11
|
+
const getDefaultValue = (defaultValue, { lang, step = 1, unit, unlinkPanels }) => {
|
|
12
12
|
let start;
|
|
13
13
|
if (isArray(defaultValue)) {
|
|
14
14
|
let [left, right] = defaultValue.map((d) => dayjs(d).locale(lang));
|
|
15
15
|
if (!unlinkPanels) {
|
|
16
|
-
right = left.add(
|
|
16
|
+
right = left.add(step, unit);
|
|
17
17
|
}
|
|
18
18
|
return [left, right];
|
|
19
19
|
} else if (defaultValue) {
|
|
@@ -22,7 +22,7 @@ const getDefaultValue = (defaultValue, { lang, unit, unlinkPanels }) => {
|
|
|
22
22
|
start = dayjs();
|
|
23
23
|
}
|
|
24
24
|
start = start.locale(lang);
|
|
25
|
-
return [start, start.add(
|
|
25
|
+
return [start, start.add(step, unit)];
|
|
26
26
|
};
|
|
27
27
|
const buildPickerTable = (dimension, rows, {
|
|
28
28
|
columnIndexOffset,
|
|
@@ -73,12 +73,12 @@ const buildPickerTable = (dimension, rows, {
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
const datesInMonth = (date, year, month, lang) => {
|
|
76
|
-
const firstDay = dayjs(
|
|
76
|
+
const firstDay = dayjs().locale(lang).startOf("month").month(month).year(year).hour(date.hour()).minute(date.minute()).second(date.second());
|
|
77
77
|
const numOfDays = firstDay.daysInMonth();
|
|
78
78
|
return rangeArr(numOfDays).map((n) => firstDay.add(n, "day").toDate());
|
|
79
79
|
};
|
|
80
80
|
const getValidDateOfMonth = (date, year, month, lang, disabledDate) => {
|
|
81
|
-
const _value = dayjs(
|
|
81
|
+
const _value = dayjs().year(year).month(month).startOf("month").hour(date.hour()).minute(date.minute()).second(date.second());
|
|
82
82
|
const _date = datesInMonth(date, year, month, lang).find((date2) => {
|
|
83
83
|
return !(disabledDate == null ? void 0 : disabledDate(date2));
|
|
84
84
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/date-picker/src/utils.ts"],"sourcesContent":["import dayjs from 'dayjs'\nimport { isArray, isString } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\n\nimport type { ComputedRef } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { DateCell } from './date-picker.type'\nimport type { DisabledDateType } from './props/shared'\n\ntype DayRange = [Dayjs | undefined, Dayjs | undefined]\n\nexport const isValidRange = (range: DayRange): boolean => {\n if (!isArray(range)) return false\n\n const [left, right] = range\n\n return (\n dayjs.isDayjs(left) &&\n dayjs.isDayjs(right) &&\n dayjs(left).isValid() &&\n dayjs(right).isValid() &&\n left.isSameOrBefore(right)\n )\n}\n\ntype GetDefaultValueParams = {\n lang: string\n unit: 'month' | 'year'\n unlinkPanels: boolean\n}\n\nexport type DefaultValue = [Date, Date] | Date | undefined\n\nexport const getDefaultValue = (\n defaultValue: DefaultValue,\n { lang, unit, unlinkPanels }: GetDefaultValueParams\n) => {\n let start: Dayjs\n\n if (isArray(defaultValue)) {\n let [left, right] = defaultValue.map((d) => dayjs(d).locale(lang))\n if (!unlinkPanels) {\n right = left.add(1, unit)\n }\n return [left, right]\n } else if (defaultValue) {\n start = dayjs(defaultValue)\n } else {\n start = dayjs()\n }\n start = start.locale(lang)\n return [start, start.add(1, unit)]\n}\n\ntype Dimension = {\n row: number\n column: number\n}\n\ntype BuildPickerTableMetadata = {\n startDate?: Dayjs | null\n unit: 'month' | 'day'\n columnIndexOffset: number\n now: Dayjs\n nextEndDate: Dayjs | null\n relativeDateGetter: (index: number) => Dayjs\n setCellMetadata?: (\n cell: DateCell,\n dimension: { rowIndex: number; columnIndex: number }\n ) => void\n setRowMetadata?: (row: DateCell[]) => void\n}\n\nexport const buildPickerTable = (\n dimension: Dimension,\n rows: DateCell[][],\n {\n columnIndexOffset,\n startDate,\n nextEndDate,\n now,\n unit,\n relativeDateGetter,\n setCellMetadata,\n setRowMetadata,\n }: BuildPickerTableMetadata\n) => {\n for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) {\n const row = rows[rowIndex]\n for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) {\n let cell = row[columnIndex + columnIndexOffset]\n if (!cell) {\n cell = {\n row: rowIndex,\n column: columnIndex,\n type: 'normal',\n inRange: false,\n start: false,\n end: false,\n }\n }\n const index = rowIndex * dimension.column + columnIndex\n const nextStartDate = relativeDateGetter(index)\n cell.dayjs = nextStartDate\n cell.date = nextStartDate.toDate()\n cell.timestamp = nextStartDate.valueOf()\n cell.type = 'normal'\n\n cell.inRange =\n !!(\n startDate &&\n nextStartDate.isSameOrAfter(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrBefore(nextEndDate, unit)\n ) ||\n !!(\n startDate &&\n nextStartDate.isSameOrBefore(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrAfter(nextEndDate, unit)\n )\n\n if (startDate?.isSameOrAfter(nextEndDate)) {\n cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n cell.end = startDate && nextStartDate.isSame(startDate, unit)\n } else {\n cell.start = !!startDate && nextStartDate.isSame(startDate, unit)\n cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n }\n\n const isToday = nextStartDate.isSame(now, unit)\n\n if (isToday) {\n cell.type = 'today'\n }\n setCellMetadata?.(cell, { rowIndex, columnIndex })\n row[columnIndex + columnIndexOffset] = cell\n }\n setRowMetadata?.(row)\n }\n}\n\nexport const datesInMonth = (\n date: Dayjs,\n year: number,\n month: number,\n lang: string\n) => {\n const firstDay = dayjs(date).locale(lang).month(month).year(year)\n const numOfDays = firstDay.daysInMonth()\n return rangeArr(numOfDays).map((n) => firstDay.add(n, 'day').toDate())\n}\n\nexport const getValidDateOfMonth = (\n date: Dayjs,\n year: number,\n month: number,\n lang: string,\n disabledDate?: DisabledDateType\n) => {\n const _value = dayjs(date).year(year).month(month)\n const _date = datesInMonth(date, year, month, lang).find((date) => {\n return !disabledDate?.(date)\n })\n if (_date) {\n return dayjs(_date).locale(lang)\n }\n return _value.locale(lang)\n}\n\nexport const getValidDateOfYear = (\n value: Dayjs,\n lang: string,\n disabledDate?: DisabledDateType\n) => {\n const year = value.year()\n if (!disabledDate?.(value.toDate())) {\n return value.locale(lang)\n }\n const month = value.month()\n if (!datesInMonth(value, year, month, lang).every(disabledDate)) {\n return getValidDateOfMonth(value, year, month, lang, disabledDate)\n }\n for (let i = 0; i < 12; i++) {\n if (!datesInMonth(value, year, i, lang).every(disabledDate)) {\n return getValidDateOfMonth(value, year, i, lang, disabledDate)\n }\n }\n return value\n}\n\nexport const correctlyParseUserInput = (\n value: string | Dayjs | Dayjs[],\n format: string,\n lang: string,\n defaultFormat: ComputedRef<boolean>\n): Dayjs | Dayjs[] => {\n if (isArray(value)) {\n return value.map(\n (v) => correctlyParseUserInput(v, format, lang, defaultFormat) as Dayjs\n )\n }\n if (isString(value)) {\n const dayjsValue = defaultFormat.value ? dayjs(value) : dayjs(value, format)\n if (!dayjsValue.isValid()) {\n // return directly if not valid\n return dayjsValue\n }\n }\n return dayjs(value, format).locale(lang)\n}\n"],"names":[],"mappings":";;;;AAGY,MAAC,YAAY,GAAG,CAAC,KAAK,KAAK;AACvC,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;AACrB,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC;AAC9B,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,C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AC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACjF,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE;AAC/B,MAAM,OAAO,UAAU,CAAC;AACxB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3C;;;;"}
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/date-picker/src/utils.ts"],"sourcesContent":["import dayjs from 'dayjs'\nimport { isArray, isString } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\n\nimport type { ComputedRef } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { DateCell } from './date-picker.type'\nimport type { DisabledDateType } from './props/shared'\n\ntype DayRange = [Dayjs | undefined, Dayjs | undefined]\n\nexport const isValidRange = (range: DayRange): boolean => {\n if (!isArray(range)) return false\n\n const [left, right] = range\n\n return (\n dayjs.isDayjs(left) &&\n dayjs.isDayjs(right) &&\n dayjs(left).isValid() &&\n dayjs(right).isValid() &&\n left.isSameOrBefore(right)\n )\n}\n\ntype GetDefaultValueParams = {\n lang: string\n step?: number\n unit: 'month' | 'year'\n unlinkPanels: boolean\n}\n\nexport type DefaultValue = [Date, Date] | Date | undefined\n\nexport const getDefaultValue = (\n defaultValue: DefaultValue,\n { lang, step = 1, unit, unlinkPanels }: GetDefaultValueParams\n) => {\n let start: Dayjs\n\n if (isArray(defaultValue)) {\n let [left, right] = defaultValue.map((d) => dayjs(d).locale(lang))\n if (!unlinkPanels) {\n right = left.add(step, unit)\n }\n return [left, right]\n } else if (defaultValue) {\n start = dayjs(defaultValue)\n } else {\n start = dayjs()\n }\n start = start.locale(lang)\n return [start, start.add(step, unit)]\n}\n\ntype Dimension = {\n row: number\n column: number\n}\n\ntype BuildPickerTableMetadata = {\n startDate?: Dayjs | null\n unit: 'month' | 'day'\n columnIndexOffset: number\n now: Dayjs\n nextEndDate: Dayjs | null\n relativeDateGetter: (index: number) => Dayjs\n setCellMetadata?: (\n cell: DateCell,\n dimension: { rowIndex: number; columnIndex: number }\n ) => void\n setRowMetadata?: (row: DateCell[]) => void\n}\n\nexport const buildPickerTable = (\n dimension: Dimension,\n rows: DateCell[][],\n {\n columnIndexOffset,\n startDate,\n nextEndDate,\n now,\n unit,\n relativeDateGetter,\n setCellMetadata,\n setRowMetadata,\n }: BuildPickerTableMetadata\n) => {\n for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) {\n const row = rows[rowIndex]\n for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) {\n let cell = row[columnIndex + columnIndexOffset]\n if (!cell) {\n cell = {\n row: rowIndex,\n column: columnIndex,\n type: 'normal',\n inRange: false,\n start: false,\n end: false,\n }\n }\n const index = rowIndex * dimension.column + columnIndex\n const nextStartDate = relativeDateGetter(index)\n cell.dayjs = nextStartDate\n cell.date = nextStartDate.toDate()\n cell.timestamp = nextStartDate.valueOf()\n cell.type = 'normal'\n\n cell.inRange =\n !!(\n startDate &&\n nextStartDate.isSameOrAfter(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrBefore(nextEndDate, unit)\n ) ||\n !!(\n startDate &&\n nextStartDate.isSameOrBefore(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrAfter(nextEndDate, unit)\n )\n\n if (startDate?.isSameOrAfter(nextEndDate)) {\n cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n cell.end = startDate && nextStartDate.isSame(startDate, unit)\n } else {\n cell.start = !!startDate && nextStartDate.isSame(startDate, unit)\n cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n }\n\n const isToday = nextStartDate.isSame(now, unit)\n\n if (isToday) {\n cell.type = 'today'\n }\n setCellMetadata?.(cell, { rowIndex, columnIndex })\n row[columnIndex + columnIndexOffset] = cell\n }\n setRowMetadata?.(row)\n }\n}\n\nexport const datesInMonth = (\n date: Dayjs,\n year: number,\n month: number,\n lang: string\n) => {\n const firstDay = dayjs()\n .locale(lang)\n .startOf('month')\n .month(month)\n .year(year)\n .hour(date.hour())\n .minute(date.minute())\n .second(date.second())\n\n const numOfDays = firstDay.daysInMonth()\n return rangeArr(numOfDays).map((n) => firstDay.add(n, 'day').toDate())\n}\n\nexport const getValidDateOfMonth = (\n date: Dayjs,\n year: number,\n month: number,\n lang: string,\n disabledDate?: DisabledDateType\n) => {\n const _value = dayjs()\n .year(year)\n .month(month)\n .startOf('month')\n .hour(date.hour())\n .minute(date.minute())\n .second(date.second())\n const _date = datesInMonth(date, year, month, lang).find((date) => {\n return !disabledDate?.(date)\n })\n if (_date) {\n return dayjs(_date).locale(lang)\n }\n return _value.locale(lang)\n}\n\nexport const getValidDateOfYear = (\n value: Dayjs,\n lang: string,\n disabledDate?: DisabledDateType\n) => {\n const year = value.year()\n if (!disabledDate?.(value.toDate())) {\n return value.locale(lang)\n }\n const month = value.month()\n if (!datesInMonth(value, year, month, lang).every(disabledDate)) {\n return getValidDateOfMonth(value, year, month, lang, disabledDate)\n }\n for (let i = 0; i < 12; i++) {\n if (!datesInMonth(value, year, i, lang).every(disabledDate)) {\n return getValidDateOfMonth(value, year, i, lang, disabledDate)\n }\n }\n return value\n}\n\nexport const correctlyParseUserInput = (\n value: string | Dayjs | Dayjs[],\n format: string,\n lang: string,\n defaultFormat: ComputedRef<boolean>\n): Dayjs | Dayjs[] => {\n if (isArray(value)) {\n return value.map(\n (v) => correctlyParseUserInput(v, format, lang, defaultFormat) as Dayjs\n )\n }\n if (isString(value)) {\n const dayjsValue = defaultFormat.value ? dayjs(value) : dayjs(value, format)\n if (!dayjsValue.isValid()) {\n // return directly if not valid\n return dayjsValue\n }\n }\n return dayjs(value, format).locale(lang)\n}\n"],"names":[],"mappings":";;;;AAGY,MAAC,YAAY,GAAG,CAAC,KAAK,KAAK;AACvC,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;AACrB,I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AC,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;AACrE,KAAK;AACL,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf,EAAE;AACU,MAAC,uBAAuB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,KAAK;AAC/E,EAAE,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;AACtB,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,uBAAuB,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;AACrF,GAAG;AACH,EAAE,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AACvB,IAAI,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACjF,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE;AAC/B,MAAM,OAAO,UAAU,CAAC;AACxB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3C;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, useSlots, provide, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createBlock } from 'vue';
|
|
2
|
-
import ElDescriptionsRow from './descriptions-
|
|
2
|
+
import ElDescriptionsRow from './descriptions-row.mjs';
|
|
3
3
|
import { descriptionsKey } from './token.mjs';
|
|
4
4
|
import { descriptionProps } from './description.mjs';
|
|
5
5
|
import { COMPONENT_NAME } from './constants.mjs';
|
|
@@ -1,11 +1,68 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, inject, unref, openBlock, createElementBlock, Fragment, createElementVNode, renderList, createBlock, createVNode } from 'vue';
|
|
2
|
+
import ElDescriptionsCell from './descriptions-cell.mjs';
|
|
3
|
+
import { descriptionsKey } from './token.mjs';
|
|
4
|
+
import { descriptionsRowProps } from './descriptions-row2.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
2
6
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
const __default__ = defineComponent({
|
|
8
|
+
name: "ElDescriptionsRow"
|
|
9
|
+
});
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
+
...__default__,
|
|
12
|
+
props: descriptionsRowProps,
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const descriptions = inject(descriptionsKey, {});
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
17
|
+
createElementVNode("tr", null, [
|
|
18
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
|
|
19
|
+
return openBlock(), createBlock(unref(ElDescriptionsCell), {
|
|
20
|
+
key: `tr1-${_index}`,
|
|
21
|
+
cell,
|
|
22
|
+
tag: "th",
|
|
23
|
+
type: "label"
|
|
24
|
+
}, null, 8, ["cell"]);
|
|
25
|
+
}), 128))
|
|
26
|
+
]),
|
|
27
|
+
createElementVNode("tr", null, [
|
|
28
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
|
|
29
|
+
return openBlock(), createBlock(unref(ElDescriptionsCell), {
|
|
30
|
+
key: `tr2-${_index}`,
|
|
31
|
+
cell,
|
|
32
|
+
tag: "td",
|
|
33
|
+
type: "content"
|
|
34
|
+
}, null, 8, ["cell"]);
|
|
35
|
+
}), 128))
|
|
36
|
+
])
|
|
37
|
+
], 64)) : (openBlock(), createElementBlock("tr", { key: 1 }, [
|
|
38
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
|
|
39
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
40
|
+
key: `tr3-${_index}`
|
|
41
|
+
}, [
|
|
42
|
+
unref(descriptions).border ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
43
|
+
createVNode(unref(ElDescriptionsCell), {
|
|
44
|
+
cell,
|
|
45
|
+
tag: "td",
|
|
46
|
+
type: "label"
|
|
47
|
+
}, null, 8, ["cell"]),
|
|
48
|
+
createVNode(unref(ElDescriptionsCell), {
|
|
49
|
+
cell,
|
|
50
|
+
tag: "td",
|
|
51
|
+
type: "content"
|
|
52
|
+
}, null, 8, ["cell"])
|
|
53
|
+
], 64)) : (openBlock(), createBlock(unref(ElDescriptionsCell), {
|
|
54
|
+
key: 1,
|
|
55
|
+
cell,
|
|
56
|
+
tag: "td",
|
|
57
|
+
type: "both"
|
|
58
|
+
}, null, 8, ["cell"]))
|
|
59
|
+
], 64);
|
|
60
|
+
}), 128))
|
|
61
|
+
]));
|
|
62
|
+
};
|
|
7
63
|
}
|
|
8
64
|
});
|
|
65
|
+
var ElDescriptionsRow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "descriptions-row.vue"]]);
|
|
9
66
|
|
|
10
|
-
export {
|
|
67
|
+
export { ElDescriptionsRow as default };
|
|
11
68
|
//# sourceMappingURL=descriptions-row.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptions-row.mjs","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.
|
|
1
|
+
{"version":3,"file":"descriptions-row.mjs","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.vue"],"sourcesContent":["<template>\n <template v-if=\"descriptions.direction === 'vertical'\">\n <tr>\n <template v-for=\"(cell, _index) in row\" :key=\"`tr1-${_index}`\">\n <el-descriptions-cell :cell=\"cell\" tag=\"th\" type=\"label\" />\n </template>\n </tr>\n <tr>\n <template v-for=\"(cell, _index) in row\" :key=\"`tr2-${_index}`\">\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"content\" />\n </template>\n </tr>\n </template>\n <tr v-else>\n <template v-for=\"(cell, _index) in row\" :key=\"`tr3-${_index}`\">\n <template v-if=\"descriptions.border\">\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"label\" />\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"content\" />\n </template>\n <el-descriptions-cell v-else :cell=\"cell\" tag=\"td\" type=\"both\" />\n </template>\n </tr>\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject } from 'vue'\n\nimport ElDescriptionsCell from './descriptions-cell'\nimport { descriptionsKey } from './token'\nimport { descriptionsRowProps } from './descriptions-row'\n\nimport type { IDescriptionsInject } from './descriptions.type'\n\ndefineOptions({\n name: 'ElDescriptionsRow',\n})\n\ndefineProps(descriptionsRowProps)\n\nconst descriptions = inject(descriptionsKey, {} as IDescriptionsInject)\n</script>\n"],"names":[],"mappings":";;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,mBAAA;AACR,CAAA,CAAA,CAAA;;;;;AAIA,IAAA,MAAM,YAAe,GAAA,MAAA,CAAO,eAAiB,EAAA,EAAyB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,68 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import ElDescriptionsCell from './descriptions-cell.mjs';
|
|
3
|
-
import { descriptionsKey } from './token.mjs';
|
|
4
|
-
import { descriptionsRowProps } from './descriptions-row.mjs';
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
1
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
6
2
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
...__default__,
|
|
12
|
-
props: descriptionsRowProps,
|
|
13
|
-
setup(__props) {
|
|
14
|
-
const descriptions = inject(descriptionsKey, {});
|
|
15
|
-
return (_ctx, _cache) => {
|
|
16
|
-
return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
17
|
-
createElementVNode("tr", null, [
|
|
18
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
|
|
19
|
-
return openBlock(), createBlock(unref(ElDescriptionsCell), {
|
|
20
|
-
key: `tr1-${_index}`,
|
|
21
|
-
cell,
|
|
22
|
-
tag: "th",
|
|
23
|
-
type: "label"
|
|
24
|
-
}, null, 8, ["cell"]);
|
|
25
|
-
}), 128))
|
|
26
|
-
]),
|
|
27
|
-
createElementVNode("tr", null, [
|
|
28
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
|
|
29
|
-
return openBlock(), createBlock(unref(ElDescriptionsCell), {
|
|
30
|
-
key: `tr2-${_index}`,
|
|
31
|
-
cell,
|
|
32
|
-
tag: "td",
|
|
33
|
-
type: "content"
|
|
34
|
-
}, null, 8, ["cell"]);
|
|
35
|
-
}), 128))
|
|
36
|
-
])
|
|
37
|
-
], 64)) : (openBlock(), createElementBlock("tr", { key: 1 }, [
|
|
38
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
|
|
39
|
-
return openBlock(), createElementBlock(Fragment, {
|
|
40
|
-
key: `tr3-${_index}`
|
|
41
|
-
}, [
|
|
42
|
-
unref(descriptions).border ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
43
|
-
createVNode(unref(ElDescriptionsCell), {
|
|
44
|
-
cell,
|
|
45
|
-
tag: "td",
|
|
46
|
-
type: "label"
|
|
47
|
-
}, null, 8, ["cell"]),
|
|
48
|
-
createVNode(unref(ElDescriptionsCell), {
|
|
49
|
-
cell,
|
|
50
|
-
tag: "td",
|
|
51
|
-
type: "content"
|
|
52
|
-
}, null, 8, ["cell"])
|
|
53
|
-
], 64)) : (openBlock(), createBlock(unref(ElDescriptionsCell), {
|
|
54
|
-
key: 1,
|
|
55
|
-
cell,
|
|
56
|
-
tag: "td",
|
|
57
|
-
type: "both"
|
|
58
|
-
}, null, 8, ["cell"]))
|
|
59
|
-
], 64);
|
|
60
|
-
}), 128))
|
|
61
|
-
]));
|
|
62
|
-
};
|
|
3
|
+
const descriptionsRowProps = buildProps({
|
|
4
|
+
row: {
|
|
5
|
+
type: definePropType(Array),
|
|
6
|
+
default: () => []
|
|
63
7
|
}
|
|
64
8
|
});
|
|
65
|
-
var ElDescriptionsRow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "descriptions-row.vue"]]);
|
|
66
9
|
|
|
67
|
-
export {
|
|
10
|
+
export { descriptionsRowProps };
|
|
68
11
|
//# sourceMappingURL=descriptions-row2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptions-row2.mjs","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.
|
|
1
|
+
{"version":3,"file":"descriptions-row2.mjs","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { DescriptionItemVNode } from './description-item'\n\nexport const descriptionsRowProps = buildProps({\n row: {\n type: definePropType<DescriptionItemVNode[]>(Array),\n default: () => [],\n },\n} as const)\n"],"names":[],"mappings":";;AACY,MAAC,oBAAoB,GAAG,UAAU,CAAC;AAC/C,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTooltipTriggerProps } from '../../tooltip/src/trigger.mjs';
|
|
2
|
-
import { roleTypes } from '../../popper/src/
|
|
2
|
+
import { roleTypes } from '../../popper/src/popper2.mjs';
|
|
3
3
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
4
4
|
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
|
5
5
|
import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Empty from './src/
|
|
2
|
-
export { emptyProps } from './src/
|
|
1
|
+
import Empty from './src/empty.mjs';
|
|
2
|
+
export { emptyProps } from './src/empty2.mjs';
|
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
4
4
|
|
|
5
5
|
const ElEmpty = withInstall(Empty);
|
|
@@ -1,16 +1,57 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, createVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
|
+
import ImgEmpty from './img-empty.mjs';
|
|
3
|
+
import { emptyProps } from './empty2.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
2
8
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const __default__ = defineComponent({
|
|
10
|
+
name: "ElEmpty"
|
|
11
|
+
});
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: emptyProps,
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const { t } = useLocale();
|
|
18
|
+
const ns = useNamespace("empty");
|
|
19
|
+
const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
|
|
20
|
+
const imageStyle = computed(() => ({
|
|
21
|
+
width: addUnit(props.imageSize)
|
|
22
|
+
}));
|
|
23
|
+
return (_ctx, _cache) => {
|
|
24
|
+
return openBlock(), createElementBlock("div", {
|
|
25
|
+
class: normalizeClass(unref(ns).b())
|
|
26
|
+
}, [
|
|
27
|
+
createElementVNode("div", {
|
|
28
|
+
class: normalizeClass(unref(ns).e("image")),
|
|
29
|
+
style: normalizeStyle(unref(imageStyle))
|
|
30
|
+
}, [
|
|
31
|
+
_ctx.image ? (openBlock(), createElementBlock("img", {
|
|
32
|
+
key: 0,
|
|
33
|
+
src: _ctx.image,
|
|
34
|
+
ondragstart: "return false"
|
|
35
|
+
}, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
|
|
36
|
+
createVNode(ImgEmpty)
|
|
37
|
+
])
|
|
38
|
+
], 6),
|
|
39
|
+
createElementVNode("div", {
|
|
40
|
+
class: normalizeClass(unref(ns).e("description"))
|
|
41
|
+
}, [
|
|
42
|
+
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
|
|
43
|
+
], 2),
|
|
44
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: normalizeClass(unref(ns).e("bottom"))
|
|
47
|
+
}, [
|
|
48
|
+
renderSlot(_ctx.$slots, "default")
|
|
49
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
50
|
+
], 2);
|
|
51
|
+
};
|
|
12
52
|
}
|
|
13
53
|
});
|
|
54
|
+
var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "empty.vue"]]);
|
|
14
55
|
|
|
15
|
-
export {
|
|
56
|
+
export { Empty as default };
|
|
16
57
|
//# sourceMappingURL=empty.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.
|
|
1
|
+
{"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('image')\" :style=\"imageStyle\">\n <img v-if=\"image\" :src=\"image\" ondragstart=\"return false\" />\n <slot v-else name=\"image\">\n <img-empty />\n </slot>\n </div>\n <div :class=\"ns.e('description')\">\n <slot v-if=\"$slots.description\" name=\"description\" />\n <p v-else>{{ emptyDescription }}</p>\n </div>\n <div v-if=\"$slots.default\" :class=\"ns.e('bottom')\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { addUnit } from '@element-plus/utils'\nimport ImgEmpty from './img-empty.vue'\nimport { emptyProps } from './empty'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElEmpty',\n})\n\nconst props = defineProps(emptyProps)\n\nconst { t } = useLocale()\nconst ns = useNamespace('empty')\nconst emptyDescription = computed(\n () => props.description || t('el.table.emptyText')\n)\nconst imageStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.imageSize),\n}))\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;mCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,gBAAmB,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,WAAA,IAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA;AAAA,IAAA,MACjB,UAAqB,GAAA,QAAA,CAAA,OAAsB;AAAA,MACnD,KAAA,EAAA,OAAA,CAAA,KAAA,CAAA,SAAA,CAAA;AACA,KAAM,CAAA,CAAA,CAAA;AAA4C,IAChD,OAAA,CAAA,IAAe,EAAA,MAAA,KAAe;AAAA,MAC9B,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,57 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import ImgEmpty from './img-empty.mjs';
|
|
3
|
-
import { emptyProps } from './empty.mjs';
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
8
2
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const ns = useNamespace("empty");
|
|
19
|
-
const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
|
|
20
|
-
const imageStyle = computed(() => ({
|
|
21
|
-
width: addUnit(props.imageSize)
|
|
22
|
-
}));
|
|
23
|
-
return (_ctx, _cache) => {
|
|
24
|
-
return openBlock(), createElementBlock("div", {
|
|
25
|
-
class: normalizeClass(unref(ns).b())
|
|
26
|
-
}, [
|
|
27
|
-
createElementVNode("div", {
|
|
28
|
-
class: normalizeClass(unref(ns).e("image")),
|
|
29
|
-
style: normalizeStyle(unref(imageStyle))
|
|
30
|
-
}, [
|
|
31
|
-
_ctx.image ? (openBlock(), createElementBlock("img", {
|
|
32
|
-
key: 0,
|
|
33
|
-
src: _ctx.image,
|
|
34
|
-
ondragstart: "return false"
|
|
35
|
-
}, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
|
|
36
|
-
createVNode(ImgEmpty)
|
|
37
|
-
])
|
|
38
|
-
], 6),
|
|
39
|
-
createElementVNode("div", {
|
|
40
|
-
class: normalizeClass(unref(ns).e("description"))
|
|
41
|
-
}, [
|
|
42
|
-
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
|
|
43
|
-
], 2),
|
|
44
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
45
|
-
key: 0,
|
|
46
|
-
class: normalizeClass(unref(ns).e("bottom"))
|
|
47
|
-
}, [
|
|
48
|
-
renderSlot(_ctx.$slots, "default")
|
|
49
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
50
|
-
], 2);
|
|
51
|
-
};
|
|
3
|
+
const emptyProps = buildProps({
|
|
4
|
+
image: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: ""
|
|
7
|
+
},
|
|
8
|
+
imageSize: Number,
|
|
9
|
+
description: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
52
12
|
}
|
|
53
13
|
});
|
|
54
|
-
var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "empty.vue"]]);
|
|
55
14
|
|
|
56
|
-
export {
|
|
15
|
+
export { emptyProps };
|
|
57
16
|
//# sourceMappingURL=empty2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.
|
|
1
|
+
{"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const emptyProps = buildProps({\n /**\n * @description image URL of empty\n */\n image: {\n type: String,\n default: '',\n },\n /**\n * @description image size (width) of empty\n */\n imageSize: Number,\n /**\n * @description description of empty\n */\n description: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type EmptyProps = ExtractPropTypes<typeof emptyProps>\n"],"names":[],"mappings":";;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Form from './src/
|
|
1
|
+
import Form from './src/form.mjs';
|
|
2
2
|
import FormItem from './src/form-item2.mjs';
|
|
3
|
-
export { formEmits, formMetaProps, formProps } from './src/
|
|
3
|
+
export { formEmits, formMetaProps, formProps } from './src/form2.mjs';
|
|
4
4
|
export { formItemProps, formItemValidateStates } from './src/form-item.mjs';
|
|
5
5
|
export { formContextKey, formItemContextKey } from './src/constants.mjs';
|
|
6
6
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
@@ -12,7 +12,7 @@ import { useFormSize } from './hooks/use-form-common-props.mjs';
|
|
|
12
12
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
13
13
|
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
14
14
|
import { isBoolean } from '../../../utils/types.mjs';
|
|
15
|
-
import {
|
|
15
|
+
import { isArray, isFunction } from '@vue/shared';
|
|
16
16
|
|
|
17
17
|
const __default__ = defineComponent({
|
|
18
18
|
name: "ElFormItem"
|
|
@@ -80,7 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
80
|
const propString = computed(() => {
|
|
81
81
|
if (!props.prop)
|
|
82
82
|
return "";
|
|
83
|
-
return
|
|
83
|
+
return isArray(props.prop) ? props.prop.join(".") : props.prop;
|
|
84
84
|
});
|
|
85
85
|
const hasLabel = computed(() => {
|
|
86
86
|
return !!(props.label || slots.label);
|
|
@@ -233,6 +233,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
233
233
|
...toRefs(props),
|
|
234
234
|
$el: formItemRef,
|
|
235
235
|
size: _size,
|
|
236
|
+
validateMessage,
|
|
236
237
|
validateState,
|
|
237
238
|
labelId,
|
|
238
239
|
inputIds,
|
|
@@ -243,7 +244,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
243
244
|
removeInputId,
|
|
244
245
|
resetField,
|
|
245
246
|
clearValidate,
|
|
246
|
-
validate
|
|
247
|
+
validate,
|
|
248
|
+
propString
|
|
247
249
|
});
|
|
248
250
|
provide(formItemContextKey, context);
|
|
249
251
|
onMounted(() => {
|