@element-plus/nightly 0.0.20250421 → 0.0.20250423
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.full.js +105 -96
- 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 +105 -96
- 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/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +119 -24
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +24 -119
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.d.ts +1 -1
- package/es/components/autocomplete/src/autocomplete.mjs +80 -370
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/src/autocomplete2.mjs +370 -80
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +71 -32
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +32 -71
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/button/index.mjs +3 -3
- package/es/components/button/src/button-group.mjs +6 -29
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +29 -6
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/button/src/button.mjs +56 -77
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +2 -2
- package/es/components/button/src/button2.mjs +77 -56
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/date-table.mjs +31 -89
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +89 -31
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/cascader/src/cascader.d.ts +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +4 -4
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +206 -115
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +115 -206
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +64 -43
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +43 -64
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.mjs +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +2 -2
- package/es/components/descriptions/src/description2.mjs +1 -1
- package/es/components/descriptions/src/descriptions-row.mjs +6 -63
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row2.mjs +63 -6
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.vue.d.ts +1 -0
- package/es/components/dialog/src/dialog-content2.mjs +3 -2
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.d.ts +1 -1
- package/es/components/dialog/src/dialog.mjs +2 -1
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +3 -3
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.d.ts +1 -1
- package/es/components/drawer/src/drawer.mjs +26 -178
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +3 -3
- package/es/components/drawer/src/drawer2.mjs +178 -26
- package/es/components/drawer/src/drawer2.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/dropdown.mjs +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +3 -3
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/index.mjs +12 -12
- package/es/components/message/src/message.vue.d.ts +1 -1
- package/es/components/pagination/src/components/prev.mjs +17 -35
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +35 -17
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popconfirm/src/popconfirm.mjs +2 -2
- package/es/components/popover/src/popover.d.ts +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popover/src/popover.vue.d.ts +4 -4
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/trigger.mjs +31 -127
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +127 -31
- package/es/components/popper/src/trigger2.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/select/src/select.d.ts +6 -1
- package/es/components/select/src/select.mjs +2 -2
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +15 -5
- package/es/components/select-v2/src/defaults.d.ts +6 -1
- package/es/components/select-v2/src/defaults.mjs +2 -2
- package/es/components/select-v2/src/defaults.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +15 -5
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +190 -19
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +19 -190
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/table/src/filter-panel.mjs +2 -3
- package/es/components/table/src/filter-panel.mjs.map +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +8 -2
- package/es/components/table/src/table-column/index.d.ts +1 -1
- package/es/components/table-v2/src/table-v2.d.ts +2 -2
- package/es/components/table-v2/src/table.d.ts +1 -1
- package/es/components/table-v2/src/table.mjs.map +1 -1
- package/es/components/table-v2/src/use-table.d.ts +1 -1
- package/es/components/table-v2/src/use-table.mjs +8 -3
- package/es/components/table-v2/src/use-table.mjs.map +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +21 -67
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +67 -21
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +3 -3
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/content.d.ts +1 -1
- package/es/components/tooltip/src/content.mjs +29 -192
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content.vue.d.ts +2 -2
- package/es/components/tooltip/src/content2.mjs +192 -28
- package/es/components/tooltip/src/content2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.d.ts +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +2 -2
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip/src/trigger2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/content.vue.d.ts +3 -3
- package/es/components/tooltip-v2/src/tooltip.d.ts +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +19 -77
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.vue.d.ts +3 -3
- package/es/components/tooltip-v2/src/tooltip2.mjs +77 -19
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/tour/src/tour.d.ts +1 -1
- package/es/components/tour/src/tour.mjs +2 -1
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour.vue.d.ts +3 -3
- package/es/components/tree/src/model/useKeydown.mjs +18 -20
- package/es/components/tree/src/model/useKeydown.mjs.map +1 -1
- package/es/components/tree/src/tree-node-content.mjs +2 -1
- package/es/components/tree/src/tree-node-content.mjs.map +1 -1
- package/es/components/tree/style/css.d.ts +1 -0
- package/es/components/tree/style/css.mjs +1 -0
- package/es/components/tree/style/css.mjs.map +1 -1
- package/es/components/tree/style/index.d.ts +1 -0
- package/es/components/tree/style/index.mjs +1 -0
- package/es/components/tree/style/index.mjs.map +1 -1
- package/es/components/tree-v2/src/tree-node-content.mjs +2 -1
- package/es/components/tree-v2/src/tree-node-content.mjs.map +1 -1
- package/es/components/tree-v2/src/tree.vue.d.ts +17 -17
- package/es/components/tree-v2/style/css.d.ts +1 -0
- package/es/components/tree-v2/style/css.mjs +1 -0
- package/es/components/tree-v2/style/css.mjs.map +1 -1
- package/es/components/tree-v2/style/index.d.ts +1 -0
- package/es/components/tree-v2/style/index.mjs +1 -0
- package/es/components/tree-v2/style/index.mjs.map +1 -1
- package/es/components/upload/index.mjs +2 -2
- package/es/components/upload/src/upload-content.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-list.mjs +1 -1
- package/es/components/upload/src/upload.mjs +125 -97
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +97 -125
- package/es/components/upload/src/upload2.mjs.map +1 -1
- package/es/components/upload/src/use-handlers.mjs +1 -1
- package/es/defaults.d.ts +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-draggable/index.d.ts +1 -0
- package/es/hooks/use-draggable/index.mjs +38 -31
- package/es/hooks/use-draggable/index.mjs.map +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 +1 -1
- package/es/index.mjs +12 -12
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +119 -25
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +25 -119
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.d.ts +1 -1
- package/lib/components/autocomplete/src/autocomplete.js +79 -368
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/src/autocomplete2.js +368 -79
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +71 -32
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +32 -71
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/button/index.js +3 -3
- package/lib/components/button/src/button-group.js +6 -29
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +29 -6
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/button/src/button.js +59 -77
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +2 -2
- package/lib/components/button/src/button2.js +77 -59
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/date-table.js +35 -89
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +89 -35
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/cascader/src/cascader.d.ts +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +4 -4
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +206 -115
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +115 -206
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +64 -43
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +43 -64
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.js +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +2 -2
- package/lib/components/descriptions/src/description2.js +1 -1
- package/lib/components/descriptions/src/descriptions-row.js +6 -63
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row2.js +63 -6
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.vue.d.ts +1 -0
- package/lib/components/dialog/src/dialog-content2.js +3 -2
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.d.ts +1 -1
- package/lib/components/dialog/src/dialog.js +2 -1
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +3 -3
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.d.ts +1 -1
- package/lib/components/drawer/src/drawer.js +27 -178
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +3 -3
- package/lib/components/drawer/src/drawer2.js +178 -27
- package/lib/components/drawer/src/drawer2.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/dropdown.js +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/index.js +12 -12
- package/lib/components/message/src/message.vue.d.ts +1 -1
- package/lib/components/pagination/src/components/prev.js +18 -35
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +35 -18
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popconfirm/src/popconfirm.js +2 -2
- package/lib/components/popover/src/popover.d.ts +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/popover/src/popover.vue.d.ts +4 -4
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/trigger.js +32 -127
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +127 -32
- package/lib/components/popper/src/trigger2.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/select/src/select.d.ts +6 -1
- package/lib/components/select/src/select.js +2 -2
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +15 -5
- package/lib/components/select-v2/src/defaults.d.ts +6 -1
- package/lib/components/select-v2/src/defaults.js +2 -2
- package/lib/components/select-v2/src/defaults.js.map +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +15 -5
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +190 -19
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +19 -190
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/table/src/filter-panel.js +2 -3
- package/lib/components/table/src/filter-panel.js.map +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +8 -2
- package/lib/components/table/src/table-column/index.d.ts +1 -1
- package/lib/components/table-v2/src/table-v2.d.ts +2 -2
- package/lib/components/table-v2/src/table.d.ts +1 -1
- package/lib/components/table-v2/src/table.js.map +1 -1
- package/lib/components/table-v2/src/use-table.d.ts +1 -1
- package/lib/components/table-v2/src/use-table.js +8 -3
- package/lib/components/table-v2/src/use-table.js.map +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +21 -67
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +67 -21
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +3 -3
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/content.d.ts +1 -1
- package/lib/components/tooltip/src/content.js +29 -192
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content.vue.d.ts +2 -2
- package/lib/components/tooltip/src/content2.js +192 -28
- package/lib/components/tooltip/src/content2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.d.ts +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +2 -2
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip/src/trigger2.js +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/content.vue.d.ts +3 -3
- package/lib/components/tooltip-v2/src/tooltip.d.ts +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +19 -77
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.vue.d.ts +3 -3
- package/lib/components/tooltip-v2/src/tooltip2.js +77 -19
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/tour/src/tour.d.ts +1 -1
- package/lib/components/tour/src/tour.js +2 -1
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +3 -3
- package/lib/components/tree/src/model/useKeydown.js +17 -19
- package/lib/components/tree/src/model/useKeydown.js.map +1 -1
- package/lib/components/tree/src/tree-node-content.js +2 -1
- package/lib/components/tree/src/tree-node-content.js.map +1 -1
- package/lib/components/tree/style/css.d.ts +1 -0
- package/lib/components/tree/style/css.js +1 -0
- package/lib/components/tree/style/css.js.map +1 -1
- package/lib/components/tree/style/index.d.ts +1 -0
- package/lib/components/tree/style/index.js +1 -0
- package/lib/components/tree/style/index.js.map +1 -1
- package/lib/components/tree-v2/src/tree-node-content.js +2 -1
- package/lib/components/tree-v2/src/tree-node-content.js.map +1 -1
- package/lib/components/tree-v2/src/tree.vue.d.ts +17 -17
- package/lib/components/tree-v2/style/css.d.ts +1 -0
- package/lib/components/tree-v2/style/css.js +1 -0
- package/lib/components/tree-v2/style/css.js.map +1 -1
- package/lib/components/tree-v2/style/index.d.ts +1 -0
- package/lib/components/tree-v2/style/index.js +1 -0
- package/lib/components/tree-v2/style/index.js.map +1 -1
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upload/src/upload-content.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-list.js +1 -1
- package/lib/components/upload/src/upload.js +125 -100
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload2.js +100 -125
- package/lib/components/upload/src/upload2.js.map +1 -1
- package/lib/components/upload/src/use-handlers.js +1 -1
- package/lib/defaults.d.ts +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-draggable/index.d.ts +1 -0
- package/lib/hooks/use-draggable/index.js +38 -31
- package/lib/hooks/use-draggable/index.js.map +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 +1 -1
- package/lib/index.js +12 -12
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"upload.js","sources":["../../../../../../packages/components/upload/src/upload.
|
1
|
+
{"version":3,"file":"upload.js","sources":["../../../../../../packages/components/upload/src/upload.vue"],"sourcesContent":["<template>\n <div>\n <upload-list\n v-if=\"isPictureCard && showFileList\"\n :disabled=\"disabled\"\n :list-type=\"listType\"\n :files=\"uploadFiles\"\n :crossorigin=\"crossorigin\"\n :handle-preview=\"onPreview\"\n @remove=\"handleRemove\"\n >\n <template v-if=\"$slots.file\" #default=\"{ file, index }\">\n <slot name=\"file\" :file=\"file\" :index=\"index\" />\n </template>\n <template #append>\n <upload-content ref=\"uploadRef\" v-bind=\"uploadContentProps\">\n <slot v-if=\"$slots.trigger\" name=\"trigger\" />\n <slot v-if=\"!$slots.trigger && $slots.default\" />\n </upload-content>\n </template>\n </upload-list>\n\n <upload-content\n v-if=\"!isPictureCard || (isPictureCard && !showFileList)\"\n ref=\"uploadRef\"\n v-bind=\"uploadContentProps\"\n >\n <slot v-if=\"$slots.trigger\" name=\"trigger\" />\n <slot v-if=\"!$slots.trigger && $slots.default\" />\n </upload-content>\n\n <slot v-if=\"$slots.trigger\" />\n <slot name=\"tip\" />\n <upload-list\n v-if=\"!isPictureCard && showFileList\"\n :disabled=\"disabled\"\n :list-type=\"listType\"\n :files=\"uploadFiles\"\n :crossorigin=\"crossorigin\"\n :handle-preview=\"onPreview\"\n @remove=\"handleRemove\"\n >\n <template v-if=\"$slots.file\" #default=\"{ file, index }\">\n <slot name=\"file\" :file=\"file\" :index=\"index\" />\n </template>\n </upload-list>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onBeforeUnmount, provide, shallowRef, toRef } from 'vue'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { uploadContextKey } from './constants'\nimport UploadList from './upload-list.vue'\nimport UploadContent from './upload-content.vue'\nimport { useHandlers } from './use-handlers'\nimport { uploadProps } from './upload'\n\nimport type {\n UploadContentInstance,\n UploadContentProps,\n} from './upload-content'\n\ndefineOptions({\n name: 'ElUpload',\n})\n\nconst props = defineProps(uploadProps)\n\nconst disabled = useFormDisabled()\n\nconst uploadRef = shallowRef<UploadContentInstance>()\nconst {\n abort,\n submit,\n clearFiles,\n uploadFiles,\n handleStart,\n handleError,\n handleRemove,\n handleSuccess,\n handleProgress,\n revokeFileObjectURL,\n} = useHandlers(props, uploadRef)\n\nconst isPictureCard = computed(() => props.listType === 'picture-card')\n\nconst uploadContentProps = computed<UploadContentProps>(() => ({\n ...props,\n fileList: uploadFiles.value,\n onStart: handleStart,\n onProgress: handleProgress,\n onSuccess: handleSuccess,\n onError: handleError,\n onRemove: handleRemove,\n}))\n\nonBeforeUnmount(() => {\n uploadFiles.value.forEach(revokeFileObjectURL)\n})\n\nprovide(uploadContextKey, {\n accept: toRef(props, 'accept'),\n})\n\ndefineExpose({\n /** @description cancel upload request */\n abort,\n /** @description upload the file list manually */\n submit,\n /** @description clear the file list */\n clearFiles,\n /** @description select the file manually */\n handleStart,\n /** @description remove the file manually */\n handleRemove,\n})\n</script>\n"],"names":["useFormDisabled","shallowRef","useHandlers","computed","onBeforeUnmount","provide","uploadContextKey","toRef","_openBlock","_createElementBlock","_unref","_createBlock","UploadList"],"mappings":";;;;;;;;;;;;;uCA+Dc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,WAAWA,kCAAgB,EAAA,CAAA;AAEjC,IAAA,MAAM,YAAYC,cAAkC,EAAA,CAAA;AACpD,IAAM,MAAA;AAAA,MACJ,KAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,YAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,mBAAA;AAAA,KACF,GAAIC,uBAAY,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AAEhC,IAAA,MAAM,aAAgB,GAAAC,YAAA,CAAS,MAAM,KAAA,CAAM,aAAa,cAAc,CAAA,CAAA;AAEtE,IAAM,MAAA,kBAAA,GAAqBA,aAA6B,OAAO;AAAA,MAC7D,GAAG,KAAA;AAAA,MACH,UAAU,WAAY,CAAA,KAAA;AAAA,MACtB,OAAS,EAAA,WAAA;AAAA,MACT,UAAY,EAAA,cAAA;AAAA,MACZ,SAAW,EAAA,aAAA;AAAA,MACX,OAAS,EAAA,WAAA;AAAA,MACT,QAAU,EAAA,YAAA;AAAA,KACV,CAAA,CAAA,CAAA;AAEF,IAAAC,mBAAA,CAAgB,MAAM;AACpB,MAAY,WAAA,CAAA,KAAA,CAAM,QAAQ,mBAAmB,CAAA,CAAA;AAAA,KAC9C,CAAA,CAAA;AAED,IAAAC,WAAA,CAAQC,0BAAkB,EAAA;AAAA,MACxB,MAAA,EAAQC,SAAM,CAAA,KAAA,EAAO,QAAQ,CAAA;AAAA,KAC9B,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAAA,KAAA;AAAA,MAEX,MAAA;AAAA,MAAA,UAAA;AAAA,MAEA,WAAA;AAAA,MAAA,YAAA;AAAA,KAEA,CAAA,CAAA;AAAA,IAAA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MAEA,OAAAC,aAAA,EAAA,EAAAC,sBAAA,CAAA,KAAA,EAAA,IAAA,EAAA;AAAA,QAAAC,SAAA,CAAA,aAAA,CAAA,IAAA,IAAA,CAAA,YAAA,IAAAF,aAAA,EAAA,EAAAG,eAAA,CAAAC,qBAAA,EAAA;AAAA,UAEA,GAAA,EAAA,CAAA;AAAA,UACD,QAAA,EAAAF,SAAA,CAAA,QAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,134 +2,109 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var
|
8
|
-
var
|
9
|
-
var useHandlers = require('./use-handlers.js');
|
10
|
-
var upload = require('./upload.js');
|
11
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
12
|
-
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
5
|
+
var ajax = require('./ajax.js');
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
7
|
+
var typescript = require('../../../utils/typescript.js');
|
8
|
+
var shared = require('@vue/shared');
|
13
9
|
|
14
|
-
const
|
15
|
-
|
10
|
+
const uploadListTypes = ["text", "picture", "picture-card"];
|
11
|
+
let fileId = 1;
|
12
|
+
const genFileId = () => Date.now() + fileId++;
|
13
|
+
const uploadBaseProps = runtime.buildProps({
|
14
|
+
action: {
|
15
|
+
type: String,
|
16
|
+
default: "#"
|
17
|
+
},
|
18
|
+
headers: {
|
19
|
+
type: runtime.definePropType(Object)
|
20
|
+
},
|
21
|
+
method: {
|
22
|
+
type: String,
|
23
|
+
default: "post"
|
24
|
+
},
|
25
|
+
data: {
|
26
|
+
type: runtime.definePropType([Object, Function, Promise]),
|
27
|
+
default: () => typescript.mutable({})
|
28
|
+
},
|
29
|
+
multiple: Boolean,
|
30
|
+
name: {
|
31
|
+
type: String,
|
32
|
+
default: "file"
|
33
|
+
},
|
34
|
+
drag: Boolean,
|
35
|
+
withCredentials: Boolean,
|
36
|
+
showFileList: {
|
37
|
+
type: Boolean,
|
38
|
+
default: true
|
39
|
+
},
|
40
|
+
accept: {
|
41
|
+
type: String,
|
42
|
+
default: ""
|
43
|
+
},
|
44
|
+
fileList: {
|
45
|
+
type: runtime.definePropType(Array),
|
46
|
+
default: () => typescript.mutable([])
|
47
|
+
},
|
48
|
+
autoUpload: {
|
49
|
+
type: Boolean,
|
50
|
+
default: true
|
51
|
+
},
|
52
|
+
listType: {
|
53
|
+
type: String,
|
54
|
+
values: uploadListTypes,
|
55
|
+
default: "text"
|
56
|
+
},
|
57
|
+
httpRequest: {
|
58
|
+
type: runtime.definePropType(Function),
|
59
|
+
default: ajax.ajaxUpload
|
60
|
+
},
|
61
|
+
disabled: Boolean,
|
62
|
+
limit: Number
|
16
63
|
});
|
17
|
-
const
|
18
|
-
...
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
handleStart,
|
57
|
-
handleRemove
|
58
|
-
});
|
59
|
-
return (_ctx, _cache) => {
|
60
|
-
return vue.openBlock(), vue.createElementBlock("div", null, [
|
61
|
-
vue.unref(isPictureCard) && _ctx.showFileList ? (vue.openBlock(), vue.createBlock(uploadList["default"], {
|
62
|
-
key: 0,
|
63
|
-
disabled: vue.unref(disabled),
|
64
|
-
"list-type": _ctx.listType,
|
65
|
-
files: vue.unref(uploadFiles),
|
66
|
-
crossorigin: _ctx.crossorigin,
|
67
|
-
"handle-preview": _ctx.onPreview,
|
68
|
-
onRemove: vue.unref(handleRemove)
|
69
|
-
}, vue.createSlots({
|
70
|
-
append: vue.withCtx(() => [
|
71
|
-
vue.createVNode(uploadContent["default"], vue.mergeProps({
|
72
|
-
ref_key: "uploadRef",
|
73
|
-
ref: uploadRef
|
74
|
-
}, vue.unref(uploadContentProps)), {
|
75
|
-
default: vue.withCtx(() => [
|
76
|
-
_ctx.$slots.trigger ? vue.renderSlot(_ctx.$slots, "trigger", { key: 0 }) : vue.createCommentVNode("v-if", true),
|
77
|
-
!_ctx.$slots.trigger && _ctx.$slots.default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }) : vue.createCommentVNode("v-if", true)
|
78
|
-
]),
|
79
|
-
_: 3
|
80
|
-
}, 16)
|
81
|
-
]),
|
82
|
-
_: 2
|
83
|
-
}, [
|
84
|
-
_ctx.$slots.file ? {
|
85
|
-
name: "default",
|
86
|
-
fn: vue.withCtx(({ file, index }) => [
|
87
|
-
vue.renderSlot(_ctx.$slots, "file", {
|
88
|
-
file,
|
89
|
-
index
|
90
|
-
})
|
91
|
-
])
|
92
|
-
} : void 0
|
93
|
-
]), 1032, ["disabled", "list-type", "files", "crossorigin", "handle-preview", "onRemove"])) : vue.createCommentVNode("v-if", true),
|
94
|
-
!vue.unref(isPictureCard) || vue.unref(isPictureCard) && !_ctx.showFileList ? (vue.openBlock(), vue.createBlock(uploadContent["default"], vue.mergeProps({
|
95
|
-
key: 1,
|
96
|
-
ref_key: "uploadRef",
|
97
|
-
ref: uploadRef
|
98
|
-
}, vue.unref(uploadContentProps)), {
|
99
|
-
default: vue.withCtx(() => [
|
100
|
-
_ctx.$slots.trigger ? vue.renderSlot(_ctx.$slots, "trigger", { key: 0 }) : vue.createCommentVNode("v-if", true),
|
101
|
-
!_ctx.$slots.trigger && _ctx.$slots.default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }) : vue.createCommentVNode("v-if", true)
|
102
|
-
]),
|
103
|
-
_: 3
|
104
|
-
}, 16)) : vue.createCommentVNode("v-if", true),
|
105
|
-
_ctx.$slots.trigger ? vue.renderSlot(_ctx.$slots, "default", { key: 2 }) : vue.createCommentVNode("v-if", true),
|
106
|
-
vue.renderSlot(_ctx.$slots, "tip"),
|
107
|
-
!vue.unref(isPictureCard) && _ctx.showFileList ? (vue.openBlock(), vue.createBlock(uploadList["default"], {
|
108
|
-
key: 3,
|
109
|
-
disabled: vue.unref(disabled),
|
110
|
-
"list-type": _ctx.listType,
|
111
|
-
files: vue.unref(uploadFiles),
|
112
|
-
crossorigin: _ctx.crossorigin,
|
113
|
-
"handle-preview": _ctx.onPreview,
|
114
|
-
onRemove: vue.unref(handleRemove)
|
115
|
-
}, vue.createSlots({
|
116
|
-
_: 2
|
117
|
-
}, [
|
118
|
-
_ctx.$slots.file ? {
|
119
|
-
name: "default",
|
120
|
-
fn: vue.withCtx(({ file, index }) => [
|
121
|
-
vue.renderSlot(_ctx.$slots, "file", {
|
122
|
-
file,
|
123
|
-
index
|
124
|
-
})
|
125
|
-
])
|
126
|
-
} : void 0
|
127
|
-
]), 1032, ["disabled", "list-type", "files", "crossorigin", "handle-preview", "onRemove"])) : vue.createCommentVNode("v-if", true)
|
128
|
-
]);
|
129
|
-
};
|
64
|
+
const uploadProps = runtime.buildProps({
|
65
|
+
...uploadBaseProps,
|
66
|
+
beforeUpload: {
|
67
|
+
type: runtime.definePropType(Function),
|
68
|
+
default: shared.NOOP
|
69
|
+
},
|
70
|
+
beforeRemove: {
|
71
|
+
type: runtime.definePropType(Function)
|
72
|
+
},
|
73
|
+
onRemove: {
|
74
|
+
type: runtime.definePropType(Function),
|
75
|
+
default: shared.NOOP
|
76
|
+
},
|
77
|
+
onChange: {
|
78
|
+
type: runtime.definePropType(Function),
|
79
|
+
default: shared.NOOP
|
80
|
+
},
|
81
|
+
onPreview: {
|
82
|
+
type: runtime.definePropType(Function),
|
83
|
+
default: shared.NOOP
|
84
|
+
},
|
85
|
+
onSuccess: {
|
86
|
+
type: runtime.definePropType(Function),
|
87
|
+
default: shared.NOOP
|
88
|
+
},
|
89
|
+
onProgress: {
|
90
|
+
type: runtime.definePropType(Function),
|
91
|
+
default: shared.NOOP
|
92
|
+
},
|
93
|
+
onError: {
|
94
|
+
type: runtime.definePropType(Function),
|
95
|
+
default: shared.NOOP
|
96
|
+
},
|
97
|
+
onExceed: {
|
98
|
+
type: runtime.definePropType(Function),
|
99
|
+
default: shared.NOOP
|
100
|
+
},
|
101
|
+
crossorigin: {
|
102
|
+
type: runtime.definePropType(String)
|
130
103
|
}
|
131
104
|
});
|
132
|
-
var Upload = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "upload.vue"]]);
|
133
105
|
|
134
|
-
exports
|
106
|
+
exports.genFileId = genFileId;
|
107
|
+
exports.uploadBaseProps = uploadBaseProps;
|
108
|
+
exports.uploadListTypes = uploadListTypes;
|
109
|
+
exports.uploadProps = uploadProps;
|
135
110
|
//# sourceMappingURL=upload2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"upload2.js","sources":["../../../../../../packages/components/upload/src/upload.
|
1
|
+
{"version":3,"file":"upload2.js","sources":["../../../../../../packages/components/upload/src/upload.ts"],"sourcesContent":["import { NOOP, buildProps, definePropType, mutable } from '@element-plus/utils'\nimport { ajaxUpload } from './ajax'\nimport type { Awaitable, Mutable } from '@element-plus/utils'\n\nimport type { UploadAjaxError } from './ajax'\nimport type { ExtractPropTypes } from 'vue'\nimport type Upload from './upload.vue'\n\nexport const uploadListTypes = ['text', 'picture', 'picture-card'] as const\n\nlet fileId = 1\nexport const genFileId = () => Date.now() + fileId++\n\nexport type UploadStatus = 'ready' | 'uploading' | 'success' | 'fail'\nexport interface UploadProgressEvent extends ProgressEvent {\n percent: number\n}\n\nexport interface UploadRequestOptions {\n action: string\n method: string\n data: Record<string, string | Blob | [Blob, string]>\n filename: string\n file: UploadRawFile\n headers: Headers | Record<string, string | number | null | undefined>\n onError: (evt: UploadAjaxError) => void\n onProgress: (evt: UploadProgressEvent) => void\n onSuccess: (response: any) => void\n withCredentials: boolean\n}\nexport interface UploadFile {\n name: string\n percentage?: number\n status: UploadStatus\n size?: number\n response?: unknown\n uid: number\n url?: string\n raw?: UploadRawFile\n}\nexport type UploadUserFile = Omit<UploadFile, 'status' | 'uid'> &\n Partial<Pick<UploadFile, 'status' | 'uid'>>\n\nexport type UploadFiles = UploadFile[]\nexport interface UploadRawFile extends File {\n uid: number\n isDirectory?: boolean\n}\nexport type UploadRequestHandler = (\n options: UploadRequestOptions\n) => XMLHttpRequest | Promise<unknown>\nexport interface UploadHooks {\n beforeUpload: (\n rawFile: UploadRawFile\n ) => Awaitable<void | undefined | null | boolean | File | Blob>\n beforeRemove: (\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => Awaitable<boolean>\n onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void\n onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void\n onPreview: (uploadFile: UploadFile) => void\n onSuccess: (\n response: any,\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => void\n onProgress: (\n evt: UploadProgressEvent,\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => void\n onError: (\n error: Error,\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => void\n onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void\n}\n\nexport type UploadData = Mutable<Record<string, any>>\n\nexport const uploadBaseProps = buildProps({\n /**\n * @description request URL\n */\n action: {\n type: String,\n default: '#',\n },\n /**\n * @description request headers\n */\n headers: {\n type: definePropType<Headers | Record<string, any>>(Object),\n },\n /**\n * @description set upload request method\n */\n method: {\n type: String,\n default: 'post',\n },\n /**\n * @description additions options of request\n */\n data: {\n type: definePropType<\n | Awaitable<UploadData>\n | ((rawFile: UploadRawFile) => Awaitable<UploadData>)\n >([Object, Function, Promise]),\n default: () => mutable({} as const),\n },\n /**\n * @description whether uploading multiple files is permitted\n */\n multiple: Boolean,\n /**\n * @description key name for uploaded file\n */\n name: {\n type: String,\n default: 'file',\n },\n /**\n * @description whether to activate drag and drop mode\n */\n drag: Boolean,\n /**\n * @description whether cookies are sent\n */\n withCredentials: Boolean,\n /**\n * @description whether to show the uploaded file list\n */\n showFileList: {\n type: Boolean,\n default: true,\n },\n /**\n * @description accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true`\n */\n accept: {\n type: String,\n default: '',\n },\n /**\n * @description default uploaded files\n */\n fileList: {\n type: definePropType<UploadUserFile[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether to auto upload file\n */\n autoUpload: {\n type: Boolean,\n default: true,\n },\n /**\n * @description type of file list\n */\n listType: {\n type: String,\n values: uploadListTypes,\n default: 'text',\n },\n /**\n * @description override default xhr behavior, allowing you to implement your own upload-file's request\n */\n httpRequest: {\n type: definePropType<UploadRequestHandler>(Function),\n default: ajaxUpload,\n },\n /**\n * @description whether to disable upload\n */\n disabled: Boolean,\n /**\n * @description maximum number of uploads allowed\n */\n limit: Number,\n} as const)\n\nexport const uploadProps = buildProps({\n ...uploadBaseProps,\n /**\n * @description hook function before uploading with the file to be uploaded as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, uploading will be aborted\n */\n beforeUpload: {\n type: definePropType<UploadHooks['beforeUpload']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function before removing a file with the file and file list as its parameters. If `false` is returned or a `Promise` is returned and then is rejected, removing will be aborted\n */\n beforeRemove: {\n type: definePropType<UploadHooks['beforeRemove']>(Function),\n },\n /**\n * @description hook function when files are removed\n */\n onRemove: {\n type: definePropType<UploadHooks['onRemove']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when select file or upload file success or upload file fail\n */\n onChange: {\n type: definePropType<UploadHooks['onChange']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when clicking the uploaded files\n */\n onPreview: {\n type: definePropType<UploadHooks['onPreview']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when uploaded successfully\n */\n onSuccess: {\n type: definePropType<UploadHooks['onSuccess']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when some progress occurs\n */\n onProgress: {\n type: definePropType<UploadHooks['onProgress']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when some errors occurs\n */\n onError: {\n type: definePropType<UploadHooks['onError']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when limit is exceeded\n */\n onExceed: {\n type: definePropType<UploadHooks['onExceed']>(Function),\n default: NOOP,\n },\n /**\n * @description set HTML attribute: crossorigin.\n */\n crossorigin: {\n type: definePropType<'anonymous' | 'use-credentials' | ''>(String),\n },\n} as const)\n\nexport type UploadProps = ExtractPropTypes<typeof uploadProps>\n\nexport type UploadInstance = InstanceType<typeof Upload> & unknown\n"],"names":["buildProps","definePropType","mutable","ajaxUpload","NOOP"],"mappings":";;;;;;;;;AAEY,MAAC,eAAe,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE;AACnE,IAAI,MAAM,GAAG,CAAC,CAAC;AACH,MAAC,SAAS,GAAG,MAAM,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,GAA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Q,CAAC;AAClC,IAAI,OAAO,EAAEG,WAAI;AACjB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEH,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,CAAC;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var vue = require('vue');
|
6
6
|
var lodashUnified = require('lodash-unified');
|
7
7
|
var core = require('@vueuse/core');
|
8
|
-
var upload = require('./
|
8
|
+
var upload = require('./upload2.js');
|
9
9
|
var error = require('../../../utils/error.js');
|
10
10
|
|
11
11
|
const SCOPE = "ElUpload";
|
package/lib/defaults.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
declare const _default: {
|
2
2
|
version: string;
|
3
|
-
install: (app: import("vue").App, options?: import("@element-plus/nightly/es/components
|
3
|
+
install: (app: import("vue").App, options?: import("@element-plus/nightly/es/components").ConfigProviderContext) => void;
|
4
4
|
};
|
5
5
|
export default _default;
|
@@ -3,8 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var core = require('@vueuse/core');
|
6
|
-
var types = require('../../utils/types.js');
|
7
6
|
var shared = require('@vue/shared');
|
7
|
+
var types = require('../../utils/types.js');
|
8
8
|
|
9
9
|
const nodeList = /* @__PURE__ */ new Map();
|
10
10
|
if (core.isClient) {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
2
2
|
export declare const useDraggable: (targetRef: Ref<HTMLElement | undefined>, dragRef: Ref<HTMLElement | undefined>, draggable: ComputedRef<boolean>, overflow?: ComputedRef<boolean>) => {
|
3
3
|
resetPosition: () => void;
|
4
|
+
updatePosition: () => void;
|
4
5
|
};
|
@@ -6,39 +6,41 @@ var vue = require('vue');
|
|
6
6
|
var style = require('../../utils/dom/style.js');
|
7
7
|
|
8
8
|
const useDraggable = (targetRef, dragRef, draggable, overflow) => {
|
9
|
-
|
9
|
+
const transform = {
|
10
10
|
offsetX: 0,
|
11
11
|
offsetY: 0
|
12
12
|
};
|
13
|
+
const adjustPosition = (moveX, moveY) => {
|
14
|
+
if (targetRef.value) {
|
15
|
+
const { offsetX, offsetY } = transform;
|
16
|
+
const targetRect = targetRef.value.getBoundingClientRect();
|
17
|
+
const targetLeft = targetRect.left;
|
18
|
+
const targetTop = targetRect.top;
|
19
|
+
const targetWidth = targetRect.width;
|
20
|
+
const targetHeight = targetRect.height;
|
21
|
+
const clientWidth = document.documentElement.clientWidth;
|
22
|
+
const clientHeight = document.documentElement.clientHeight;
|
23
|
+
const minLeft = -targetLeft + offsetX;
|
24
|
+
const minTop = -targetTop + offsetY;
|
25
|
+
const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
|
26
|
+
const maxTop = clientHeight - targetTop - targetHeight + offsetY;
|
27
|
+
if (!(overflow == null ? void 0 : overflow.value)) {
|
28
|
+
moveX = Math.min(Math.max(moveX, minLeft), maxLeft);
|
29
|
+
moveY = Math.min(Math.max(moveY, minTop), maxTop);
|
30
|
+
}
|
31
|
+
transform.offsetX = moveX;
|
32
|
+
transform.offsetY = moveY;
|
33
|
+
targetRef.value.style.transform = `translate(${style.addUnit(moveX)}, ${style.addUnit(moveY)})`;
|
34
|
+
}
|
35
|
+
};
|
13
36
|
const onMousedown = (e) => {
|
14
37
|
const downX = e.clientX;
|
15
38
|
const downY = e.clientY;
|
16
39
|
const { offsetX, offsetY } = transform;
|
17
|
-
const targetRect = targetRef.value.getBoundingClientRect();
|
18
|
-
const targetLeft = targetRect.left;
|
19
|
-
const targetTop = targetRect.top;
|
20
|
-
const targetWidth = targetRect.width;
|
21
|
-
const targetHeight = targetRect.height;
|
22
|
-
const clientWidth = document.documentElement.clientWidth;
|
23
|
-
const clientHeight = document.documentElement.clientHeight;
|
24
|
-
const minLeft = -targetLeft + offsetX;
|
25
|
-
const minTop = -targetTop + offsetY;
|
26
|
-
const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
|
27
|
-
const maxTop = clientHeight - targetTop - targetHeight + offsetY;
|
28
40
|
const onMousemove = (e2) => {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
moveX = Math.min(Math.max(moveX, minLeft), maxLeft);
|
33
|
-
moveY = Math.min(Math.max(moveY, minTop), maxTop);
|
34
|
-
}
|
35
|
-
transform = {
|
36
|
-
offsetX: moveX,
|
37
|
-
offsetY: moveY
|
38
|
-
};
|
39
|
-
if (targetRef.value) {
|
40
|
-
targetRef.value.style.transform = `translate(${style.addUnit(moveX)}, ${style.addUnit(moveY)})`;
|
41
|
-
}
|
41
|
+
const moveX = offsetX + e2.clientX - downX;
|
42
|
+
const moveY = offsetY + e2.clientY - downY;
|
43
|
+
adjustPosition(moveX, moveY);
|
42
44
|
};
|
43
45
|
const onMouseup = () => {
|
44
46
|
document.removeEventListener("mousemove", onMousemove);
|
@@ -50,22 +52,26 @@ const useDraggable = (targetRef, dragRef, draggable, overflow) => {
|
|
50
52
|
const onDraggable = () => {
|
51
53
|
if (dragRef.value && targetRef.value) {
|
52
54
|
dragRef.value.addEventListener("mousedown", onMousedown);
|
55
|
+
window.addEventListener("resize", updatePosition);
|
53
56
|
}
|
54
57
|
};
|
55
58
|
const offDraggable = () => {
|
56
59
|
if (dragRef.value && targetRef.value) {
|
57
60
|
dragRef.value.removeEventListener("mousedown", onMousedown);
|
61
|
+
window.removeEventListener("resize", updatePosition);
|
58
62
|
}
|
59
63
|
};
|
60
64
|
const resetPosition = () => {
|
61
|
-
transform =
|
62
|
-
|
63
|
-
offsetY: 0
|
64
|
-
};
|
65
|
+
transform.offsetX = 0;
|
66
|
+
transform.offsetY = 0;
|
65
67
|
if (targetRef.value) {
|
66
|
-
targetRef.value.style.transform = "
|
68
|
+
targetRef.value.style.transform = "";
|
67
69
|
}
|
68
70
|
};
|
71
|
+
const updatePosition = () => {
|
72
|
+
const { offsetX, offsetY } = transform;
|
73
|
+
adjustPosition(offsetX, offsetY);
|
74
|
+
};
|
69
75
|
vue.onMounted(() => {
|
70
76
|
vue.watchEffect(() => {
|
71
77
|
if (draggable.value) {
|
@@ -79,7 +85,8 @@ const useDraggable = (targetRef, dragRef, draggable, overflow) => {
|
|
79
85
|
offDraggable();
|
80
86
|
});
|
81
87
|
return {
|
82
|
-
resetPosition
|
88
|
+
resetPosition,
|
89
|
+
updatePosition
|
83
90
|
};
|
84
91
|
};
|
85
92
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-draggable/index.ts"],"sourcesContent":["import { onBeforeUnmount, onMounted, watchEffect } from 'vue'\nimport { addUnit } from '@element-plus/utils'\nimport type { ComputedRef, Ref } from 'vue'\n\nexport const useDraggable = (\n targetRef: Ref<HTMLElement | undefined>,\n dragRef: Ref<HTMLElement | undefined>,\n draggable: ComputedRef<boolean>,\n overflow?: ComputedRef<boolean>\n) => {\n
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-draggable/index.ts"],"sourcesContent":["import { onBeforeUnmount, onMounted, watchEffect } from 'vue'\nimport { addUnit } from '@element-plus/utils'\nimport type { ComputedRef, Ref } from 'vue'\n\nexport const useDraggable = (\n targetRef: Ref<HTMLElement | undefined>,\n dragRef: Ref<HTMLElement | undefined>,\n draggable: ComputedRef<boolean>,\n overflow?: ComputedRef<boolean>\n) => {\n const transform = {\n offsetX: 0,\n offsetY: 0,\n }\n\n const adjustPosition = (moveX: number, moveY: number) => {\n if (targetRef.value) {\n const { offsetX, offsetY } = transform\n const targetRect = targetRef.value.getBoundingClientRect()\n const targetLeft = targetRect.left\n const targetTop = targetRect.top\n const targetWidth = targetRect.width\n const targetHeight = targetRect.height\n\n const clientWidth = document.documentElement.clientWidth\n const clientHeight = document.documentElement.clientHeight\n\n const minLeft = -targetLeft + offsetX\n const minTop = -targetTop + offsetY\n const maxLeft = clientWidth - targetLeft - targetWidth + offsetX\n const maxTop = clientHeight - targetTop - targetHeight + offsetY\n\n if (!overflow?.value) {\n moveX = Math.min(Math.max(moveX, minLeft), maxLeft)\n moveY = Math.min(Math.max(moveY, minTop), maxTop)\n }\n\n transform.offsetX = moveX\n transform.offsetY = moveY\n\n targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(\n moveY\n )})`\n }\n }\n\n const onMousedown = (e: MouseEvent) => {\n const downX = e.clientX\n const downY = e.clientY\n const { offsetX, offsetY } = transform\n\n const onMousemove = (e: MouseEvent) => {\n const moveX = offsetX + e.clientX - downX\n const moveY = offsetY + e.clientY - downY\n\n adjustPosition(moveX, moveY)\n }\n\n const onMouseup = () => {\n document.removeEventListener('mousemove', onMousemove)\n document.removeEventListener('mouseup', onMouseup)\n }\n\n document.addEventListener('mousemove', onMousemove)\n document.addEventListener('mouseup', onMouseup)\n }\n\n const onDraggable = () => {\n if (dragRef.value && targetRef.value) {\n dragRef.value.addEventListener('mousedown', onMousedown)\n window.addEventListener('resize', updatePosition)\n }\n }\n\n const offDraggable = () => {\n if (dragRef.value && targetRef.value) {\n dragRef.value.removeEventListener('mousedown', onMousedown)\n window.removeEventListener('resize', updatePosition)\n }\n }\n\n const resetPosition = () => {\n transform.offsetX = 0\n transform.offsetY = 0\n\n if (targetRef.value) {\n targetRef.value.style.transform = ''\n }\n }\n\n const updatePosition = () => {\n const { offsetX, offsetY } = transform\n\n adjustPosition(offsetX, offsetY)\n }\n\n onMounted(() => {\n watchEffect(() => {\n if (draggable.value) {\n onDraggable()\n } else {\n offDraggable()\n }\n })\n })\n\n onBeforeUnmount(() => {\n offDraggable()\n })\n\n return {\n resetPosition,\n updatePosition,\n }\n}\n"],"names":["addUnit","onMounted","watchEffect","onBeforeUnmount"],"mappings":";;;;;;;AAEY,MAAC,YAAY,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,KAAK;AACzE,EAAE,MAAM,SAAS,GAAG;AACpB,IAAI,OAAO,EAAE,CAAC;AACd,IAAI,OAAO,EAAE,CAAC;AACd,GAAG,CAA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,IAAI,YAAY,EAAE,CAAC;AACnB,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,aAAa;AACjB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var vue = require('vue');
|
6
6
|
var core = require('@vueuse/core');
|
7
7
|
var index = require('../use-prop/index.js');
|
8
|
-
var shared = require('@vue/shared');
|
9
8
|
var types = require('../../utils/types.js');
|
9
|
+
var shared = require('@vue/shared');
|
10
10
|
|
11
11
|
function useFocusController(target, {
|
12
12
|
beforeFocus,
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var vue = require('vue');
|
6
6
|
var index = require('../use-namespace/index.js');
|
7
7
|
var error = require('../../utils/error.js');
|
8
|
+
var core = require('@vueuse/core');
|
8
9
|
var style = require('../../utils/dom/style.js');
|
9
10
|
var scroll = require('../../utils/dom/scroll.js');
|
10
|
-
var core = require('@vueuse/core');
|
11
11
|
|
12
12
|
const useLockscreen = (trigger, options = {}) => {
|
13
13
|
if (!vue.isRef(trigger)) {
|
package/lib/index.d.ts
CHANGED
@@ -4,7 +4,7 @@ export * from '@element-plus/nightly/es/constants';
|
|
4
4
|
export * from '@element-plus/nightly/es/directives';
|
5
5
|
export * from '@element-plus/nightly/es/hooks';
|
6
6
|
export * from './make-installer';
|
7
|
-
export declare const install: (app: import("vue").App, options?: import("@element-plus/nightly/es/components
|
7
|
+
export declare const install: (app: import("vue").App, options?: import("@element-plus/nightly/es/components").ConfigProviderContext) => void;
|
8
8
|
export declare const version: string;
|
9
9
|
export default installer;
|
10
10
|
export { default as dayjs } from 'dayjs';
|