element-plus 2.7.4 → 2.7.6
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/README.md +2 -2
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +83 -43
- package/dist/index.full.min.js +22 -22
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +22 -22
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +84 -44
- 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 +9 -9
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.js.map +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.min.mjs.map +1 -1
- package/dist/locale/fr.mjs +9 -9
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +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 -117
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +117 -26
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +67 -32
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +32 -67
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/color-picker/index.d.ts +8 -0
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +414 -46
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +8 -0
- package/es/components/color-picker/src/color-picker2.mjs +46 -413
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +6 -2
- package/es/components/color-picker/src/components/predefine.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.vue.d.ts +8 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +12 -11
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-month-range.mjs +3 -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 +1 -1
- package/es/components/date-picker/src/panel-utils.d.ts +2 -2
- package/es/components/index.mjs +5 -5
- package/es/components/input/src/input2.mjs +8 -4
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +12 -0
- package/es/components/pagination/src/components/sizes.vue.d.ts +1 -0
- package/es/components/pagination/src/pagination.d.ts +24 -0
- package/es/components/pagination/src/pagination.mjs +14 -5
- package/es/components/pagination/src/pagination.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +13 -5
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/select/index.d.ts +1 -0
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select/src/select.vue.d.ts +1 -0
- package/es/components/select/src/select2.mjs +5 -4
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +1 -0
- package/es/components/select/src/useSelect.mjs +5 -1
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/select-v2/src/select.mjs +6 -6
- package/es/components/select-v2/src/select.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton.mjs +22 -49
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +49 -22
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/table/index.d.ts +1 -0
- package/es/components/table/src/table-header/index.mjs +6 -1
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/table-header/utils-helper.d.ts +1 -0
- package/es/components/table/src/table-header/utils-helper.mjs +1 -1
- package/es/components/table/src/table-header/utils-helper.mjs.map +1 -1
- package/es/components/table/src/table.mjs +5 -0
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +7 -6
- package/es/components/table-v2/src/composables/use-row.mjs +1 -1
- package/es/components/table-v2/src/composables/use-row.mjs.map +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +29 -94
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +94 -29
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/time-select/index.d.ts +4 -0
- package/es/components/time-select/src/time-select.vue.d.ts +2 -0
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/content2.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +20 -73
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +73 -20
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/tour/src/mask.mjs +19 -78
- package/es/components/tour/src/mask.mjs.map +1 -1
- package/es/components/tour/src/mask2.mjs +78 -19
- package/es/components/tour/src/mask2.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +19 -128
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +128 -19
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/components/visual-hidden/index.mjs +3 -3
- package/es/components/visual-hidden/src/visual-hidden.mjs +35 -7
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
- package/es/components/visual-hidden/src/visual-hidden2.mjs +7 -35
- package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +1 -1
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +5 -5
- package/es/locale/lang/fr.mjs +8 -8
- package/es/locale/lang/fr.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 -117
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +117 -27
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +67 -33
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +33 -67
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/color-picker/index.d.ts +8 -0
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +412 -46
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +8 -0
- package/lib/components/color-picker/src/color-picker2.js +46 -411
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +6 -2
- package/lib/components/color-picker/src/components/predefine.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.vue.d.ts +8 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +12 -11
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-month-range.js +3 -2
- 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 +1 -1
- package/lib/components/date-picker/src/panel-utils.d.ts +2 -2
- package/lib/components/index.js +5 -5
- package/lib/components/input/src/input2.js +8 -4
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/pagination/index.d.ts +12 -0
- package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -0
- package/lib/components/pagination/src/pagination.d.ts +24 -0
- package/lib/components/pagination/src/pagination.js +18 -9
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/progress/src/progress2.js +13 -5
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/select/index.d.ts +1 -0
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select/src/select.vue.d.ts +1 -0
- package/lib/components/select/src/select2.js +4 -3
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +1 -0
- package/lib/components/select/src/useSelect.js +4 -0
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/select-v2/src/select.js +5 -5
- package/lib/components/select-v2/src/select.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton.js +22 -49
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +49 -22
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/table/index.d.ts +1 -0
- package/lib/components/table/src/table-header/index.js +6 -1
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/table-header/utils-helper.d.ts +1 -0
- package/lib/components/table/src/table-header/utils-helper.js +1 -0
- package/lib/components/table/src/table-header/utils-helper.js.map +1 -1
- package/lib/components/table/src/table.js +5 -0
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +7 -6
- package/lib/components/table-v2/src/composables/use-row.js +1 -1
- package/lib/components/table-v2/src/composables/use-row.js.map +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +30 -94
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +94 -30
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/time-select/index.d.ts +4 -0
- package/lib/components/time-select/src/time-select.vue.d.ts +2 -0
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/content2.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +20 -73
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +73 -20
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/tour/src/mask.js +19 -78
- package/lib/components/tour/src/mask.js.map +1 -1
- package/lib/components/tour/src/mask2.js +78 -19
- package/lib/components/tour/src/mask2.js.map +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +21 -128
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +128 -21
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/components/visual-hidden/index.js +2 -2
- package/lib/components/visual-hidden/src/visual-hidden.js +35 -7
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
- package/lib/components/visual-hidden/src/visual-hidden2.js +7 -35
- package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +1 -1
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +5 -5
- package/lib/locale/lang/fr.js +8 -8
- package/lib/locale/lang/fr.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-pagination.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +2 -0
- package/theme-chalk/src/pagination.scss +13 -0
- package/theme-chalk/src/table.scss +25 -3
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix.mjs","sources":["../../../../../../packages/components/affix/src/affix.
|
|
1
|
+
{"version":3,"file":"affix.mjs","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n /**\n * @description affix element zIndex value\n * */\n zIndex: {\n type: definePropType<ZIndexProperty>([Number, String]),\n default: 100,\n },\n /**\n * @description target container. (CSS selector)\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description offset distance\n * */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description position of affix\n * */\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix>\n"],"names":[],"mappings":";;;;;;AAOY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC;AAC3E,EAAE,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AAC7C;;;;"}
|
|
@@ -1,32 +1,123 @@
|
|
|
1
|
+
import { defineComponent, shallowRef, ref, computed, watch, onMounted, watchEffect, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, renderSlot } from 'vue';
|
|
2
|
+
import { useWindowSize, useElementBounding, useEventListener } from '@vueuse/core';
|
|
1
3
|
import '../../../utils/index.mjs';
|
|
2
|
-
import '../../../
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import { affixProps, affixEmits } from './affix.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
9
|
+
import { throwError } from '../../../utils/error.mjs';
|
|
10
|
+
import { getScrollContainer } from '../../../utils/dom/scroll.mjs';
|
|
6
11
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
const COMPONENT_NAME = "ElAffix";
|
|
13
|
+
const __default__ = defineComponent({
|
|
14
|
+
name: COMPONENT_NAME
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: affixProps,
|
|
19
|
+
emits: affixEmits,
|
|
20
|
+
setup(__props, { expose, emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const ns = useNamespace("affix");
|
|
23
|
+
const target = shallowRef();
|
|
24
|
+
const root = shallowRef();
|
|
25
|
+
const scrollContainer = shallowRef();
|
|
26
|
+
const { height: windowHeight } = useWindowSize();
|
|
27
|
+
const {
|
|
28
|
+
height: rootHeight,
|
|
29
|
+
width: rootWidth,
|
|
30
|
+
top: rootTop,
|
|
31
|
+
bottom: rootBottom,
|
|
32
|
+
update: updateRoot
|
|
33
|
+
} = useElementBounding(root, { windowScroll: false });
|
|
34
|
+
const targetRect = useElementBounding(target);
|
|
35
|
+
const fixed = ref(false);
|
|
36
|
+
const scrollTop = ref(0);
|
|
37
|
+
const transform = ref(0);
|
|
38
|
+
const rootStyle = computed(() => {
|
|
39
|
+
return {
|
|
40
|
+
height: fixed.value ? `${rootHeight.value}px` : "",
|
|
41
|
+
width: fixed.value ? `${rootWidth.value}px` : ""
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
const affixStyle = computed(() => {
|
|
45
|
+
if (!fixed.value)
|
|
46
|
+
return {};
|
|
47
|
+
const offset = props.offset ? addUnit(props.offset) : 0;
|
|
48
|
+
return {
|
|
49
|
+
height: `${rootHeight.value}px`,
|
|
50
|
+
width: `${rootWidth.value}px`,
|
|
51
|
+
top: props.position === "top" ? offset : "",
|
|
52
|
+
bottom: props.position === "bottom" ? offset : "",
|
|
53
|
+
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
|
54
|
+
zIndex: props.zIndex
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
const update = () => {
|
|
58
|
+
if (!scrollContainer.value)
|
|
59
|
+
return;
|
|
60
|
+
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
|
61
|
+
if (props.position === "top") {
|
|
62
|
+
if (props.target) {
|
|
63
|
+
const difference = targetRect.bottom.value - props.offset - rootHeight.value;
|
|
64
|
+
fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0;
|
|
65
|
+
transform.value = difference < 0 ? difference : 0;
|
|
66
|
+
} else {
|
|
67
|
+
fixed.value = props.offset > rootTop.value;
|
|
68
|
+
}
|
|
69
|
+
} else if (props.target) {
|
|
70
|
+
const difference = windowHeight.value - targetRect.top.value - props.offset - rootHeight.value;
|
|
71
|
+
fixed.value = windowHeight.value - props.offset < rootBottom.value && windowHeight.value > targetRect.top.value;
|
|
72
|
+
transform.value = difference < 0 ? -difference : 0;
|
|
73
|
+
} else {
|
|
74
|
+
fixed.value = windowHeight.value - props.offset < rootBottom.value;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const handleScroll = () => {
|
|
78
|
+
updateRoot();
|
|
79
|
+
emit("scroll", {
|
|
80
|
+
scrollTop: scrollTop.value,
|
|
81
|
+
fixed: fixed.value
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
watch(fixed, (val) => emit("change", val));
|
|
85
|
+
onMounted(() => {
|
|
86
|
+
var _a;
|
|
87
|
+
if (props.target) {
|
|
88
|
+
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
89
|
+
if (!target.value)
|
|
90
|
+
throwError(COMPONENT_NAME, `Target does not exist: ${props.target}`);
|
|
91
|
+
} else {
|
|
92
|
+
target.value = document.documentElement;
|
|
93
|
+
}
|
|
94
|
+
scrollContainer.value = getScrollContainer(root.value, true);
|
|
95
|
+
updateRoot();
|
|
96
|
+
});
|
|
97
|
+
useEventListener(scrollContainer, "scroll", handleScroll);
|
|
98
|
+
watchEffect(update);
|
|
99
|
+
expose({
|
|
100
|
+
update,
|
|
101
|
+
updateRoot
|
|
102
|
+
});
|
|
103
|
+
return (_ctx, _cache) => {
|
|
104
|
+
return openBlock(), createElementBlock("div", {
|
|
105
|
+
ref_key: "root",
|
|
106
|
+
ref: root,
|
|
107
|
+
class: normalizeClass(unref(ns).b()),
|
|
108
|
+
style: normalizeStyle(unref(rootStyle))
|
|
109
|
+
}, [
|
|
110
|
+
createElementVNode("div", {
|
|
111
|
+
class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
|
|
112
|
+
style: normalizeStyle(unref(affixStyle))
|
|
113
|
+
}, [
|
|
114
|
+
renderSlot(_ctx.$slots, "default")
|
|
115
|
+
], 6)
|
|
116
|
+
], 6);
|
|
117
|
+
};
|
|
24
118
|
}
|
|
25
119
|
});
|
|
26
|
-
|
|
27
|
-
scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed),
|
|
28
|
-
[CHANGE_EVENT]: (fixed) => isBoolean(fixed)
|
|
29
|
-
};
|
|
120
|
+
var Affix = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "affix.vue"]]);
|
|
30
121
|
|
|
31
|
-
export {
|
|
122
|
+
export { Affix as default };
|
|
32
123
|
//# sourceMappingURL=affix2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.
|
|
1
|
+
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <div :class=\"{ [ns.m('fixed')]: fixed }\" :style=\"affixStyle\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'\nimport {\n useElementBounding,\n useEventListener,\n useWindowSize,\n} from '@vueuse/core'\nimport { addUnit, getScrollContainer, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { affixEmits, affixProps } from './affix'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElAffix'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(affixProps)\nconst emit = defineEmits(affixEmits)\n\nconst ns = useNamespace('affix')\n\nconst target = shallowRef<HTMLElement>()\nconst root = shallowRef<HTMLDivElement>()\nconst scrollContainer = shallowRef<HTMLElement | Window>()\nconst { height: windowHeight } = useWindowSize()\nconst {\n height: rootHeight,\n width: rootWidth,\n top: rootTop,\n bottom: rootBottom,\n update: updateRoot,\n} = useElementBounding(root, { windowScroll: false })\nconst targetRect = useElementBounding(target)\n\nconst fixed = ref(false)\nconst scrollTop = ref(0)\nconst transform = ref(0)\n\nconst rootStyle = computed<CSSProperties>(() => {\n return {\n height: fixed.value ? `${rootHeight.value}px` : '',\n width: fixed.value ? `${rootWidth.value}px` : '',\n }\n})\n\nconst affixStyle = computed<CSSProperties>(() => {\n if (!fixed.value) return {}\n\n const offset = props.offset ? addUnit(props.offset) : 0\n return {\n height: `${rootHeight.value}px`,\n width: `${rootWidth.value}px`,\n top: props.position === 'top' ? offset : '',\n bottom: props.position === 'bottom' ? offset : '',\n transform: transform.value ? `translateY(${transform.value}px)` : '',\n zIndex: props.zIndex,\n }\n})\n\nconst update = () => {\n if (!scrollContainer.value) return\n\n scrollTop.value =\n scrollContainer.value instanceof Window\n ? document.documentElement.scrollTop\n : scrollContainer.value.scrollTop || 0\n\n if (props.position === 'top') {\n if (props.target) {\n const difference =\n targetRect.bottom.value - props.offset - rootHeight.value\n fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0\n transform.value = difference < 0 ? difference : 0\n } else {\n fixed.value = props.offset > rootTop.value\n }\n } else if (props.target) {\n const difference =\n windowHeight.value -\n targetRect.top.value -\n props.offset -\n rootHeight.value\n fixed.value =\n windowHeight.value - props.offset < rootBottom.value &&\n windowHeight.value > targetRect.top.value\n transform.value = difference < 0 ? -difference : 0\n } else {\n fixed.value = windowHeight.value - props.offset < rootBottom.value\n }\n}\n\nconst handleScroll = () => {\n updateRoot()\n emit('scroll', {\n scrollTop: scrollTop.value,\n fixed: fixed.value,\n })\n}\n\nwatch(fixed, (val) => emit('change', val))\n\nonMounted(() => {\n if (props.target) {\n target.value =\n document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!target.value)\n throwError(COMPONENT_NAME, `Target does not exist: ${props.target}`)\n } else {\n target.value = document.documentElement\n }\n scrollContainer.value = getScrollContainer(root.value!, true)\n updateRoot()\n})\n\nuseEventListener(scrollContainer, 'scroll', handleScroll)\nwatchEffect(update)\n\ndefineExpose({\n /** @description update affix status */\n update,\n /** @description update rootRect info */\n updateRoot,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;mCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAE/B,IAAA,MAAM,SAAS,UAAwB,EAAA,CAAA;AACvC,IAAA,MAAM,OAAO,UAA2B,EAAA,CAAA;AACxC,IAAA,MAAM,kBAAkB,UAAiC,EAAA,CAAA;AACzD,IAAM,MAAA,EAAE,MAAQ,EAAA,YAAA,EAAA,GAAiB,aAAc,EAAA,CAAA;AAC/C,IAAM,MAAA;AAAA,MACJ,MAAQ,EAAA,UAAA;AAAA,MACR,KAAO,EAAA,SAAA;AAAA,MACP,GAAK,EAAA,OAAA;AAAA,MACL,MAAQ,EAAA,UAAA;AAAA,MACR,MAAQ,EAAA,UAAA;AAAA,KAAA,GACN,kBAAmB,CAAA,IAAA,EAAM,EAAE,YAAA,EAAc,OAAO,CAAA,CAAA;AACpD,IAAM,MAAA,UAAA,GAAa,mBAAmB,MAAM,CAAA,CAAA;AAE5C,IAAM,MAAA,KAAA,GAAQ,IAAI,KAAK,CAAA,CAAA;AACvB,IAAM,MAAA,SAAA,GAAY,IAAI,CAAC,CAAA,CAAA;AACvB,IAAM,MAAA,SAAA,GAAY,IAAI,CAAC,CAAA,CAAA;AAEvB,IAAM,MAAA,SAAA,GAAY,SAAwB,MAAM;AAC9C,MAAO,OAAA;AAAA,QACL,MAAQ,EAAA,KAAA,CAAM,KAAQ,GAAA,CAAA,EAAG,WAAW,KAAY,CAAA,EAAA,CAAA,GAAA,EAAA;AAAA,QAChD,KAAO,EAAA,KAAA,CAAM,KAAQ,GAAA,CAAA,EAAG,UAAU,KAAY,CAAA,EAAA,CAAA,GAAA,EAAA;AAAA,OAChD,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,UAAA,GAAa,SAA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AAA,CAAA,KAAA,CAAA,MAAA,CAAA,KAAA,IAAA,GAAA,EAAA,GAAA,KAAA,CAAA,CAAA;AACV,QAAW,IAAA,CAAA,MAAA,CAAA,KAAA;AAAwD,UAChE,UAAA,CAAA,cAAA,EAAA,CAAA,uBAAA,EAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA;AACL,OAAA,MAAA;AAAwB,QAC1B,MAAA,CAAA,KAAA,GAAA,QAAA,CAAA,eAAA,CAAA;AACA,OAAA;AACA,MAAW,eAAA,CAAA,KAAA,GAAA,kBAAA,CAAA,IAAA,CAAA,KAAA,EAAA,IAAA,CAAA,CAAA;AAAA,MACZ,UAAA,EAAA,CAAA;AAED,KAAiB,CAAA,CAAA;AACjB,IAAA,gBAAkB,CAAA,eAAA,EAAA,QAAA,EAAA,YAAA,CAAA,CAAA;AAElB,IAAa,WAAA,CAAA,MAAA,CAAA,CAAA;AAAA,IAEX,MAAA,CAAA;AAAA,MAEA,MAAA;AAAA,MACD,UAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Avatar from './src/
|
|
3
|
-
export { avatarEmits, avatarProps } from './src/
|
|
2
|
+
import Avatar from './src/avatar.mjs';
|
|
3
|
+
export { avatarEmits, avatarProps } from './src/avatar2.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElAvatar = withInstall(Avatar);
|
|
@@ -1,39 +1,74 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createBlock, withCtx, resolveDynamicComponent, renderSlot } from 'vue';
|
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
1
4
|
import '../../../utils/index.mjs';
|
|
2
|
-
import '
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
+
import { avatarProps, avatarEmits } from './avatar2.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
|
+
import { isString } from '@vue/shared';
|
|
5
9
|
import { isNumber } from '../../../utils/types.mjs';
|
|
6
|
-
import {
|
|
10
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
7
11
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
12
|
+
const _hoisted_1 = ["src", "alt", "srcset"];
|
|
13
|
+
const __default__ = defineComponent({
|
|
14
|
+
name: "ElAvatar"
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: avatarProps,
|
|
19
|
+
emits: avatarEmits,
|
|
20
|
+
setup(__props, { emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const ns = useNamespace("avatar");
|
|
23
|
+
const hasLoadError = ref(false);
|
|
24
|
+
const avatarClass = computed(() => {
|
|
25
|
+
const { size, icon, shape } = props;
|
|
26
|
+
const classList = [ns.b()];
|
|
27
|
+
if (isString(size))
|
|
28
|
+
classList.push(ns.m(size));
|
|
29
|
+
if (icon)
|
|
30
|
+
classList.push(ns.m("icon"));
|
|
31
|
+
if (shape)
|
|
32
|
+
classList.push(ns.m(shape));
|
|
33
|
+
return classList;
|
|
34
|
+
});
|
|
35
|
+
const sizeStyle = computed(() => {
|
|
36
|
+
const { size } = props;
|
|
37
|
+
return isNumber(size) ? ns.cssVarBlock({
|
|
38
|
+
size: addUnit(size) || ""
|
|
39
|
+
}) : void 0;
|
|
40
|
+
});
|
|
41
|
+
const fitStyle = computed(() => ({
|
|
42
|
+
objectFit: props.fit
|
|
43
|
+
}));
|
|
44
|
+
watch(() => props.src, () => hasLoadError.value = false);
|
|
45
|
+
function handleError(e) {
|
|
46
|
+
hasLoadError.value = true;
|
|
47
|
+
emit("error", e);
|
|
48
|
+
}
|
|
49
|
+
return (_ctx, _cache) => {
|
|
50
|
+
return openBlock(), createElementBlock("span", {
|
|
51
|
+
class: normalizeClass(unref(avatarClass)),
|
|
52
|
+
style: normalizeStyle(unref(sizeStyle))
|
|
53
|
+
}, [
|
|
54
|
+
(_ctx.src || _ctx.srcSet) && !hasLoadError.value ? (openBlock(), createElementBlock("img", {
|
|
55
|
+
key: 0,
|
|
56
|
+
src: _ctx.src,
|
|
57
|
+
alt: _ctx.alt,
|
|
58
|
+
srcset: _ctx.srcSet,
|
|
59
|
+
style: normalizeStyle(unref(fitStyle)),
|
|
60
|
+
onError: handleError
|
|
61
|
+
}, null, 44, _hoisted_1)) : _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
|
62
|
+
default: withCtx(() => [
|
|
63
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
})) : renderSlot(_ctx.$slots, "default", { key: 2 })
|
|
67
|
+
], 6);
|
|
68
|
+
};
|
|
32
69
|
}
|
|
33
70
|
});
|
|
34
|
-
|
|
35
|
-
error: (evt) => evt instanceof Event
|
|
36
|
-
};
|
|
71
|
+
var Avatar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "avatar.vue"]]);
|
|
37
72
|
|
|
38
|
-
export {
|
|
73
|
+
export { Avatar as default };
|
|
39
74
|
//# sourceMappingURL=avatar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.mjs","sources":["../../../../../../packages/components/avatar/src/avatar.
|
|
1
|
+
{"version":3,"file":"avatar.mjs","sources":["../../../../../../packages/components/avatar/src/avatar.vue"],"sourcesContent":["<template>\n <span :class=\"avatarClass\" :style=\"sizeStyle\">\n <img\n v-if=\"(src || srcSet) && !hasLoadError\"\n :src=\"src\"\n :alt=\"alt\"\n :srcset=\"srcSet\"\n :style=\"fitStyle\"\n @error=\"handleError\"\n />\n <el-icon v-else-if=\"icon\">\n <component :is=\"icon\" />\n </el-icon>\n <slot v-else />\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { addUnit, isNumber, isString } from '@element-plus/utils'\nimport { avatarEmits, avatarProps } from './avatar'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElAvatar',\n})\n\nconst props = defineProps(avatarProps)\nconst emit = defineEmits(avatarEmits)\n\nconst ns = useNamespace('avatar')\n\nconst hasLoadError = ref(false)\n\nconst avatarClass = computed(() => {\n const { size, icon, shape } = props\n const classList = [ns.b()]\n if (isString(size)) classList.push(ns.m(size))\n if (icon) classList.push(ns.m('icon'))\n if (shape) classList.push(ns.m(shape))\n return classList\n})\n\nconst sizeStyle = computed(() => {\n const { size } = props\n return isNumber(size)\n ? (ns.cssVarBlock({\n size: addUnit(size) || '',\n }) as CSSProperties)\n : undefined\n})\n\nconst fitStyle = computed<CSSProperties>(() => ({\n objectFit: props.fit,\n}))\n\n// need reset hasLoadError to false if src changed\nwatch(\n () => props.src,\n () => (hasLoadError.value = false)\n)\n\nfunction handleError(e: Event) {\n hasLoadError.value = true\n emit('error', e)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;mCA0Bc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAEhC,I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AAA,IAAA,CAAK,SAAS,CAAC,CAAA,CAAA;AAAA,KACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,74 +1,39 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createBlock, withCtx, resolveDynamicComponent, renderSlot } from 'vue';
|
|
2
|
-
import { ElIcon } from '../../icon/index.mjs';
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
1
|
import '../../../utils/index.mjs';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { isString } from '@vue/shared';
|
|
2
|
+
import '../../../constants/index.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { componentSizes } from '../../../constants/size.mjs';
|
|
9
5
|
import { isNumber } from '../../../utils/types.mjs';
|
|
10
|
-
import {
|
|
6
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
11
7
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const { size } = props;
|
|
37
|
-
return isNumber(size) ? ns.cssVarBlock({
|
|
38
|
-
size: addUnit(size) || ""
|
|
39
|
-
}) : void 0;
|
|
40
|
-
});
|
|
41
|
-
const fitStyle = computed(() => ({
|
|
42
|
-
objectFit: props.fit
|
|
43
|
-
}));
|
|
44
|
-
watch(() => props.src, () => hasLoadError.value = false);
|
|
45
|
-
function handleError(e) {
|
|
46
|
-
hasLoadError.value = true;
|
|
47
|
-
emit("error", e);
|
|
48
|
-
}
|
|
49
|
-
return (_ctx, _cache) => {
|
|
50
|
-
return openBlock(), createElementBlock("span", {
|
|
51
|
-
class: normalizeClass(unref(avatarClass)),
|
|
52
|
-
style: normalizeStyle(unref(sizeStyle))
|
|
53
|
-
}, [
|
|
54
|
-
(_ctx.src || _ctx.srcSet) && !hasLoadError.value ? (openBlock(), createElementBlock("img", {
|
|
55
|
-
key: 0,
|
|
56
|
-
src: _ctx.src,
|
|
57
|
-
alt: _ctx.alt,
|
|
58
|
-
srcset: _ctx.srcSet,
|
|
59
|
-
style: normalizeStyle(unref(fitStyle)),
|
|
60
|
-
onError: handleError
|
|
61
|
-
}, null, 44, _hoisted_1)) : _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
|
62
|
-
default: withCtx(() => [
|
|
63
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
64
|
-
]),
|
|
65
|
-
_: 1
|
|
66
|
-
})) : renderSlot(_ctx.$slots, "default", { key: 2 })
|
|
67
|
-
], 6);
|
|
68
|
-
};
|
|
8
|
+
const avatarProps = buildProps({
|
|
9
|
+
size: {
|
|
10
|
+
type: [Number, String],
|
|
11
|
+
values: componentSizes,
|
|
12
|
+
default: "",
|
|
13
|
+
validator: (val) => isNumber(val)
|
|
14
|
+
},
|
|
15
|
+
shape: {
|
|
16
|
+
type: String,
|
|
17
|
+
values: ["circle", "square"],
|
|
18
|
+
default: "circle"
|
|
19
|
+
},
|
|
20
|
+
icon: {
|
|
21
|
+
type: iconPropType
|
|
22
|
+
},
|
|
23
|
+
src: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
alt: String,
|
|
28
|
+
srcSet: String,
|
|
29
|
+
fit: {
|
|
30
|
+
type: definePropType(String),
|
|
31
|
+
default: "cover"
|
|
69
32
|
}
|
|
70
33
|
});
|
|
71
|
-
|
|
34
|
+
const avatarEmits = {
|
|
35
|
+
error: (evt) => evt instanceof Event
|
|
36
|
+
};
|
|
72
37
|
|
|
73
|
-
export {
|
|
38
|
+
export { avatarEmits, avatarProps };
|
|
74
39
|
//# sourceMappingURL=avatar2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar2.mjs","sources":["../../../../../../packages/components/avatar/src/avatar.
|
|
1
|
+
{"version":3,"file":"avatar2.mjs","sources":["../../../../../../packages/components/avatar/src/avatar.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isNumber,\n} from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ObjectFitProperty } from 'csstype'\n\nexport const avatarProps = buildProps({\n /**\n * @description avatar size.\n */\n size: {\n type: [Number, String],\n values: componentSizes,\n default: '',\n validator: (val: unknown): val is number => isNumber(val),\n },\n /**\n * @description avatar shape.\n */\n shape: {\n type: String,\n values: ['circle', 'square'],\n default: 'circle',\n },\n /**\n * @description representation type to icon, more info on icon component.\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description the source of the image for an image avatar.\n */\n src: {\n type: String,\n default: '',\n },\n /**\n * @description native attribute `alt` of image avatar.\n */\n alt: String,\n /**\n * @description native attribute srcset of image avatar.\n */\n srcSet: String,\n /**\n * @description set how the image fit its container for an image avatar.\n */\n fit: {\n type: definePropType<ObjectFitProperty>(String),\n default: 'cover',\n },\n} as const)\nexport type AvatarProps = ExtractPropTypes<typeof avatarProps>\n\nexport const avatarEmits = {\n error: (evt: Event) => evt instanceof Event,\n}\nexport type AvatarEmits = typeof avatarEmits\n"],"names":[],"mappings":";;;;;;;AAOY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC;AACrC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;AAChC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,GAAG,EAAE,MAAM;AACb,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,KAAK;AACtC;;;;"}
|
|
@@ -8,7 +8,7 @@ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs
|
|
|
8
8
|
import { CommonProps } from '../../cascader-panel/src/config.mjs';
|
|
9
9
|
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
10
10
|
import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
|
|
11
|
-
import { tagProps } from '../../tag/src/
|
|
11
|
+
import { tagProps } from '../../tag/src/tag.mjs';
|
|
12
12
|
import { useEmptyValuesProps } from '../../../hooks/use-empty-values/index.mjs';
|
|
13
13
|
import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
|
14
14
|
import { isBoolean } from '../../../utils/types.mjs';
|
|
@@ -10814,6 +10814,10 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
10814
10814
|
type: import("vue").PropType<import("./src/utils/color").default>;
|
|
10815
10815
|
required: true;
|
|
10816
10816
|
};
|
|
10817
|
+
enableAlpha: {
|
|
10818
|
+
type: BooleanConstructor;
|
|
10819
|
+
required: true;
|
|
10820
|
+
};
|
|
10817
10821
|
}, {
|
|
10818
10822
|
rgbaColors: import("vue").Ref<import("./src/utils/color").default[]>;
|
|
10819
10823
|
handleSelect: (index: number) => void;
|
|
@@ -10844,6 +10848,10 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
10844
10848
|
type: import("vue").PropType<import("./src/utils/color").default>;
|
|
10845
10849
|
required: true;
|
|
10846
10850
|
};
|
|
10851
|
+
enableAlpha: {
|
|
10852
|
+
type: BooleanConstructor;
|
|
10853
|
+
required: true;
|
|
10854
|
+
};
|
|
10847
10855
|
}>>, {}>;
|
|
10848
10856
|
SvPanel: import("vue").DefineComponent<{
|
|
10849
10857
|
color: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import ColorPicker from './src/color-
|
|
3
|
-
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './src/color-
|
|
2
|
+
import ColorPicker from './src/color-picker.mjs';
|
|
3
|
+
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './src/color-picker2.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElColorPicker = withInstall(ColorPicker);
|