@element-plus/nightly 0.0.20241026 → 0.0.20241027
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 +353 -283
- 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 +354 -285
- 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/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +3 -3
- package/es/components/button/src/button.vue.d.ts +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +66 -43
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +43 -66
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +62 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -62
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker.d.ts +12 -3
- package/es/components/date-picker/src/date-picker.mjs +6 -2
- package/es/components/date-picker/src/date-picker.mjs.map +1 -1
- package/es/components/date-picker/src/instance.d.ts +2 -1
- package/es/components/date-picker/src/props/date-picker.d.ts +6 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +4 -4
- package/es/components/form/src/form.vue.d.ts +1 -1
- package/es/components/index.mjs +7 -7
- package/es/components/input/src/input2.mjs +12 -24
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/link/src/link.vue.d.ts +1 -1
- package/es/components/mention/src/mention.vue.d.ts +4 -4
- package/es/components/pagination/src/components/total.mjs +27 -7
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +7 -27
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.d.ts +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popover/src/popover.vue.d.ts +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/content.mjs +93 -137
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +137 -93
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +15 -12
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/radio/src/radio-group.vue.d.ts +1 -1
- package/es/components/radio/src/radio.vue.d.ts +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/segmented/index.d.ts +4 -4
- package/es/components/segmented/src/segmented.vue.d.ts +1 -1
- package/es/components/select/src/select.vue.d.ts +7 -7
- package/es/components/select/src/useSelect.d.ts +6 -6
- package/es/components/select-v2/src/select.vue.d.ts +7 -7
- package/es/components/select-v2/src/useSelect.d.ts +6 -6
- package/es/components/slider/src/button2.mjs +2 -2
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/composables/use-slider-button.d.ts +3 -3
- package/es/components/slider/src/slider.vue.d.ts +1 -1
- package/es/components/switch/src/switch.vue.d.ts +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +3 -3
- package/es/components/time-picker/index.mjs +1 -1
- package/es/components/time-picker/src/common/picker-range-trigger.mjs +115 -0
- package/es/components/time-picker/src/common/picker-range-trigger.mjs.map +1 -0
- package/es/components/time-picker/src/common/picker-range-trigger.vue.d.ts +78 -0
- package/es/components/time-picker/src/common/picker.mjs +97 -140
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +15 -11
- package/es/components/time-picker/src/common/props.d.ts +28 -1
- package/es/components/time-picker/src/common/props.mjs +15 -3
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs +5 -2
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +12 -3
- package/es/components/time-picker/src/time-picker.mjs +4 -4
- package/es/components/time-picker/src/time-picker.mjs.map +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/content.vue.d.ts +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/es/components/tooltip/src/trigger.vue.d.ts +1 -1
- package/es/components/tour/src/helper.mjs +1 -1
- package/es/components/tour/src/helper.mjs.map +1 -1
- package/es/components/transfer/index.mjs +2 -2
- package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +1 -1
- package/es/components/transfer/src/transfer.mjs +161 -69
- package/es/components/transfer/src/transfer.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +69 -161
- package/es/components/transfer/src/transfer2.mjs.map +1 -1
- package/es/components/tree-v2/src/tree-node.vue.d.ts +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content.vue.d.ts +1 -1
- package/es/components/upload/src/upload-list.mjs +29 -175
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +175 -29
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload.vue.d.ts +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +28 -209
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +209 -28
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/hooks/use-id/index.d.ts +1 -1
- package/es/hooks/use-id/index.mjs +3 -3
- package/es/hooks/use-id/index.mjs.map +1 -1
- package/es/index.mjs +7 -7
- package/es/utils/dom/aria.mjs +1 -1
- package/es/utils/dom/aria.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/src/autocomplete.vue.d.ts +3 -3
- package/lib/components/button/src/button.vue.d.ts +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +66 -43
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +43 -66
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +62 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -62
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/date-picker/src/date-picker.d.ts +12 -3
- package/lib/components/date-picker/src/date-picker.js +6 -2
- package/lib/components/date-picker/src/date-picker.js.map +1 -1
- package/lib/components/date-picker/src/instance.d.ts +2 -1
- package/lib/components/date-picker/src/props/date-picker.d.ts +6 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +4 -4
- package/lib/components/form/src/form.vue.d.ts +1 -1
- package/lib/components/index.js +7 -6
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/src/input2.js +11 -23
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/link/src/link.vue.d.ts +1 -1
- package/lib/components/mention/src/mention.vue.d.ts +4 -4
- package/lib/components/pagination/src/components/total.js +27 -7
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +7 -27
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.d.ts +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popover/src/popover.vue.d.ts +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/content.js +98 -137
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +137 -98
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +15 -12
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/radio/src/radio-group.vue.d.ts +1 -1
- package/lib/components/radio/src/radio.vue.d.ts +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/segmented/index.d.ts +4 -4
- package/lib/components/segmented/src/segmented.vue.d.ts +1 -1
- package/lib/components/select/src/select.vue.d.ts +7 -7
- package/lib/components/select/src/useSelect.d.ts +6 -6
- package/lib/components/select-v2/src/select.vue.d.ts +7 -7
- package/lib/components/select-v2/src/useSelect.d.ts +6 -6
- package/lib/components/slider/src/button2.js +2 -2
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/composables/use-slider-button.d.ts +3 -3
- package/lib/components/slider/src/slider.vue.d.ts +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +3 -3
- package/lib/components/time-picker/index.js +1 -0
- package/lib/components/time-picker/index.js.map +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.js +119 -0
- package/lib/components/time-picker/src/common/picker-range-trigger.js.map +1 -0
- package/lib/components/time-picker/src/common/picker-range-trigger.vue.d.ts +78 -0
- package/lib/components/time-picker/src/common/picker.js +101 -144
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +15 -11
- package/lib/components/time-picker/src/common/props.d.ts +28 -1
- package/lib/components/time-picker/src/common/props.js +15 -2
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js +5 -2
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js.map +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +12 -3
- package/lib/components/time-picker/src/time-picker.js +4 -4
- package/lib/components/time-picker/src/time-picker.js.map +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/content.vue.d.ts +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/lib/components/tooltip/src/trigger.vue.d.ts +1 -1
- package/lib/components/tour/src/helper.js +1 -1
- package/lib/components/tour/src/helper.js.map +1 -1
- package/lib/components/transfer/index.js +2 -2
- package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +1 -1
- package/lib/components/transfer/src/transfer.js +161 -73
- package/lib/components/transfer/src/transfer.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +73 -161
- package/lib/components/transfer/src/transfer2.js.map +1 -1
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/src/upload-list.js +30 -175
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +175 -30
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +28 -209
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +209 -28
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/hooks/use-id/index.d.ts +1 -1
- package/lib/hooks/use-id/index.js +2 -2
- package/lib/hooks/use-id/index.js.map +1 -1
- package/lib/index.js +7 -6
- package/lib/index.js.map +1 -1
- package/lib/utils/dom/aria.js +1 -1
- package/lib/utils/dom/aria.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/theme-chalk/el-popper.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/popper.scss +1 -1
- package/web-types.json +1 -1
|
@@ -1,34 +1,180 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, openBlock, createBlock, TransitionGroup, normalizeClass, unref, withCtx, createElementBlock, Fragment, renderList, withKeys, renderSlot, createCommentVNode, createElementVNode, withModifiers, createVNode, toDisplayString, normalizeStyle } from 'vue';
|
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
3
|
+
import { Document, CircleCheck, Check, Close, ZoomIn, Delete } from '@element-plus/icons-vue';
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import { ElProgress } from '../../progress/index.mjs';
|
|
6
|
+
import '../../form/index.mjs';
|
|
7
|
+
import { uploadListProps, uploadListEmits } from './upload-list.mjs';
|
|
8
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
10
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
11
|
+
import { useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
6
12
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
const __default__ = defineComponent({
|
|
14
|
+
name: "ElUploadList"
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: uploadListProps,
|
|
19
|
+
emits: uploadListEmits,
|
|
20
|
+
setup(__props, { emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const { t } = useLocale();
|
|
23
|
+
const nsUpload = useNamespace("upload");
|
|
24
|
+
const nsIcon = useNamespace("icon");
|
|
25
|
+
const nsList = useNamespace("list");
|
|
26
|
+
const disabled = useFormDisabled();
|
|
27
|
+
const focusing = ref(false);
|
|
28
|
+
const containerKls = computed(() => [
|
|
29
|
+
nsUpload.b("list"),
|
|
30
|
+
nsUpload.bm("list", props.listType),
|
|
31
|
+
nsUpload.is("disabled", props.disabled)
|
|
32
|
+
]);
|
|
33
|
+
const handleRemove = (file) => {
|
|
34
|
+
emit("remove", file);
|
|
35
|
+
};
|
|
36
|
+
return (_ctx, _cache) => {
|
|
37
|
+
return openBlock(), createBlock(TransitionGroup, {
|
|
38
|
+
tag: "ul",
|
|
39
|
+
class: normalizeClass(unref(containerKls)),
|
|
40
|
+
name: unref(nsList).b()
|
|
41
|
+
}, {
|
|
42
|
+
default: withCtx(() => [
|
|
43
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.files, (file, index) => {
|
|
44
|
+
return openBlock(), createElementBlock("li", {
|
|
45
|
+
key: file.uid || file.name,
|
|
46
|
+
class: normalizeClass([
|
|
47
|
+
unref(nsUpload).be("list", "item"),
|
|
48
|
+
unref(nsUpload).is(file.status),
|
|
49
|
+
{ focusing: focusing.value }
|
|
50
|
+
]),
|
|
51
|
+
tabindex: "0",
|
|
52
|
+
onKeydown: withKeys(($event) => !unref(disabled) && handleRemove(file), ["delete"]),
|
|
53
|
+
onFocus: ($event) => focusing.value = true,
|
|
54
|
+
onBlur: ($event) => focusing.value = false,
|
|
55
|
+
onClick: ($event) => focusing.value = false
|
|
56
|
+
}, [
|
|
57
|
+
renderSlot(_ctx.$slots, "default", {
|
|
58
|
+
file,
|
|
59
|
+
index
|
|
60
|
+
}, () => [
|
|
61
|
+
_ctx.listType === "picture" || file.status !== "uploading" && _ctx.listType === "picture-card" ? (openBlock(), createElementBlock("img", {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: normalizeClass(unref(nsUpload).be("list", "item-thumbnail")),
|
|
64
|
+
src: file.url,
|
|
65
|
+
crossorigin: _ctx.crossorigin,
|
|
66
|
+
alt: ""
|
|
67
|
+
}, null, 10, ["src", "crossorigin"])) : createCommentVNode("v-if", true),
|
|
68
|
+
file.status === "uploading" || _ctx.listType !== "picture-card" ? (openBlock(), createElementBlock("div", {
|
|
69
|
+
key: 1,
|
|
70
|
+
class: normalizeClass(unref(nsUpload).be("list", "item-info"))
|
|
71
|
+
}, [
|
|
72
|
+
createElementVNode("a", {
|
|
73
|
+
class: normalizeClass(unref(nsUpload).be("list", "item-name")),
|
|
74
|
+
onClick: withModifiers(($event) => _ctx.handlePreview(file), ["prevent"])
|
|
75
|
+
}, [
|
|
76
|
+
createVNode(unref(ElIcon), {
|
|
77
|
+
class: normalizeClass(unref(nsIcon).m("document"))
|
|
78
|
+
}, {
|
|
79
|
+
default: withCtx(() => [
|
|
80
|
+
createVNode(unref(Document))
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
}, 8, ["class"]),
|
|
84
|
+
createElementVNode("span", {
|
|
85
|
+
class: normalizeClass(unref(nsUpload).be("list", "item-file-name")),
|
|
86
|
+
title: file.name
|
|
87
|
+
}, toDisplayString(file.name), 11, ["title"])
|
|
88
|
+
], 10, ["onClick"]),
|
|
89
|
+
file.status === "uploading" ? (openBlock(), createBlock(unref(ElProgress), {
|
|
90
|
+
key: 0,
|
|
91
|
+
type: _ctx.listType === "picture-card" ? "circle" : "line",
|
|
92
|
+
"stroke-width": _ctx.listType === "picture-card" ? 6 : 2,
|
|
93
|
+
percentage: Number(file.percentage),
|
|
94
|
+
style: normalizeStyle(_ctx.listType === "picture-card" ? "" : "margin-top: 0.5rem")
|
|
95
|
+
}, null, 8, ["type", "stroke-width", "percentage", "style"])) : createCommentVNode("v-if", true)
|
|
96
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
97
|
+
createElementVNode("label", {
|
|
98
|
+
class: normalizeClass(unref(nsUpload).be("list", "item-status-label"))
|
|
99
|
+
}, [
|
|
100
|
+
_ctx.listType === "text" ? (openBlock(), createBlock(unref(ElIcon), {
|
|
101
|
+
key: 0,
|
|
102
|
+
class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("circle-check")])
|
|
103
|
+
}, {
|
|
104
|
+
default: withCtx(() => [
|
|
105
|
+
createVNode(unref(CircleCheck))
|
|
106
|
+
]),
|
|
107
|
+
_: 1
|
|
108
|
+
}, 8, ["class"])) : ["picture-card", "picture"].includes(_ctx.listType) ? (openBlock(), createBlock(unref(ElIcon), {
|
|
109
|
+
key: 1,
|
|
110
|
+
class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("check")])
|
|
111
|
+
}, {
|
|
112
|
+
default: withCtx(() => [
|
|
113
|
+
createVNode(unref(Check))
|
|
114
|
+
]),
|
|
115
|
+
_: 1
|
|
116
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
117
|
+
], 2),
|
|
118
|
+
!unref(disabled) ? (openBlock(), createBlock(unref(ElIcon), {
|
|
119
|
+
key: 2,
|
|
120
|
+
class: normalizeClass(unref(nsIcon).m("close")),
|
|
121
|
+
onClick: ($event) => handleRemove(file)
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(() => [
|
|
124
|
+
createVNode(unref(Close))
|
|
125
|
+
]),
|
|
126
|
+
_: 2
|
|
127
|
+
}, 1032, ["class", "onClick"])) : createCommentVNode("v-if", true),
|
|
128
|
+
createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),
|
|
129
|
+
createCommentVNode(" This is a bug which needs to be fixed "),
|
|
130
|
+
createCommentVNode(" TODO: Fix the incorrect navigation interaction "),
|
|
131
|
+
!unref(disabled) ? (openBlock(), createElementBlock("i", {
|
|
132
|
+
key: 3,
|
|
133
|
+
class: normalizeClass(unref(nsIcon).m("close-tip"))
|
|
134
|
+
}, toDisplayString(unref(t)("el.upload.deleteTip")), 3)) : createCommentVNode("v-if", true),
|
|
135
|
+
_ctx.listType === "picture-card" ? (openBlock(), createElementBlock("span", {
|
|
136
|
+
key: 4,
|
|
137
|
+
class: normalizeClass(unref(nsUpload).be("list", "item-actions"))
|
|
138
|
+
}, [
|
|
139
|
+
createElementVNode("span", {
|
|
140
|
+
class: normalizeClass(unref(nsUpload).be("list", "item-preview")),
|
|
141
|
+
onClick: ($event) => _ctx.handlePreview(file)
|
|
142
|
+
}, [
|
|
143
|
+
createVNode(unref(ElIcon), {
|
|
144
|
+
class: normalizeClass(unref(nsIcon).m("zoom-in"))
|
|
145
|
+
}, {
|
|
146
|
+
default: withCtx(() => [
|
|
147
|
+
createVNode(unref(ZoomIn))
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, ["class"])
|
|
151
|
+
], 10, ["onClick"]),
|
|
152
|
+
!unref(disabled) ? (openBlock(), createElementBlock("span", {
|
|
153
|
+
key: 0,
|
|
154
|
+
class: normalizeClass(unref(nsUpload).be("list", "item-delete")),
|
|
155
|
+
onClick: ($event) => handleRemove(file)
|
|
156
|
+
}, [
|
|
157
|
+
createVNode(unref(ElIcon), {
|
|
158
|
+
class: normalizeClass(unref(nsIcon).m("delete"))
|
|
159
|
+
}, {
|
|
160
|
+
default: withCtx(() => [
|
|
161
|
+
createVNode(unref(Delete))
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
}, 8, ["class"])
|
|
165
|
+
], 10, ["onClick"])) : createCommentVNode("v-if", true)
|
|
166
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
167
|
+
])
|
|
168
|
+
], 42, ["onKeydown", "onFocus", "onBlur", "onClick"]);
|
|
169
|
+
}), 128)),
|
|
170
|
+
renderSlot(_ctx.$slots, "append")
|
|
171
|
+
]),
|
|
172
|
+
_: 3
|
|
173
|
+
}, 8, ["class", "name"]);
|
|
174
|
+
};
|
|
27
175
|
}
|
|
28
176
|
});
|
|
29
|
-
|
|
30
|
-
remove: (file) => !!file
|
|
31
|
-
};
|
|
177
|
+
var UploadList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "upload-list.vue"]]);
|
|
32
178
|
|
|
33
|
-
export {
|
|
179
|
+
export { UploadList as default };
|
|
34
180
|
//# sourceMappingURL=upload-list2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-list2.mjs","sources":["../../../../../../packages/components/upload/src/upload-list.
|
|
1
|
+
{"version":3,"file":"upload-list2.mjs","sources":["../../../../../../packages/components/upload/src/upload-list.vue"],"sourcesContent":["<template>\n <transition-group tag=\"ul\" :class=\"containerKls\" :name=\"nsList.b()\">\n <li\n v-for=\"(file, index) in files\"\n :key=\"file.uid || file.name\"\n :class=\"[\n nsUpload.be('list', 'item'),\n nsUpload.is(file.status),\n { focusing },\n ]\"\n tabindex=\"0\"\n @keydown.delete=\"!disabled && handleRemove(file)\"\n @focus=\"focusing = true\"\n @blur=\"focusing = false\"\n @click=\"focusing = false\"\n >\n <slot :file=\"file\" :index=\"index\">\n <img\n v-if=\"\n listType === 'picture' ||\n (file.status !== 'uploading' && listType === 'picture-card')\n \"\n :class=\"nsUpload.be('list', 'item-thumbnail')\"\n :src=\"file.url\"\n :crossorigin=\"crossorigin\"\n alt=\"\"\n />\n <div\n v-if=\"file.status === 'uploading' || listType !== 'picture-card'\"\n :class=\"nsUpload.be('list', 'item-info')\"\n >\n <a\n :class=\"nsUpload.be('list', 'item-name')\"\n @click.prevent=\"handlePreview(file)\"\n >\n <el-icon :class=\"nsIcon.m('document')\">\n <Document />\n </el-icon>\n <span\n :class=\"nsUpload.be('list', 'item-file-name')\"\n :title=\"file.name\"\n >\n {{ file.name }}\n </span>\n </a>\n <el-progress\n v-if=\"file.status === 'uploading'\"\n :type=\"listType === 'picture-card' ? 'circle' : 'line'\"\n :stroke-width=\"listType === 'picture-card' ? 6 : 2\"\n :percentage=\"Number(file.percentage)\"\n :style=\"listType === 'picture-card' ? '' : 'margin-top: 0.5rem'\"\n />\n </div>\n\n <label :class=\"nsUpload.be('list', 'item-status-label')\">\n <el-icon\n v-if=\"listType === 'text'\"\n :class=\"[nsIcon.m('upload-success'), nsIcon.m('circle-check')]\"\n >\n <circle-check />\n </el-icon>\n <el-icon\n v-else-if=\"['picture-card', 'picture'].includes(listType)\"\n :class=\"[nsIcon.m('upload-success'), nsIcon.m('check')]\"\n >\n <Check />\n </el-icon>\n </label>\n <el-icon\n v-if=\"!disabled\"\n :class=\"nsIcon.m('close')\"\n @click=\"handleRemove(file)\"\n >\n <Close />\n </el-icon>\n <!-- Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn-->\n <!-- This is a bug which needs to be fixed -->\n <!-- TODO: Fix the incorrect navigation interaction -->\n <i v-if=\"!disabled\" :class=\"nsIcon.m('close-tip')\">{{\n t('el.upload.deleteTip')\n }}</i>\n <span\n v-if=\"listType === 'picture-card'\"\n :class=\"nsUpload.be('list', 'item-actions')\"\n >\n <span\n :class=\"nsUpload.be('list', 'item-preview')\"\n @click=\"handlePreview(file)\"\n >\n <el-icon :class=\"nsIcon.m('zoom-in')\"><zoom-in /></el-icon>\n </span>\n <span\n v-if=\"!disabled\"\n :class=\"nsUpload.be('list', 'item-delete')\"\n @click=\"handleRemove(file)\"\n >\n <el-icon :class=\"nsIcon.m('delete')\">\n <Delete />\n </el-icon>\n </span>\n </span>\n </slot>\n </li>\n <slot name=\"append\" />\n </transition-group>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n Check,\n CircleCheck,\n Close,\n Delete,\n Document,\n ZoomIn,\n} from '@element-plus/icons-vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport ElProgress from '@element-plus/components/progress'\nimport { useFormDisabled } from '@element-plus/components/form'\n\nimport { uploadListEmits, uploadListProps } from './upload-list'\nimport type { UploadFile } from './upload'\n\ndefineOptions({\n name: 'ElUploadList',\n})\n\nconst props = defineProps(uploadListProps)\nconst emit = defineEmits(uploadListEmits)\n\nconst { t } = useLocale()\nconst nsUpload = useNamespace('upload')\nconst nsIcon = useNamespace('icon')\nconst nsList = useNamespace('list')\nconst disabled = useFormDisabled()\n\nconst focusing = ref(false)\n\nconst containerKls = computed(() => [\n nsUpload.b('list'),\n nsUpload.bm('list', props.listType),\n nsUpload.is('disabled', props.disabled),\n])\n\nconst handleRemove = (file: UploadFile) => {\n emit('remove', file)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;mCA4Hc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,QAAA,GAAW,aAAa,QAAQ,CAAA,CAAA;AACtC,IAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA,CAAA;AAClC,IAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA,CAAA;AAClC,IAAA,MAAM,WAAW,eAAgB,EAAA,CAAA;AAEjC,IAAM,MAAA,QAAA,GAAW,IAAI,KAAK,CAAA,CAAA;AAE1B,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAAA,MAClC,QAAA,CAAS,EAAE,MAAM,CAAA;AAAA,MACjB,QAAS,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,QAAQ,CAAA;AAAA,MAClC,QAAS,CAAA,EAAA,CAAG,UAAY,EAAA,KAAA,CAAM,QAAQ,CAAA;AAAA,KACvC,CAAA,CAAA;AAED,IAAM,MAAA,YAAA,GAAe,CAAC,IAAqB,KAAA;AACzC,MAAA,IAAA,CAAK,UAAU,IAAI,CAAA,CAAA;AAAA,KACrB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -239,9 +239,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
239
239
|
readonly limit: NumberConstructor;
|
|
240
240
|
}>>, {
|
|
241
241
|
readonly data: import("../../../utils").EpPropMergeType<(new (...args: any[]) => ((rawFile: import("./upload").UploadRawFile) => import("../../../utils").Awaitable<import("../../../utils").Mutable<Record<string, any>>>) | import("../../../utils").Mutable<Record<string, any>> | Promise<import("../../../utils").Mutable<Record<string, any>>>) | (() => ((rawFile: import("./upload").UploadRawFile) => import("../../../utils").Awaitable<import("../../../utils").Mutable<Record<string, any>>>) | import("../../../utils").Awaitable<import("../../../utils").Mutable<Record<string, any>>>) | ((new (...args: any[]) => ((rawFile: import("./upload").UploadRawFile) => import("../../../utils").Awaitable<import("../../../utils").Mutable<Record<string, any>>>) | import("../../../utils").Mutable<Record<string, any>> | Promise<import("../../../utils").Mutable<Record<string, any>>>) | (() => ((rawFile: import("./upload").UploadRawFile) => import("../../../utils").Awaitable<import("../../../utils").Mutable<Record<string, any>>>) | import("../../../utils").Awaitable<import("../../../utils").Mutable<Record<string, any>>>))[], unknown, unknown>;
|
|
242
|
+
readonly disabled: boolean;
|
|
242
243
|
readonly drag: boolean;
|
|
243
244
|
readonly multiple: boolean;
|
|
244
|
-
readonly disabled: boolean;
|
|
245
245
|
readonly name: string;
|
|
246
246
|
readonly onChange: (uploadFile: import("./upload").UploadFile, uploadFiles: import("./upload").UploadFiles) => void;
|
|
247
247
|
readonly onError: (error: Error, uploadFile: import("./upload").UploadFile, uploadFiles: import("./upload").UploadFiles) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, shallowRef, computed, onBeforeUnmount, provide, toRef, openBlock, createElementBlock, unref, createBlock, createSlots, withCtx, createVNode, mergeProps, renderSlot, createCommentVNode } from 'vue';
|
|
2
2
|
import '../../form/index.mjs';
|
|
3
3
|
import { uploadContextKey } from './constants.mjs';
|
|
4
|
-
import UploadList from './upload-
|
|
4
|
+
import UploadList from './upload-list2.mjs';
|
|
5
5
|
import UploadContent from './upload-content2.mjs';
|
|
6
6
|
import { useHandlers } from './use-handlers.mjs';
|
|
7
7
|
import { uploadProps } from './upload.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Watermark from './src/
|
|
3
|
-
export { watermarkProps } from './src/
|
|
2
|
+
import Watermark from './src/watermark2.mjs';
|
|
3
|
+
export { watermarkProps } from './src/watermark.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElWatermark = withInstall(Watermark);
|
|
@@ -1,214 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { watermarkProps } from './watermark2.mjs';
|
|
4
|
-
import { getStyleStr, getPixelRatio, reRendering } from './utils.mjs';
|
|
5
|
-
import useClips, { FontGap } from './useClips.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
7
3
|
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
return (_b = (_a = props.font) == null ? void 0 : _a.fontStyle) != null ? _b : "normal";
|
|
34
|
-
});
|
|
35
|
-
const fontFamily = computed(() => {
|
|
36
|
-
var _a, _b;
|
|
37
|
-
return (_b = (_a = props.font) == null ? void 0 : _a.fontFamily) != null ? _b : "sans-serif";
|
|
38
|
-
});
|
|
39
|
-
const textAlign = computed(() => {
|
|
40
|
-
var _a, _b;
|
|
41
|
-
return (_b = (_a = props.font) == null ? void 0 : _a.textAlign) != null ? _b : "center";
|
|
42
|
-
});
|
|
43
|
-
const textBaseline = computed(() => {
|
|
44
|
-
var _a, _b;
|
|
45
|
-
return (_b = (_a = props.font) == null ? void 0 : _a.textBaseline) != null ? _b : "hanging";
|
|
46
|
-
});
|
|
47
|
-
const gapX = computed(() => props.gap[0]);
|
|
48
|
-
const gapY = computed(() => props.gap[1]);
|
|
49
|
-
const gapXCenter = computed(() => gapX.value / 2);
|
|
50
|
-
const gapYCenter = computed(() => gapY.value / 2);
|
|
51
|
-
const offsetLeft = computed(() => {
|
|
52
|
-
var _a, _b;
|
|
53
|
-
return (_b = (_a = props.offset) == null ? void 0 : _a[0]) != null ? _b : gapXCenter.value;
|
|
54
|
-
});
|
|
55
|
-
const offsetTop = computed(() => {
|
|
56
|
-
var _a, _b;
|
|
57
|
-
return (_b = (_a = props.offset) == null ? void 0 : _a[1]) != null ? _b : gapYCenter.value;
|
|
58
|
-
});
|
|
59
|
-
const getMarkStyle = () => {
|
|
60
|
-
const markStyle = {
|
|
61
|
-
zIndex: props.zIndex,
|
|
62
|
-
position: "absolute",
|
|
63
|
-
left: 0,
|
|
64
|
-
top: 0,
|
|
65
|
-
width: "100%",
|
|
66
|
-
height: "100%",
|
|
67
|
-
pointerEvents: "none",
|
|
68
|
-
backgroundRepeat: "repeat"
|
|
69
|
-
};
|
|
70
|
-
let positionLeft = offsetLeft.value - gapXCenter.value;
|
|
71
|
-
let positionTop = offsetTop.value - gapYCenter.value;
|
|
72
|
-
if (positionLeft > 0) {
|
|
73
|
-
markStyle.left = `${positionLeft}px`;
|
|
74
|
-
markStyle.width = `calc(100% - ${positionLeft}px)`;
|
|
75
|
-
positionLeft = 0;
|
|
76
|
-
}
|
|
77
|
-
if (positionTop > 0) {
|
|
78
|
-
markStyle.top = `${positionTop}px`;
|
|
79
|
-
markStyle.height = `calc(100% - ${positionTop}px)`;
|
|
80
|
-
positionTop = 0;
|
|
81
|
-
}
|
|
82
|
-
markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
|
|
83
|
-
return markStyle;
|
|
84
|
-
};
|
|
85
|
-
const containerRef = shallowRef(null);
|
|
86
|
-
const watermarkRef = shallowRef();
|
|
87
|
-
const stopObservation = ref(false);
|
|
88
|
-
const destroyWatermark = () => {
|
|
89
|
-
if (watermarkRef.value) {
|
|
90
|
-
watermarkRef.value.remove();
|
|
91
|
-
watermarkRef.value = void 0;
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
const appendWatermark = (base64Url, markWidth) => {
|
|
95
|
-
var _a;
|
|
96
|
-
if (containerRef.value && watermarkRef.value) {
|
|
97
|
-
stopObservation.value = true;
|
|
98
|
-
watermarkRef.value.setAttribute("style", getStyleStr({
|
|
99
|
-
...getMarkStyle(),
|
|
100
|
-
backgroundImage: `url('${base64Url}')`,
|
|
101
|
-
backgroundSize: `${Math.floor(markWidth)}px`
|
|
102
|
-
}));
|
|
103
|
-
(_a = containerRef.value) == null ? void 0 : _a.append(watermarkRef.value);
|
|
104
|
-
setTimeout(() => {
|
|
105
|
-
stopObservation.value = false;
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
const getMarkSize = (ctx) => {
|
|
110
|
-
let defaultWidth = 120;
|
|
111
|
-
let defaultHeight = 64;
|
|
112
|
-
const image = props.image;
|
|
113
|
-
const content = props.content;
|
|
114
|
-
const width = props.width;
|
|
115
|
-
const height = props.height;
|
|
116
|
-
if (!image && ctx.measureText) {
|
|
117
|
-
ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`;
|
|
118
|
-
const contents = Array.isArray(content) ? content : [content];
|
|
119
|
-
const sizes = contents.map((item) => {
|
|
120
|
-
const metrics = ctx.measureText(item);
|
|
121
|
-
return [
|
|
122
|
-
metrics.width,
|
|
123
|
-
metrics.fontBoundingBoxAscent !== void 0 ? metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent : metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent
|
|
124
|
-
];
|
|
125
|
-
});
|
|
126
|
-
defaultWidth = Math.ceil(Math.max(...sizes.map((size) => size[0])));
|
|
127
|
-
defaultHeight = Math.ceil(Math.max(...sizes.map((size) => size[1]))) * contents.length + (contents.length - 1) * FontGap;
|
|
128
|
-
}
|
|
129
|
-
return [width != null ? width : defaultWidth, height != null ? height : defaultHeight];
|
|
130
|
-
};
|
|
131
|
-
const getClips = useClips();
|
|
132
|
-
const renderWatermark = () => {
|
|
133
|
-
const canvas = document.createElement("canvas");
|
|
134
|
-
const ctx = canvas.getContext("2d");
|
|
135
|
-
const image = props.image;
|
|
136
|
-
const content = props.content;
|
|
137
|
-
const rotate = props.rotate;
|
|
138
|
-
if (ctx) {
|
|
139
|
-
if (!watermarkRef.value) {
|
|
140
|
-
watermarkRef.value = document.createElement("div");
|
|
141
|
-
}
|
|
142
|
-
const ratio = getPixelRatio();
|
|
143
|
-
const [markWidth, markHeight] = getMarkSize(ctx);
|
|
144
|
-
const drawCanvas = (drawContent) => {
|
|
145
|
-
const [textClips, clipWidth] = getClips(drawContent || "", rotate, ratio, markWidth, markHeight, {
|
|
146
|
-
color: color.value,
|
|
147
|
-
fontSize: fontSize.value,
|
|
148
|
-
fontStyle: fontStyle.value,
|
|
149
|
-
fontWeight: fontWeight.value,
|
|
150
|
-
fontFamily: fontFamily.value,
|
|
151
|
-
textAlign: textAlign.value,
|
|
152
|
-
textBaseline: textBaseline.value
|
|
153
|
-
}, gapX.value, gapY.value);
|
|
154
|
-
appendWatermark(textClips, clipWidth);
|
|
155
|
-
};
|
|
156
|
-
if (image) {
|
|
157
|
-
const img = new Image();
|
|
158
|
-
img.onload = () => {
|
|
159
|
-
drawCanvas(img);
|
|
160
|
-
};
|
|
161
|
-
img.onerror = () => {
|
|
162
|
-
drawCanvas(content);
|
|
163
|
-
};
|
|
164
|
-
img.crossOrigin = "anonymous";
|
|
165
|
-
img.referrerPolicy = "no-referrer";
|
|
166
|
-
img.src = image;
|
|
167
|
-
} else {
|
|
168
|
-
drawCanvas(content);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
onMounted(() => {
|
|
173
|
-
renderWatermark();
|
|
174
|
-
});
|
|
175
|
-
watch(() => props, () => {
|
|
176
|
-
renderWatermark();
|
|
177
|
-
}, {
|
|
178
|
-
deep: true,
|
|
179
|
-
flush: "post"
|
|
180
|
-
});
|
|
181
|
-
onBeforeUnmount(() => {
|
|
182
|
-
destroyWatermark();
|
|
183
|
-
});
|
|
184
|
-
const onMutate = (mutations) => {
|
|
185
|
-
if (stopObservation.value) {
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
mutations.forEach((mutation) => {
|
|
189
|
-
if (reRendering(mutation, watermarkRef.value)) {
|
|
190
|
-
destroyWatermark();
|
|
191
|
-
renderWatermark();
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
};
|
|
195
|
-
useMutationObserver(containerRef, onMutate, {
|
|
196
|
-
attributes: true,
|
|
197
|
-
subtree: true,
|
|
198
|
-
childList: true
|
|
199
|
-
});
|
|
200
|
-
return (_ctx, _cache) => {
|
|
201
|
-
return openBlock(), createElementBlock("div", {
|
|
202
|
-
ref_key: "containerRef",
|
|
203
|
-
ref: containerRef,
|
|
204
|
-
style: normalizeStyle([style])
|
|
205
|
-
}, [
|
|
206
|
-
renderSlot(_ctx.$slots, "default")
|
|
207
|
-
], 4);
|
|
208
|
-
};
|
|
4
|
+
const watermarkProps = buildProps({
|
|
5
|
+
zIndex: {
|
|
6
|
+
type: Number,
|
|
7
|
+
default: 9
|
|
8
|
+
},
|
|
9
|
+
rotate: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: -22
|
|
12
|
+
},
|
|
13
|
+
width: Number,
|
|
14
|
+
height: Number,
|
|
15
|
+
image: String,
|
|
16
|
+
content: {
|
|
17
|
+
type: definePropType([String, Array]),
|
|
18
|
+
default: "Element Plus"
|
|
19
|
+
},
|
|
20
|
+
font: {
|
|
21
|
+
type: definePropType(Object)
|
|
22
|
+
},
|
|
23
|
+
gap: {
|
|
24
|
+
type: definePropType(Array),
|
|
25
|
+
default: () => [100, 100]
|
|
26
|
+
},
|
|
27
|
+
offset: {
|
|
28
|
+
type: definePropType(Array)
|
|
209
29
|
}
|
|
210
30
|
});
|
|
211
|
-
var Watermark = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "watermark.vue"]]);
|
|
212
31
|
|
|
213
|
-
export {
|
|
32
|
+
export { watermarkProps };
|
|
214
33
|
//# sourceMappingURL=watermark.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watermark.mjs","sources":["../../../../../../packages/components/watermark/src/watermark.vue"],"sourcesContent":["<template>\n <div ref=\"containerRef\" :style=\"[style]\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n shallowRef,\n watch,\n} from 'vue'\nimport { useMutationObserver } from '@vueuse/core'\nimport { watermarkProps } from './watermark'\nimport { getPixelRatio, getStyleStr, reRendering } from './utils'\nimport useClips, { FontGap } from './useClips'\nimport type { WatermarkProps } from './watermark'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElWatermark',\n})\n\nconst style: CSSProperties = {\n position: 'relative',\n}\n\nconst props = defineProps(watermarkProps)\nconst color = computed(() => props.font?.color ?? 'rgba(0,0,0,.15)')\nconst fontSize = computed(() => props.font?.fontSize ?? 16)\nconst fontWeight = computed(() => props.font?.fontWeight ?? 'normal')\nconst fontStyle = computed(() => props.font?.fontStyle ?? 'normal')\nconst fontFamily = computed(() => props.font?.fontFamily ?? 'sans-serif')\nconst textAlign = computed(() => props.font?.textAlign ?? 'center')\nconst textBaseline = computed(() => props.font?.textBaseline ?? 'hanging')\n\nconst gapX = computed(() => props.gap[0])\nconst gapY = computed(() => props.gap[1])\nconst gapXCenter = computed(() => gapX.value / 2)\nconst gapYCenter = computed(() => gapY.value / 2)\nconst offsetLeft = computed(() => props.offset?.[0] ?? gapXCenter.value)\nconst offsetTop = computed(() => props.offset?.[1] ?? gapYCenter.value)\n\nconst getMarkStyle = () => {\n const markStyle: CSSProperties = {\n zIndex: props.zIndex,\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n backgroundRepeat: 'repeat',\n }\n\n /** Calculate the style of the offset */\n let positionLeft = offsetLeft.value - gapXCenter.value\n let positionTop = offsetTop.value - gapYCenter.value\n if (positionLeft > 0) {\n markStyle.left = `${positionLeft}px`\n markStyle.width = `calc(100% - ${positionLeft}px)`\n positionLeft = 0\n }\n if (positionTop > 0) {\n markStyle.top = `${positionTop}px`\n markStyle.height = `calc(100% - ${positionTop}px)`\n positionTop = 0\n }\n markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`\n\n return markStyle\n}\n\nconst containerRef = shallowRef<HTMLDivElement | null>(null)\nconst watermarkRef = shallowRef<HTMLDivElement>()\nconst stopObservation = ref(false)\n\nconst destroyWatermark = () => {\n if (watermarkRef.value) {\n watermarkRef.value.remove()\n watermarkRef.value = undefined\n }\n}\nconst appendWatermark = (base64Url: string, markWidth: number) => {\n if (containerRef.value && watermarkRef.value) {\n stopObservation.value = true\n watermarkRef.value.setAttribute(\n 'style',\n getStyleStr({\n ...getMarkStyle(),\n backgroundImage: `url('${base64Url}')`,\n backgroundSize: `${Math.floor(markWidth)}px`,\n })\n )\n containerRef.value?.append(watermarkRef.value)\n // Delayed execution\n setTimeout(() => {\n stopObservation.value = false\n })\n }\n}\n\n/**\n * Get the width and height of the watermark. The default values are as follows\n * Image: [120, 64]; Content: It's calculated by content;\n */\nconst getMarkSize = (ctx: CanvasRenderingContext2D) => {\n let defaultWidth = 120\n let defaultHeight = 64\n const image = props.image\n const content = props.content\n const width = props.width\n const height = props.height\n if (!image && ctx.measureText) {\n ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`\n const contents = Array.isArray(content) ? content : [content]\n const sizes = contents.map((item) => {\n const metrics = ctx.measureText(item!)\n\n return [\n metrics.width,\n // Using `actualBoundingBoxAscent` to be compatible with lower version browsers (eg: Firefox < 116)\n metrics.fontBoundingBoxAscent !== undefined\n ? metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent\n : metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent,\n ]\n })\n defaultWidth = Math.ceil(Math.max(...sizes.map((size) => size[0])))\n defaultHeight =\n Math.ceil(Math.max(...sizes.map((size) => size[1]))) * contents.length +\n (contents.length - 1) * FontGap\n }\n return [width ?? defaultWidth, height ?? defaultHeight] as const\n}\n\nconst getClips = useClips()\n\nconst renderWatermark = () => {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')\n const image = props.image\n const content = props.content\n const rotate = props.rotate\n\n if (ctx) {\n if (!watermarkRef.value) {\n watermarkRef.value = document.createElement('div')\n }\n\n const ratio = getPixelRatio()\n const [markWidth, markHeight] = getMarkSize(ctx)\n\n const drawCanvas = (\n drawContent?: NonNullable<WatermarkProps['content']> | HTMLImageElement\n ) => {\n const [textClips, clipWidth] = getClips(\n drawContent || '',\n rotate,\n ratio,\n markWidth,\n markHeight,\n {\n color: color.value,\n fontSize: fontSize.value,\n fontStyle: fontStyle.value,\n fontWeight: fontWeight.value,\n fontFamily: fontFamily.value,\n textAlign: textAlign.value,\n textBaseline: textBaseline.value,\n },\n gapX.value,\n gapY.value\n )\n\n appendWatermark(textClips, clipWidth)\n }\n\n if (image) {\n const img = new Image()\n img.onload = () => {\n drawCanvas(img)\n }\n img.onerror = () => {\n drawCanvas(content)\n }\n img.crossOrigin = 'anonymous'\n img.referrerPolicy = 'no-referrer'\n img.src = image\n } else {\n drawCanvas(content)\n }\n }\n}\n\nonMounted(() => {\n renderWatermark()\n})\n\nwatch(\n () => props,\n () => {\n renderWatermark()\n },\n {\n deep: true,\n flush: 'post',\n }\n)\n\nonBeforeUnmount(() => {\n destroyWatermark()\n})\n\nconst onMutate = (mutations: MutationRecord[]) => {\n if (stopObservation.value) {\n return\n }\n mutations.forEach((mutation) => {\n if (reRendering(mutation, watermarkRef.value)) {\n destroyWatermark()\n renderWatermark()\n }\n })\n}\n\nuseMutationObserver(containerRef, onMutate, {\n attributes: true,\n subtree: true,\n childList: true,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;mCAsBc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAA,MAAM,KAAuB,GAAA;AAAA,MAC3B,QAAU,EAAA,UAAA;AAAA,KACZ,CAAA;AAGA,IAAA,MAAM,QAAQ,QAAS,CAAA,MAAM;AAC7B,MAAA,IAAM;AACN,MAAA,mBAA4B,KAAA,CAAA,IAAA,KAAY,IAAA,GAAA,iBAAoB,KAAQ,IAAA,GAAA,EAAA,GAAA,iBAAA,CAAA;AACpE,KAAA,CAAA,CAAA;AACA,IAAA,MAAM,mBAAsB,CAAA,MAAA;AAC5B,MAAA,IAAM;AACN,MAAA,mBAAqB,KAAS,CAAA,IAAA,KAAM,IAAM,GAAA,KAAM,oBAAyB,IAAA,GAAA,EAAA,GAAA,EAAA,CAAA;AAEzE,KAAA,CAAA,CAAA;AACA,IAAA,MAAM,UAAgB,GAAA,QAAA,CAAM,MAAM;AAClC,MAAA,IAAM,EAAa,EAAA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AAA,CAAA,OAAA,GAAA,MAAA;AAAA,YACA,UAAA,CAAA,OAAA,CAAA,CAAA;AACJ,WAAgB,CAAA;AAAA,UAClB,GAAA,CAAA,WAAA,GAAA,WAAA,CAAA;AAAA,UACA,GAAA,CAAA,cAAA,GAAA,aAAA,CAAA;AAAA,UACQ,GAAA,CAAA,GAAA,GAAA,KAAA,CAAA;AAAA,SACC,MAAA;AAAA,UACT,UAAA,CAAA,OAAA,CAAA,CAAA;AAAA,SACF;AAEA,OAAA;AACE,KAAiB,CAAA;AAAA,IACnB,SAAC,CAAA,MAAA;AAED,MAAM,eAAW,EAAiC,CAAA;AAChD,KAAA,CAAA,CAAA;AACE,IAAA,KAAA,CAAA,MAAA,KAAA,EAAA,MAAA;AAAA,MACF,eAAA,EAAA,CAAA;AACA,KAAU,EAAA;AACR,MAAA,IAAA,EAAI,IAAY;AACd,MAAiB,KAAA,EAAA,MAAA;AACjB,KAAgB,CAAA,CAAA;AAAA,IAClB,eAAA,CAAA,MAAA;AAAA,MACF,gBAAC,EAAA,CAAA;AAAA,KACH,CAAA,CAAA;AAEA,IAAA,MAAA,QAAA,GAAA,CAAA;AAA4C,MAC1C,IAAY,eAAA,CAAA,KAAA,EAAA;AAAA,QACH,OAAA;AAAA,OACE;AAAA,MACZ,SAAA,CAAA,OAAA,CAAA,CAAA,QAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"watermark.mjs","sources":["../../../../../../packages/components/watermark/src/watermark.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Watermark from './watermark.vue'\n\nexport interface WatermarkFontType {\n color?: string\n fontSize?: number | string\n fontWeight?: 'normal' | 'light' | 'weight' | number\n fontStyle?: 'none' | 'normal' | 'italic' | 'oblique'\n fontFamily?: string\n textAlign?: 'start' | 'end' | 'left' | 'right' | 'center'\n textBaseline?:\n | 'top'\n | 'hanging'\n | 'middle'\n | 'alphabetic'\n | 'ideographic'\n | 'bottom'\n}\n\nexport const watermarkProps = buildProps({\n /**\n * @description The z-index of the appended watermark element\n */\n zIndex: {\n type: Number,\n default: 9,\n },\n /**\n * @description The rotation angle of the watermark\n */\n rotate: {\n type: Number,\n default: -22,\n },\n /**\n * @description The width of the watermark\n */\n width: Number,\n /**\n * @description The height of the watermark\n */\n height: Number,\n /**\n * @description Image source, it is recommended to export 2x or 3x image, high priority (support base64 format)\n */\n image: String,\n /**\n * @description Watermark text content\n */\n content: {\n type: definePropType<string | string[]>([String, Array]),\n default: 'Element Plus',\n },\n /**\n * @description Text style\n */\n font: {\n type: definePropType<WatermarkFontType>(Object),\n },\n /**\n * @description The spacing between watermarks\n */\n gap: {\n type: definePropType<[number, number]>(Array),\n default: () => [100, 100],\n },\n /**\n * @description The offset of the watermark from the upper left corner of the container. The default is gap/2\n */\n offset: {\n type: definePropType<[number, number]>(Array),\n },\n} as const)\n\nexport type WatermarkProps = ExtractPropTypes<typeof watermarkProps>\nexport type WatermarkInstance = InstanceType<typeof Watermark>\n"],"names":[],"mappings":";;;AACY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC,EAAE;AAChB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,OAAO,EAAE,cAAc;AAC3B,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;AAC7B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,CAAC;;;;"}
|