@element-plus/nightly 0.0.20250616 → 0.0.20250618
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 +113 -92
- package/dist/index.full.min.js +18 -18
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +18 -18
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +113 -92
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +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/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +41 -108
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +108 -41
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -53
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +53 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/button/index.mjs +3 -3
- package/es/components/button/src/button-group.mjs +29 -6
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +6 -29
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/button/src/button.mjs +62 -87
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +87 -62
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +4 -1
- package/es/components/cascader/src/cascader2.mjs +64 -62
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +399 -39
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +39 -399
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/date-picker/src/composables/use-basic-date-table.d.ts +1 -1
- package/es/components/date-picker/src/composables/use-basic-date-table.mjs +11 -12
- package/es/components/date-picker/src/composables/use-basic-date-table.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-date-table.mjs +5 -4
- package/es/components/date-picker/src/date-picker-com/basic-date-table.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +2 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +3 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +4 -2
- 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 +3 -0
- package/es/components/date-picker/src/date-picker.d.ts +3 -0
- package/es/components/date-picker/src/panel-utils.d.ts +16 -2
- package/es/components/date-picker/src/props/date-picker.d.ts +1 -0
- package/es/components/date-picker/src/props/panel-date-pick.d.ts +1 -0
- package/es/components/date-picker/src/props/panel-date-range.d.ts +1 -0
- package/es/components/date-picker/src/props/shared.d.ts +1 -0
- package/es/components/date-picker/src/props/shared.mjs +2 -1
- package/es/components/date-picker/src/props/shared.mjs.map +1 -1
- package/es/components/divider/index.mjs +2 -2
- package/es/components/divider/src/divider.mjs +34 -16
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider2.mjs +16 -34
- package/es/components/divider/src/divider2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +52 -11
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +11 -52
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form.mjs +54 -161
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +161 -54
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +447 -49
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +49 -447
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +19 -19
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +103 -437
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +437 -103
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-tag/index.mjs +2 -2
- package/es/components/input-tag/src/input-tag.mjs +73 -215
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag2.mjs +215 -73
- package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
- package/es/components/mention/index.mjs +2 -2
- package/es/components/mention/src/mention-dropdown.mjs +15 -166
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +166 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention.mjs +287 -65
- package/es/components/mention/src/mention.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +65 -287
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +4 -33
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +33 -4
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +73 -140
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +140 -73
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/pagination/src/components/total.mjs +6 -26
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +26 -6
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +45 -114
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +114 -45
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton.mjs +48 -21
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +21 -48
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/splitter/src/split-bar.vue.d.ts +1 -1
- package/es/components/splitter/src/splitter.vue.d.ts +2 -0
- package/es/components/splitter/src/splitter2.mjs +6 -2
- package/es/components/splitter/src/splitter2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +191 -19
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +19 -191
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/tabs/src/tabs.mjs +15 -6
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +1 -0
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +4 -0
- package/es/components/time-picker/src/common/props.d.ts +1 -0
- package/es/components/time-picker/src/common/props.mjs +2 -1
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +3 -0
- package/es/components/tour/index.mjs +3 -3
- package/es/components/tour/src/content.mjs +67 -43
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +43 -67
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/mask.mjs +18 -75
- package/es/components/tour/src/mask.mjs.map +1 -1
- package/es/components/tour/src/mask2.mjs +75 -18
- package/es/components/tour/src/mask2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +44 -168
- package/es/components/tour/src/step.mjs.map +1 -1
- package/es/components/tour/src/step2.mjs +168 -44
- package/es/components/tour/src/step2.mjs.map +1 -1
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/components/tour/src/tour2.mjs +2 -2
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +19 -130
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +130 -19
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +27 -220
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +220 -27
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.d.ts +17 -0
- package/es/index.mjs +19 -19
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +42 -107
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +107 -42
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -53
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +53 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/button/index.js +3 -3
- package/lib/components/button/src/button-group.js +29 -6
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +6 -29
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/button/src/button.js +65 -87
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button2.js +87 -65
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +4 -1
- package/lib/components/cascader/src/cascader2.js +64 -62
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +398 -40
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +40 -398
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/date-picker/src/composables/use-basic-date-table.d.ts +1 -1
- package/lib/components/date-picker/src/composables/use-basic-date-table.js +11 -12
- package/lib/components/date-picker/src/composables/use-basic-date-table.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.js +4 -3
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +2 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +3 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +4 -2
- 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 +3 -0
- package/lib/components/date-picker/src/date-picker.d.ts +3 -0
- package/lib/components/date-picker/src/panel-utils.d.ts +16 -2
- package/lib/components/date-picker/src/props/date-picker.d.ts +1 -0
- package/lib/components/date-picker/src/props/panel-date-pick.d.ts +1 -0
- package/lib/components/date-picker/src/props/panel-date-range.d.ts +1 -0
- package/lib/components/date-picker/src/props/shared.d.ts +1 -0
- package/lib/components/date-picker/src/props/shared.js +2 -1
- package/lib/components/date-picker/src/props/shared.js.map +1 -1
- package/lib/components/divider/index.js +2 -2
- package/lib/components/divider/src/divider.js +34 -16
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider2.js +16 -34
- package/lib/components/divider/src/divider2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +52 -11
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +11 -52
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form.js +55 -160
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form2.js +160 -55
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +447 -50
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +50 -447
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +19 -19
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +101 -434
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +434 -101
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-tag/index.js +2 -2
- package/lib/components/input-tag/src/input-tag.js +73 -214
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag2.js +214 -73
- package/lib/components/input-tag/src/input-tag2.js.map +1 -1
- package/lib/components/mention/index.js +2 -2
- package/lib/components/mention/src/mention-dropdown.js +16 -166
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +166 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention.js +285 -64
- package/lib/components/mention/src/mention.js.map +1 -1
- package/lib/components/mention/src/mention2.js +64 -285
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +4 -33
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +33 -4
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +74 -139
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +139 -74
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/pagination/src/components/total.js +6 -26
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +26 -6
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +46 -114
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +114 -46
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -31
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +31 -27
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton.js +48 -21
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +21 -48
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/splitter/src/split-bar.vue.d.ts +1 -1
- package/lib/components/splitter/src/splitter.vue.d.ts +2 -0
- package/lib/components/splitter/src/splitter2.js +6 -2
- package/lib/components/splitter/src/splitter2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +191 -19
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +19 -191
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/tabs/src/tabs.js +15 -6
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +1 -0
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +4 -0
- package/lib/components/time-picker/src/common/props.d.ts +1 -0
- package/lib/components/time-picker/src/common/props.js +2 -1
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +3 -0
- package/lib/components/tour/index.js +3 -3
- package/lib/components/tour/src/content.js +67 -46
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +46 -67
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/mask.js +18 -75
- package/lib/components/tour/src/mask.js.map +1 -1
- package/lib/components/tour/src/mask2.js +75 -18
- package/lib/components/tour/src/mask2.js.map +1 -1
- package/lib/components/tour/src/step.js +44 -167
- package/lib/components/tour/src/step.js.map +1 -1
- package/lib/components/tour/src/step2.js +167 -44
- package/lib/components/tour/src/step2.js.map +1 -1
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/components/tour/src/tour2.js +2 -2
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +21 -130
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +130 -21
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +27 -220
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +220 -27
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.d.ts +17 -0
- package/lib/index.js +19 -19
- 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-date-picker.css +1 -1
- package/theme-chalk/el-tabs.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/date-picker/date-table.scss +7 -1
- package/theme-chalk/src/tabs.scss +12 -2
- package/web-types.json +1 -1
@@ -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 { isArray, isUndefined } from '@element-plus/utils'\nimport { watermarkProps } from './watermark'\nimport { getPixelRatio, getStyleStr, reRendering } from './utils'\nimport useClips, { FontGap } from './useClips'\n\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\n const { image, content, width, height, rotate } = props\n\n if (!image && ctx.measureText) {\n ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`\n\n const contents = isArray(content) ? content : [content]\n let maxWidth = 0\n let maxHeight = 0\n\n contents.forEach((item) => {\n const {\n width,\n fontBoundingBoxAscent,\n fontBoundingBoxDescent,\n actualBoundingBoxAscent,\n actualBoundingBoxDescent,\n } = ctx.measureText(item!)\n // Using `actualBoundingBoxAscent` to be compatible with lower version browsers (eg: Firefox < 116)\n const height = isUndefined(fontBoundingBoxAscent)\n ? actualBoundingBoxAscent + actualBoundingBoxDescent\n : fontBoundingBoxAscent + fontBoundingBoxDescent\n\n if (width > maxWidth) maxWidth = Math.ceil(width)\n if (height > maxHeight) maxHeight = Math.ceil(height)\n })\n\n defaultWidth = maxWidth\n defaultHeight =\n maxHeight * contents.length + (contents.length - 1) * FontGap\n\n const angle = (Math.PI / 180) * Number(rotate)\n const space = Math.ceil(Math.abs(Math.sin(angle) * defaultHeight) / 2)\n\n defaultWidth += space\n }\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":["width","height"],"mappings":";;;;;;;;;mCAwBc,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,EAAA,CAAA;AACnB,MAAA,OAAmB,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAA,IAAe,KAAA,YAAc,CAAA,GAAA,EAAA,CAAA,UAAA,KAAA,IAAA,GAAA,EAAA,GAAA,QAAA,CAAA;AAChD,KAAM,CAAA,CAAA;AACN,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAEjC,MAAA,IAAM;AACJ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A,WACQ,CAAA;AAAA,UACC,GAAA,CAAA,WAAA,GAAA,WAAA,CAAA;AAAA,UACT,GAAA,CAAA,cAAA,GAAA,aAAA,CAAA;AAAA,UACF,GAAA,CAAA,GAAA,GAAA,KAAA,CAAA;AAEA,SAAA,MAAA;AACE,UAAiB,UAAA,CAAA,OAAA,CAAA,CAAA;AAAA,SAClB;AAED,OAAM;AACJ,KAAA,CAAA;AACE,IAAA,SAAA,CAAA,MAAA;AAAA,MACF,eAAA,EAAA,CAAA;AACA,KAAU,CAAA,CAAA;AACR,IAAA,KAAA,CAAA,MAAgB,KAAA,EAAA,MAAA;AACd,MAAiB,eAAA,EAAA,CAAA;AACjB,KAAgB,EAAA;AAAA,MAClB,IAAA,EAAA,IAAA;AAAA,MACF,KAAC,EAAA,MAAA;AAAA,KACH,CAAA,CAAA;AAEA,IAAA,eAAA,CAAA;AAA4C,MAC1C,gBAAY,EAAA,CAAA;AAAA,KAAA,CACZ,CAAS;AAAA,IAAA,MACE,QAAA,GAAA,CAAA,SAAA,KAAA;AAAA,MACZ,IAAA,eAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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> & unknown\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;;;;"}
|
@@ -1,32 +1,225 @@
|
|
1
|
-
import {
|
1
|
+
import { defineComponent, computed, shallowRef, ref, onMounted, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeStyle, renderSlot } from 'vue';
|
2
|
+
import { useMutationObserver } from '@vueuse/core';
|
3
|
+
import { watermarkProps } from './watermark.mjs';
|
4
|
+
import { reRendering, getStyleStr, getPixelRatio } from './utils.mjs';
|
5
|
+
import useClips, { FontGap } from './useClips.mjs';
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
7
|
+
import { isArray } from '@vue/shared';
|
8
|
+
import { isUndefined } from '../../../utils/types.mjs';
|
2
9
|
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
10
|
+
const __default__ = defineComponent({
|
11
|
+
name: "ElWatermark"
|
12
|
+
});
|
13
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
14
|
+
...__default__,
|
15
|
+
props: watermarkProps,
|
16
|
+
setup(__props) {
|
17
|
+
const props = __props;
|
18
|
+
const style = {
|
19
|
+
position: "relative"
|
20
|
+
};
|
21
|
+
const color = computed(() => {
|
22
|
+
var _a, _b;
|
23
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.color) != null ? _b : "rgba(0,0,0,.15)";
|
24
|
+
});
|
25
|
+
const fontSize = computed(() => {
|
26
|
+
var _a, _b;
|
27
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontSize) != null ? _b : 16;
|
28
|
+
});
|
29
|
+
const fontWeight = computed(() => {
|
30
|
+
var _a, _b;
|
31
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontWeight) != null ? _b : "normal";
|
32
|
+
});
|
33
|
+
const fontStyle = computed(() => {
|
34
|
+
var _a, _b;
|
35
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontStyle) != null ? _b : "normal";
|
36
|
+
});
|
37
|
+
const fontFamily = computed(() => {
|
38
|
+
var _a, _b;
|
39
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontFamily) != null ? _b : "sans-serif";
|
40
|
+
});
|
41
|
+
const textAlign = computed(() => {
|
42
|
+
var _a, _b;
|
43
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.textAlign) != null ? _b : "center";
|
44
|
+
});
|
45
|
+
const textBaseline = computed(() => {
|
46
|
+
var _a, _b;
|
47
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.textBaseline) != null ? _b : "hanging";
|
48
|
+
});
|
49
|
+
const gapX = computed(() => props.gap[0]);
|
50
|
+
const gapY = computed(() => props.gap[1]);
|
51
|
+
const gapXCenter = computed(() => gapX.value / 2);
|
52
|
+
const gapYCenter = computed(() => gapY.value / 2);
|
53
|
+
const offsetLeft = computed(() => {
|
54
|
+
var _a, _b;
|
55
|
+
return (_b = (_a = props.offset) == null ? void 0 : _a[0]) != null ? _b : gapXCenter.value;
|
56
|
+
});
|
57
|
+
const offsetTop = computed(() => {
|
58
|
+
var _a, _b;
|
59
|
+
return (_b = (_a = props.offset) == null ? void 0 : _a[1]) != null ? _b : gapYCenter.value;
|
60
|
+
});
|
61
|
+
const getMarkStyle = () => {
|
62
|
+
const markStyle = {
|
63
|
+
zIndex: props.zIndex,
|
64
|
+
position: "absolute",
|
65
|
+
left: 0,
|
66
|
+
top: 0,
|
67
|
+
width: "100%",
|
68
|
+
height: "100%",
|
69
|
+
pointerEvents: "none",
|
70
|
+
backgroundRepeat: "repeat"
|
71
|
+
};
|
72
|
+
let positionLeft = offsetLeft.value - gapXCenter.value;
|
73
|
+
let positionTop = offsetTop.value - gapYCenter.value;
|
74
|
+
if (positionLeft > 0) {
|
75
|
+
markStyle.left = `${positionLeft}px`;
|
76
|
+
markStyle.width = `calc(100% - ${positionLeft}px)`;
|
77
|
+
positionLeft = 0;
|
78
|
+
}
|
79
|
+
if (positionTop > 0) {
|
80
|
+
markStyle.top = `${positionTop}px`;
|
81
|
+
markStyle.height = `calc(100% - ${positionTop}px)`;
|
82
|
+
positionTop = 0;
|
83
|
+
}
|
84
|
+
markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
|
85
|
+
return markStyle;
|
86
|
+
};
|
87
|
+
const containerRef = shallowRef(null);
|
88
|
+
const watermarkRef = shallowRef();
|
89
|
+
const stopObservation = ref(false);
|
90
|
+
const destroyWatermark = () => {
|
91
|
+
if (watermarkRef.value) {
|
92
|
+
watermarkRef.value.remove();
|
93
|
+
watermarkRef.value = void 0;
|
94
|
+
}
|
95
|
+
};
|
96
|
+
const appendWatermark = (base64Url, markWidth) => {
|
97
|
+
var _a;
|
98
|
+
if (containerRef.value && watermarkRef.value) {
|
99
|
+
stopObservation.value = true;
|
100
|
+
watermarkRef.value.setAttribute("style", getStyleStr({
|
101
|
+
...getMarkStyle(),
|
102
|
+
backgroundImage: `url('${base64Url}')`,
|
103
|
+
backgroundSize: `${Math.floor(markWidth)}px`
|
104
|
+
}));
|
105
|
+
(_a = containerRef.value) == null ? void 0 : _a.append(watermarkRef.value);
|
106
|
+
setTimeout(() => {
|
107
|
+
stopObservation.value = false;
|
108
|
+
});
|
109
|
+
}
|
110
|
+
};
|
111
|
+
const getMarkSize = (ctx) => {
|
112
|
+
let defaultWidth = 120;
|
113
|
+
let defaultHeight = 64;
|
114
|
+
const { image, content, width, height, rotate } = props;
|
115
|
+
if (!image && ctx.measureText) {
|
116
|
+
ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`;
|
117
|
+
const contents = isArray(content) ? content : [content];
|
118
|
+
let maxWidth = 0;
|
119
|
+
let maxHeight = 0;
|
120
|
+
contents.forEach((item) => {
|
121
|
+
const {
|
122
|
+
width: width2,
|
123
|
+
fontBoundingBoxAscent,
|
124
|
+
fontBoundingBoxDescent,
|
125
|
+
actualBoundingBoxAscent,
|
126
|
+
actualBoundingBoxDescent
|
127
|
+
} = ctx.measureText(item);
|
128
|
+
const height2 = isUndefined(fontBoundingBoxAscent) ? actualBoundingBoxAscent + actualBoundingBoxDescent : fontBoundingBoxAscent + fontBoundingBoxDescent;
|
129
|
+
if (width2 > maxWidth)
|
130
|
+
maxWidth = Math.ceil(width2);
|
131
|
+
if (height2 > maxHeight)
|
132
|
+
maxHeight = Math.ceil(height2);
|
133
|
+
});
|
134
|
+
defaultWidth = maxWidth;
|
135
|
+
defaultHeight = maxHeight * contents.length + (contents.length - 1) * FontGap;
|
136
|
+
const angle = Math.PI / 180 * Number(rotate);
|
137
|
+
const space = Math.ceil(Math.abs(Math.sin(angle) * defaultHeight) / 2);
|
138
|
+
defaultWidth += space;
|
139
|
+
}
|
140
|
+
return [width != null ? width : defaultWidth, height != null ? height : defaultHeight];
|
141
|
+
};
|
142
|
+
const getClips = useClips();
|
143
|
+
const renderWatermark = () => {
|
144
|
+
const canvas = document.createElement("canvas");
|
145
|
+
const ctx = canvas.getContext("2d");
|
146
|
+
const image = props.image;
|
147
|
+
const content = props.content;
|
148
|
+
const rotate = props.rotate;
|
149
|
+
if (ctx) {
|
150
|
+
if (!watermarkRef.value) {
|
151
|
+
watermarkRef.value = document.createElement("div");
|
152
|
+
}
|
153
|
+
const ratio = getPixelRatio();
|
154
|
+
const [markWidth, markHeight] = getMarkSize(ctx);
|
155
|
+
const drawCanvas = (drawContent) => {
|
156
|
+
const [textClips, clipWidth] = getClips(drawContent || "", rotate, ratio, markWidth, markHeight, {
|
157
|
+
color: color.value,
|
158
|
+
fontSize: fontSize.value,
|
159
|
+
fontStyle: fontStyle.value,
|
160
|
+
fontWeight: fontWeight.value,
|
161
|
+
fontFamily: fontFamily.value,
|
162
|
+
textAlign: textAlign.value,
|
163
|
+
textBaseline: textBaseline.value
|
164
|
+
}, gapX.value, gapY.value);
|
165
|
+
appendWatermark(textClips, clipWidth);
|
166
|
+
};
|
167
|
+
if (image) {
|
168
|
+
const img = new Image();
|
169
|
+
img.onload = () => {
|
170
|
+
drawCanvas(img);
|
171
|
+
};
|
172
|
+
img.onerror = () => {
|
173
|
+
drawCanvas(content);
|
174
|
+
};
|
175
|
+
img.crossOrigin = "anonymous";
|
176
|
+
img.referrerPolicy = "no-referrer";
|
177
|
+
img.src = image;
|
178
|
+
} else {
|
179
|
+
drawCanvas(content);
|
180
|
+
}
|
181
|
+
}
|
182
|
+
};
|
183
|
+
onMounted(() => {
|
184
|
+
renderWatermark();
|
185
|
+
});
|
186
|
+
watch(() => props, () => {
|
187
|
+
renderWatermark();
|
188
|
+
}, {
|
189
|
+
deep: true,
|
190
|
+
flush: "post"
|
191
|
+
});
|
192
|
+
onBeforeUnmount(() => {
|
193
|
+
destroyWatermark();
|
194
|
+
});
|
195
|
+
const onMutate = (mutations) => {
|
196
|
+
if (stopObservation.value) {
|
197
|
+
return;
|
198
|
+
}
|
199
|
+
mutations.forEach((mutation) => {
|
200
|
+
if (reRendering(mutation, watermarkRef.value)) {
|
201
|
+
destroyWatermark();
|
202
|
+
renderWatermark();
|
203
|
+
}
|
204
|
+
});
|
205
|
+
};
|
206
|
+
useMutationObserver(containerRef, onMutate, {
|
207
|
+
attributes: true,
|
208
|
+
subtree: true,
|
209
|
+
childList: true
|
210
|
+
});
|
211
|
+
return (_ctx, _cache) => {
|
212
|
+
return openBlock(), createElementBlock("div", {
|
213
|
+
ref_key: "containerRef",
|
214
|
+
ref: containerRef,
|
215
|
+
style: normalizeStyle([style])
|
216
|
+
}, [
|
217
|
+
renderSlot(_ctx.$slots, "default")
|
218
|
+
], 4);
|
219
|
+
};
|
28
220
|
}
|
29
221
|
});
|
222
|
+
var Watermark = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "watermark.vue"]]);
|
30
223
|
|
31
|
-
export {
|
224
|
+
export { Watermark as default };
|
32
225
|
//# sourceMappingURL=watermark2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"watermark2.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> & unknown\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;;;;"}
|
1
|
+
{"version":3,"file":"watermark2.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 { isArray, isUndefined } from '@element-plus/utils'\nimport { watermarkProps } from './watermark'\nimport { getPixelRatio, getStyleStr, reRendering } from './utils'\nimport useClips, { FontGap } from './useClips'\n\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\n const { image, content, width, height, rotate } = props\n\n if (!image && ctx.measureText) {\n ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`\n\n const contents = isArray(content) ? content : [content]\n let maxWidth = 0\n let maxHeight = 0\n\n contents.forEach((item) => {\n const {\n width,\n fontBoundingBoxAscent,\n fontBoundingBoxDescent,\n actualBoundingBoxAscent,\n actualBoundingBoxDescent,\n } = ctx.measureText(item!)\n // Using `actualBoundingBoxAscent` to be compatible with lower version browsers (eg: Firefox < 116)\n const height = isUndefined(fontBoundingBoxAscent)\n ? actualBoundingBoxAscent + actualBoundingBoxDescent\n : fontBoundingBoxAscent + fontBoundingBoxDescent\n\n if (width > maxWidth) maxWidth = Math.ceil(width)\n if (height > maxHeight) maxHeight = Math.ceil(height)\n })\n\n defaultWidth = maxWidth\n defaultHeight =\n maxHeight * contents.length + (contents.length - 1) * FontGap\n\n const angle = (Math.PI / 180) * Number(rotate)\n const space = Math.ceil(Math.abs(Math.sin(angle) * defaultHeight) / 2)\n\n defaultWidth += space\n }\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":["width","height"],"mappings":";;;;;;;;;mCAwBc,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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AAA,eAAgB,CAAA,SAAA,EAAA,SAAA,CAAA,CAAA;AACd,SAAgB,CAAA;AAAA,QACjB,IAAA,KAAA,EAAA;AAED,UAAA,MAAA,GAAA,GAAA,IAAA,KAAA,EAAA,CAAA;AAAA,UACQ,GAAA,CAAA,MAAA,GAAA,MAAA;AAAA,YACA,UAAA,CAAA,GAAA,CAAA,CAAA;AACJ,WAAgB,CAAA;AAAA,UAClB,GAAA,CAAA,OAAA,GAAA,MAAA;AAAA,YACA,UAAA,CAAA,OAAA,CAAA,CAAA;AAAA,WACQ,CAAA;AAAA,UACC,GAAA,CAAA,WAAA,GAAA,WAAA,CAAA;AAAA,UACT,GAAA,CAAA,cAAA,GAAA,aAAA,CAAA;AAAA,UACF,GAAA,CAAA,GAAA,GAAA,KAAA,CAAA;AAEA,SAAA,MAAA;AACE,UAAiB,UAAA,CAAA,OAAA,CAAA,CAAA;AAAA,SAClB;AAED,OAAM;AACJ,KAAA,CAAA;AACE,IAAA,SAAA,CAAA,MAAA;AAAA,MACF,eAAA,EAAA,CAAA;AACA,KAAU,CAAA,CAAA;AACR,IAAA,KAAA,CAAA,MAAgB,KAAA,EAAA,MAAA;AACd,MAAiB,eAAA,EAAA,CAAA;AACjB,KAAgB,EAAA;AAAA,MAClB,IAAA,EAAA,IAAA;AAAA,MACF,KAAC,EAAA,MAAA;AAAA,KACH,CAAA,CAAA;AAEA,IAAA,eAAA,CAAA;AAA4C,MAC1C,gBAAY,EAAA,CAAA;AAAA,KAAA,CACZ,CAAS;AAAA,IAAA,MACE,QAAA,GAAA,CAAA,SAAA,KAAA;AAAA,MACZ,IAAA,eAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { getCurrentInstance, shallowRef, ref, watch, onMounted } from 'vue';
|
2
2
|
import { useEventListener } from '@vueuse/core';
|
3
3
|
import { useFormDisabled } from '../../components/form/src/hooks/use-form-common-props.mjs';
|
4
|
-
import { isElement } from '../../utils/types.mjs';
|
5
4
|
import { isFocusable } from '../../utils/dom/aria.mjs';
|
6
5
|
import { isFunction } from '@vue/shared';
|
6
|
+
import { isElement } from '../../utils/types.mjs';
|
7
7
|
|
8
8
|
function useFocusController(target, {
|
9
9
|
beforeFocus,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { isRef, computed, watch, onScopeDispose } from 'vue';
|
2
2
|
import { useNamespace } from '../use-namespace/index.mjs';
|
3
3
|
import { throwError } from '../../utils/error.mjs';
|
4
|
-
import { isClient } from '@vueuse/core';
|
5
4
|
import { hasClass, addClass, getStyle, removeClass } from '../../utils/dom/style.mjs';
|
6
5
|
import { getScrollBarWidth } from '../../utils/dom/scroll.mjs';
|
6
|
+
import { isClient } from '@vueuse/core';
|
7
7
|
|
8
8
|
const useLockscreen = (trigger, options = {}) => {
|
9
9
|
if (!isRef(trigger)) {
|
package/es/index.d.ts
CHANGED
@@ -5329,6 +5329,7 @@ declare const __VLS_component_68: DefineComponent<{
|
|
5329
5329
|
}>;
|
5330
5330
|
declare const __VLS_component_69: DefineComponent<{
|
5331
5331
|
readonly showNow: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
5332
|
+
readonly showWeekNumber: BooleanConstructor;
|
5332
5333
|
readonly ariaLabel: StringConstructor;
|
5333
5334
|
readonly emptyValues: ArrayConstructor;
|
5334
5335
|
readonly valueOnClear: EpPropFinalized<readonly [
|
@@ -5496,6 +5497,7 @@ declare const __VLS_component_69: DefineComponent<{
|
|
5496
5497
|
"visible-change": (...args: any[]) => void;
|
5497
5498
|
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
5498
5499
|
readonly showNow: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
5500
|
+
readonly showWeekNumber: BooleanConstructor;
|
5499
5501
|
readonly ariaLabel: StringConstructor;
|
5500
5502
|
readonly emptyValues: ArrayConstructor;
|
5501
5503
|
readonly valueOnClear: EpPropFinalized<readonly [
|
@@ -5670,6 +5672,7 @@ declare const __VLS_component_69: DefineComponent<{
|
|
5670
5672
|
readonly rangeSeparator: string;
|
5671
5673
|
readonly shortcuts: unknown[];
|
5672
5674
|
readonly showNow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
5675
|
+
readonly showWeekNumber: boolean;
|
5673
5676
|
readonly arrowControl: boolean;
|
5674
5677
|
readonly unlinkPanels: boolean;
|
5675
5678
|
readonly isRange: boolean;
|
@@ -8397,10 +8400,12 @@ declare const __VLS_component_85: DefineComponent<{
|
|
8397
8400
|
resizeStart: (index: number, sizes: number[]) => void;
|
8398
8401
|
resize: (index: number, sizes: number[]) => void;
|
8399
8402
|
resizeEnd: (index: number, sizes: number[]) => void;
|
8403
|
+
collapse: (index: number, type: "end" | "start", sizes: number[]) => void;
|
8400
8404
|
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
8401
8405
|
readonly layout: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "horizontal", boolean>;
|
8402
8406
|
}>> & {
|
8403
8407
|
onResize?: ((index: number, sizes: number[]) => any) | undefined;
|
8408
|
+
onCollapse?: ((index: number, type: "end" | "start", sizes: number[]) => any) | undefined;
|
8404
8409
|
onResizeStart?: ((index: number, sizes: number[]) => any) | undefined;
|
8405
8410
|
onResizeEnd?: ((index: number, sizes: number[]) => any) | undefined;
|
8406
8411
|
}, {
|
@@ -9163,6 +9168,9 @@ declare function __VLS_template_20(): {
|
|
9163
9168
|
};
|
9164
9169
|
declare function __VLS_template_21(): {
|
9165
9170
|
prefix?(_: {}): any;
|
9171
|
+
tag?(_: {
|
9172
|
+
data: Tag[];
|
9173
|
+
}): any;
|
9166
9174
|
empty?(_: {}): any;
|
9167
9175
|
empty?(_: {}): any;
|
9168
9176
|
"suggestion-item"?(_: {
|
@@ -9438,6 +9446,7 @@ declare function __VLS_template_69(): {
|
|
9438
9446
|
Date
|
9439
9447
|
]) | (() => SingleOrRange<Date>))[], unknown, unknown> | undefined;
|
9440
9448
|
showNow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
9449
|
+
showWeekNumber: boolean;
|
9441
9450
|
onMousedown: any;
|
9442
9451
|
onPanelChange: any;
|
9443
9452
|
onCalendarChange: any;
|
@@ -11542,6 +11551,7 @@ export declare type DatePickerProps = ExtractPropTypes<typeof datePickerProps>;
|
|
11542
11551
|
export declare const datePickerProps: {
|
11543
11552
|
readonly type: EpPropFinalized<(new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => IDatePickerType) | ((new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => IDatePickerType))[], unknown, unknown, "date", boolean>;
|
11544
11553
|
readonly showNow: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
11554
|
+
readonly showWeekNumber: BooleanConstructor;
|
11545
11555
|
readonly ariaLabel: StringConstructor;
|
11546
11556
|
readonly emptyValues: ArrayConstructor;
|
11547
11557
|
readonly valueOnClear: EpPropFinalized<readonly [
|
@@ -12027,6 +12037,7 @@ declare const _default_37: __VLS_WithTemplateSlots_35<typeof __VLS_component_35,
|
|
12027
12037
|
declare const _default_38: DefineComponent<{
|
12028
12038
|
readonly type: EpPropFinalized<(new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => IDatePickerType) | ((new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => IDatePickerType))[], unknown, unknown, "date", boolean>;
|
12029
12039
|
readonly showNow: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
12040
|
+
readonly showWeekNumber: BooleanConstructor;
|
12030
12041
|
readonly ariaLabel: StringConstructor;
|
12031
12042
|
readonly emptyValues: ArrayConstructor;
|
12032
12043
|
readonly valueOnClear: EpPropFinalized<readonly [
|
@@ -12163,6 +12174,7 @@ declare const _default_38: DefineComponent<{
|
|
12163
12174
|
}, () => JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
12164
12175
|
readonly type: EpPropFinalized<(new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => IDatePickerType) | ((new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => IDatePickerType))[], unknown, unknown, "date", boolean>;
|
12165
12176
|
readonly showNow: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
12177
|
+
readonly showWeekNumber: BooleanConstructor;
|
12166
12178
|
readonly ariaLabel: StringConstructor;
|
12167
12179
|
readonly emptyValues: ArrayConstructor;
|
12168
12180
|
readonly valueOnClear: EpPropFinalized<readonly [
|
@@ -12328,6 +12340,7 @@ declare const _default_38: DefineComponent<{
|
|
12328
12340
|
readonly rangeSeparator: string;
|
12329
12341
|
readonly shortcuts: unknown[];
|
12330
12342
|
readonly showNow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
12343
|
+
readonly showWeekNumber: boolean;
|
12331
12344
|
readonly arrowControl: boolean;
|
12332
12345
|
readonly unlinkPanels: boolean;
|
12333
12346
|
readonly isRange: boolean;
|
@@ -14727,6 +14740,7 @@ declare const _default_88: DefineComponent<{
|
|
14727
14740
|
default: boolean;
|
14728
14741
|
};
|
14729
14742
|
showNow: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
14743
|
+
showWeekNumber: BooleanConstructor;
|
14730
14744
|
ariaLabel: StringConstructor;
|
14731
14745
|
emptyValues: ArrayConstructor;
|
14732
14746
|
valueOnClear: EpPropFinalized<readonly [
|
@@ -14869,6 +14883,7 @@ declare const _default_88: DefineComponent<{
|
|
14869
14883
|
default: boolean;
|
14870
14884
|
};
|
14871
14885
|
showNow: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
14886
|
+
showWeekNumber: BooleanConstructor;
|
14872
14887
|
ariaLabel: StringConstructor;
|
14873
14888
|
emptyValues: ArrayConstructor;
|
14874
14889
|
valueOnClear: EpPropFinalized<readonly [
|
@@ -15034,6 +15049,7 @@ declare const _default_88: DefineComponent<{
|
|
15034
15049
|
rangeSeparator: string;
|
15035
15050
|
shortcuts: unknown[];
|
15036
15051
|
showNow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
15052
|
+
showWeekNumber: boolean;
|
15037
15053
|
arrowControl: boolean;
|
15038
15054
|
unlinkPanels: boolean;
|
15039
15055
|
isRange: boolean;
|
@@ -22494,6 +22510,7 @@ export declare type TimeList = [
|
|
22494
22510
|
export declare type TimePickerDefaultProps = ExtractPropTypes<typeof timePickerDefaultProps>;
|
22495
22511
|
export declare const timePickerDefaultProps: {
|
22496
22512
|
readonly showNow: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
22513
|
+
readonly showWeekNumber: BooleanConstructor;
|
22497
22514
|
readonly ariaLabel: StringConstructor;
|
22498
22515
|
readonly emptyValues: ArrayConstructor;
|
22499
22516
|
readonly valueOnClear: EpPropFinalized<readonly [
|
package/es/index.mjs
CHANGED
@@ -4,13 +4,13 @@ export { makeInstaller } from './make-installer.mjs';
|
|
4
4
|
export { default as dayjs } from 'dayjs';
|
5
5
|
export { affixEmits, affixProps } from './components/affix/src/affix.mjs';
|
6
6
|
export { ElAffix } from './components/affix/index.mjs';
|
7
|
-
export { alertEffects, alertEmits, alertProps } from './components/alert/src/
|
7
|
+
export { alertEffects, alertEmits, alertProps } from './components/alert/src/alert.mjs';
|
8
8
|
export { ElAlert } from './components/alert/index.mjs';
|
9
9
|
export { autocompleteEmits, autocompleteProps } from './components/autocomplete/src/autocomplete.mjs';
|
10
10
|
export { ElAutocomplete } from './components/autocomplete/index.mjs';
|
11
11
|
export { avatarEmits, avatarProps } from './components/avatar/src/avatar.mjs';
|
12
12
|
export { ElAvatar } from './components/avatar/index.mjs';
|
13
|
-
export { backtopEmits, backtopProps } from './components/backtop/src/
|
13
|
+
export { backtopEmits, backtopProps } from './components/backtop/src/backtop.mjs';
|
14
14
|
export { ElBacktop } from './components/backtop/index.mjs';
|
15
15
|
export { badgeProps } from './components/badge/src/badge.mjs';
|
16
16
|
export { ElBadge } from './components/badge/index.mjs';
|
@@ -18,7 +18,7 @@ export { breadcrumbProps } from './components/breadcrumb/src/breadcrumb.mjs';
|
|
18
18
|
export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-item.mjs';
|
19
19
|
export { breadcrumbKey } from './components/breadcrumb/src/constants.mjs';
|
20
20
|
export { ElBreadcrumb, ElBreadcrumbItem } from './components/breadcrumb/index.mjs';
|
21
|
-
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './components/button/src/
|
21
|
+
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './components/button/src/button.mjs';
|
22
22
|
export { buttonGroupContextKey } from './components/button/src/constants.mjs';
|
23
23
|
export { ElButton, ElButtonGroup } from './components/button/index.mjs';
|
24
24
|
export { calendarEmits, calendarProps } from './components/calendar/src/calendar.mjs';
|
@@ -47,7 +47,7 @@ export { collapseItemProps } from './components/collapse/src/collapse-item.mjs';
|
|
47
47
|
export { collapseContextKey } from './components/collapse/src/constants.mjs';
|
48
48
|
export { ElCollapse, ElCollapseItem } from './components/collapse/index.mjs';
|
49
49
|
export { ElCollapseTransition } from './components/collapse-transition/index.mjs';
|
50
|
-
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './components/color-picker/src/color-
|
50
|
+
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './components/color-picker/src/color-picker2.mjs';
|
51
51
|
export { ElColorPicker } from './components/color-picker/index.mjs';
|
52
52
|
export { messageConfig } from './components/config-provider/src/config-provider.mjs';
|
53
53
|
export { configProviderProps } from './components/config-provider/src/config-provider-props.mjs';
|
@@ -67,16 +67,16 @@ export { useDialog } from './components/dialog/src/use-dialog.mjs';
|
|
67
67
|
export { dialogEmits, dialogProps } from './components/dialog/src/dialog.mjs';
|
68
68
|
export { dialogInjectionKey } from './components/dialog/src/constants.mjs';
|
69
69
|
export { ElDialog } from './components/dialog/index.mjs';
|
70
|
-
export { dividerProps } from './components/divider/src/
|
70
|
+
export { dividerProps } from './components/divider/src/divider2.mjs';
|
71
71
|
export { ElDivider } from './components/divider/index.mjs';
|
72
72
|
export { drawerEmits, drawerProps } from './components/drawer/src/drawer.mjs';
|
73
73
|
export { ElDrawer } from './components/drawer/index.mjs';
|
74
74
|
export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './components/dropdown/src/dropdown.mjs';
|
75
75
|
export { DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY } from './components/dropdown/src/tokens.mjs';
|
76
76
|
export { ElDropdown, ElDropdownItem, ElDropdownMenu } from './components/dropdown/index.mjs';
|
77
|
-
export { emptyProps } from './components/empty/src/
|
77
|
+
export { emptyProps } from './components/empty/src/empty2.mjs';
|
78
78
|
export { ElEmpty } from './components/empty/index.mjs';
|
79
|
-
export { formEmits, formMetaProps, formProps } from './components/form/src/
|
79
|
+
export { formEmits, formMetaProps, formProps } from './components/form/src/form.mjs';
|
80
80
|
export { formItemProps, formItemValidateStates } from './components/form/src/form-item.mjs';
|
81
81
|
export { formContextKey, formItemContextKey } from './components/form/src/constants.mjs';
|
82
82
|
export { useDisabled, useFormDisabled, useFormSize, useSize } from './components/form/src/hooks/use-form-common-props.mjs';
|
@@ -86,19 +86,19 @@ export { iconProps } from './components/icon/src/icon.mjs';
|
|
86
86
|
export { ElIcon } from './components/icon/index.mjs';
|
87
87
|
export { imageEmits, imageProps } from './components/image/src/image.mjs';
|
88
88
|
export { ElImage } from './components/image/index.mjs';
|
89
|
-
export { imageViewerEmits, imageViewerProps } from './components/image-viewer/src/image-
|
89
|
+
export { imageViewerEmits, imageViewerProps } from './components/image-viewer/src/image-viewer2.mjs';
|
90
90
|
export { ElImageViewer } from './components/image-viewer/index.mjs';
|
91
|
-
export { inputEmits, inputProps } from './components/input/src/
|
91
|
+
export { inputEmits, inputProps } from './components/input/src/input.mjs';
|
92
92
|
export { ElInput } from './components/input/index.mjs';
|
93
93
|
export { inputNumberEmits, inputNumberProps } from './components/input-number/src/input-number.mjs';
|
94
94
|
export { ElInputNumber } from './components/input-number/index.mjs';
|
95
|
-
export { inputTagEmits, inputTagProps } from './components/input-tag/src/input-
|
95
|
+
export { inputTagEmits, inputTagProps } from './components/input-tag/src/input-tag.mjs';
|
96
96
|
export { ElInputTag } from './components/input-tag/index.mjs';
|
97
97
|
export { linkEmits, linkProps } from './components/link/src/link.mjs';
|
98
98
|
export { ElLink } from './components/link/index.mjs';
|
99
99
|
export { menuEmits, menuProps } from './components/menu/src/menu.mjs';
|
100
100
|
export { menuItemEmits, menuItemProps } from './components/menu/src/menu-item.mjs';
|
101
|
-
export { menuItemGroupProps } from './components/menu/src/menu-item-
|
101
|
+
export { menuItemGroupProps } from './components/menu/src/menu-item-group.mjs';
|
102
102
|
export { subMenuProps } from './components/menu/src/sub-menu.mjs';
|
103
103
|
export { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './components/menu/src/tokens.mjs';
|
104
104
|
export { ElMenu, ElMenuItem, ElMenuItemGroup, ElSubMenu } from './components/menu/index.mjs';
|
@@ -109,7 +109,7 @@ export { ElPageHeader } from './components/page-header/index.mjs';
|
|
109
109
|
export { paginationEmits, paginationProps } from './components/pagination/src/pagination.mjs';
|
110
110
|
export { elPaginationKey } from './components/pagination/src/constants.mjs';
|
111
111
|
export { ElPagination } from './components/pagination/index.mjs';
|
112
|
-
export { popconfirmEmits, popconfirmProps } from './components/popconfirm/src/
|
112
|
+
export { popconfirmEmits, popconfirmProps } from './components/popconfirm/src/popconfirm.mjs';
|
113
113
|
export { ElPopconfirm } from './components/popconfirm/index.mjs';
|
114
114
|
export { Effect, popperProps, roleTypes, usePopperProps } from './components/popper/src/popper.mjs';
|
115
115
|
export { popperTriggerProps, usePopperTriggerProps } from './components/popper/src/trigger.mjs';
|
@@ -144,7 +144,7 @@ export { selectEmits, selectProps } from './components/select/src/select.mjs';
|
|
144
144
|
export { ElOption, ElOptionGroup, ElSelect } from './components/select/index.mjs';
|
145
145
|
export { selectV2InjectionKey } from './components/select-v2/src/token.mjs';
|
146
146
|
export { ElSelectV2 } from './components/select-v2/index.mjs';
|
147
|
-
export { skeletonProps } from './components/skeleton/src/
|
147
|
+
export { skeletonProps } from './components/skeleton/src/skeleton2.mjs';
|
148
148
|
export { skeletonItemProps } from './components/skeleton/src/skeleton-item.mjs';
|
149
149
|
export { ElSkeleton, ElSkeletonItem } from './components/skeleton/index.mjs';
|
150
150
|
export { sliderEmits, sliderProps } from './components/slider/src/slider.mjs';
|
@@ -156,7 +156,7 @@ export { useSpace } from './components/space/src/use-space.mjs';
|
|
156
156
|
export { ElSpace } from './components/space/index.mjs';
|
157
157
|
export { statisticProps } from './components/statistic/src/statistic.mjs';
|
158
158
|
export { ElStatistic } from './components/statistic/index.mjs';
|
159
|
-
export { stepProps } from './components/steps/src/
|
159
|
+
export { stepProps } from './components/steps/src/item2.mjs';
|
160
160
|
export { stepsEmits, stepsProps } from './components/steps/src/steps.mjs';
|
161
161
|
export { STEPS_INJECTION_KEY } from './components/steps/src/tokens.mjs';
|
162
162
|
export { ElStep, ElSteps } from './components/steps/index.mjs';
|
@@ -213,17 +213,17 @@ export { default as DynamicSizeList } from './components/virtual-list/src/compon
|
|
213
213
|
export { default as FixedSizeGrid } from './components/virtual-list/src/components/fixed-size-grid.mjs';
|
214
214
|
export { default as DynamicSizeGrid } from './components/virtual-list/src/components/dynamic-size-grid.mjs';
|
215
215
|
export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './components/virtual-list/src/props.mjs';
|
216
|
-
export { watermarkProps } from './components/watermark/src/
|
216
|
+
export { watermarkProps } from './components/watermark/src/watermark.mjs';
|
217
217
|
export { ElWatermark } from './components/watermark/index.mjs';
|
218
218
|
export { tourEmits, tourProps } from './components/tour/src/tour.mjs';
|
219
|
-
export { tourStepEmits, tourStepProps } from './components/tour/src/
|
220
|
-
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './components/tour/src/
|
219
|
+
export { tourStepEmits, tourStepProps } from './components/tour/src/step.mjs';
|
220
|
+
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './components/tour/src/content2.mjs';
|
221
221
|
export { ElTour, ElTourStep } from './components/tour/index.mjs';
|
222
222
|
export { anchorEmits, anchorProps } from './components/anchor/src/anchor.mjs';
|
223
223
|
export { ElAnchor, ElAnchorLink } from './components/anchor/index.mjs';
|
224
224
|
export { defaultProps, segmentedEmits, segmentedProps } from './components/segmented/src/segmented.mjs';
|
225
225
|
export { ElSegmented } from './components/segmented/index.mjs';
|
226
|
-
export { mentionEmits, mentionProps } from './components/mention/src/
|
226
|
+
export { mentionEmits, mentionProps } from './components/mention/src/mention2.mjs';
|
227
227
|
export { ElMention } from './components/mention/index.mjs';
|
228
228
|
export { splitterProps } from './components/splitter/src/splitter.mjs';
|
229
229
|
export { splitterPanelProps } from './components/splitter/src/split-panel.mjs';
|
@@ -235,7 +235,7 @@ export { default as ElLoadingService } from './components/loading/src/service.mj
|
|
235
235
|
export { messageDefaults, messageEmits, messageProps, messageTypes } from './components/message/src/message.mjs';
|
236
236
|
export { ElMessage } from './components/message/index.mjs';
|
237
237
|
export { ElMessageBox } from './components/message-box/index.mjs';
|
238
|
-
export { notificationEmits, notificationProps, notificationTypes } from './components/notification/src/
|
238
|
+
export { notificationEmits, notificationProps, notificationTypes } from './components/notification/src/notification.mjs';
|
239
239
|
export { ElNotification } from './components/notification/index.mjs';
|
240
240
|
export { popoverEmits, popoverProps } from './components/popover/src/popover.mjs';
|
241
241
|
export { ElPopover, ElPopoverDirective } from './components/popover/index.mjs';
|
package/es/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const version = "0.0.
|
1
|
+
export declare const version = "0.0.20250618";
|