element-plus 2.2.12 → 2.2.15
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 +926 -725
- package/dist/index.full.min.js +16 -16
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +17 -17
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +927 -726
- 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.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/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +47 -12
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.js.map +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.min.mjs.map +1 -1
- package/dist/locale/zh-tw.mjs +47 -12
- package/es/components/carousel/index.d.ts +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +1 -1
- package/es/components/cascader/index.d.ts +2 -2
- package/es/components/cascader/src/index.mjs +15 -12
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/cascader/src/index.vue.d.ts +42 -43
- package/es/components/checkbox/index.d.ts +2 -2
- package/es/components/checkbox/src/checkbox-group.mjs +3 -3
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/es/components/checkbox/src/checkbox.d.ts +4 -5
- package/es/components/checkbox/src/checkbox.mjs +6 -10
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/color-picker/src/index.mjs +10 -15
- package/es/components/color-picker/src/index.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -0
- package/es/components/date-picker/src/panel-utils.d.ts +2 -0
- package/es/components/dialog/src/use-dialog.mjs +1 -1
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/form/index.d.ts +4 -0
- package/es/components/form/src/form-item2.mjs +1 -0
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.d.ts +1 -0
- package/es/components/form/src/form.mjs +5 -0
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form.vue.d.ts +4 -0
- package/es/components/index.mjs +1 -1
- package/es/components/menu/index.d.ts +224 -0
- package/es/components/menu/src/menu.mjs +39 -17
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.d.ts +138 -2
- package/es/components/menu/src/sub-menu.mjs +18 -3
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/message/src/instance.mjs +1 -1
- package/es/components/message/src/instance.mjs.map +1 -1
- package/es/components/message/src/method.mjs +1 -1
- package/es/components/message/src/method.mjs.map +1 -1
- package/es/components/message-box/src/message-box.type.d.ts +1 -1
- package/es/components/message-box/src/messageBox.mjs +10 -9
- package/es/components/message-box/src/messageBox.mjs.map +1 -1
- package/es/components/notification/src/notification.d.ts +2 -0
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +111 -5
- package/es/components/notification/src/notification2.mjs +84 -91
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/notification/src/notify.mjs.map +1 -1
- package/es/components/page-header/index.d.ts +46 -0
- package/es/components/page-header/src/page-header.vue.d.ts +46 -0
- package/es/components/page-header/src/page-header2.mjs +70 -28
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +6 -0
- package/es/components/pagination/src/components/next.d.ts +6 -0
- package/es/components/pagination/src/components/next.mjs +4 -0
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next.vue.d.ts +18 -1
- package/es/components/pagination/src/components/next2.mjs +2 -3
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.d.ts +6 -0
- package/es/components/pagination/src/components/prev.mjs +4 -0
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.vue.d.ts +18 -1
- package/es/components/pagination/src/components/prev2.mjs +2 -3
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.d.ts +8 -0
- package/es/components/pagination/src/pagination.mjs +12 -0
- package/es/components/pagination/src/pagination.mjs.map +1 -1
- package/es/components/popconfirm/index.d.ts +7 -0
- package/es/components/popconfirm/src/popconfirm.d.ts +1 -0
- package/es/components/popconfirm/src/popconfirm.mjs +5 -1
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +454 -447
- package/es/components/popconfirm/src/popconfirm2.mjs +14 -5
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +1 -1
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +169 -44
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +44 -169
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/src/useOption.mjs +2 -2
- package/es/components/select/src/useOption.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +31 -32
- package/es/components/select/src/useSelect.mjs +8 -11
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/slider/src/composables/use-marks.mjs +1 -1
- package/es/components/slider/src/composables/use-marks.mjs.map +1 -1
- package/es/components/slot/src/only-child.mjs +3 -1
- package/es/components/slot/src/only-child.mjs.map +1 -1
- package/es/components/space/index.d.ts +3 -3
- package/es/components/space/src/space.d.ts +5 -4
- package/es/components/space/src/space.mjs.map +1 -1
- package/es/components/space/src/use-space.d.ts +1 -1
- package/es/components/switch/src/switch2.mjs +2 -1
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.mjs +11 -9
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/events-helper.d.ts +1 -3
- package/es/components/table/src/table-body/events-helper.mjs +2 -2
- package/es/components/table/src/table-body/events-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/index.mjs +1 -5
- package/es/components/table/src/table-body/index.mjs.map +1 -1
- package/es/components/table/src/table-body/render-helper.mjs +2 -2
- package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
- package/es/components/table/src/table-header/index.mjs +1 -2
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/util.mjs +1 -0
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +6 -9
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +21 -22
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs +12 -4
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +1 -0
- package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +1 -0
- package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +1 -0
- package/es/components/transfer/index.d.ts +10 -10
- package/es/components/transfer/src/transfer-panel.vue.d.ts +2 -2
- package/es/components/transfer/src/transfer.vue.d.ts +10 -10
- package/es/components/tree/src/model/node.mjs +3 -3
- package/es/components/tree/src/model/node.mjs.map +1 -1
- package/es/components/tree/src/model/tree-store.mjs +2 -2
- package/es/components/tree/src/model/tree-store.mjs.map +1 -1
- package/es/components/tree-v2/src/composables/useTree.d.ts +4 -0
- package/es/components/tree-v2/src/composables/useTree.mjs +21 -7
- package/es/components/tree-v2/src/composables/useTree.mjs.map +1 -1
- package/es/components/tree-v2/src/tree.mjs +10 -2
- package/es/components/tree-v2/src/tree.mjs.map +1 -1
- package/es/components/virtual-list/src/builders/build-list.mjs +3 -3
- package/es/components/virtual-list/src/builders/build-list.mjs.map +1 -1
- package/es/hooks/use-id/index.mjs +4 -1
- package/es/hooks/use-id/index.mjs.map +1 -1
- package/es/hooks/use-lockscreen/index.mjs +4 -6
- package/es/hooks/use-lockscreen/index.mjs.map +1 -1
- package/es/index.mjs +1 -1
- package/es/locale/lang/zh-tw.d.ts +35 -0
- package/es/locale/lang/zh-tw.mjs +46 -11
- package/es/locale/lang/zh-tw.mjs.map +1 -1
- package/es/utils/dom/index.d.ts +0 -1
- package/es/utils/dom/index.mjs +0 -1
- package/es/utils/dom/index.mjs.map +1 -1
- package/es/utils/index.mjs +0 -1
- package/es/utils/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/carousel/index.d.ts +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
- package/lib/components/cascader/index.d.ts +2 -2
- package/lib/components/cascader/src/index.js +16 -13
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/cascader/src/index.vue.d.ts +42 -43
- package/lib/components/checkbox/index.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox-group.js +3 -3
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox.d.ts +4 -5
- package/lib/components/checkbox/src/checkbox.js +4 -8
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/color-picker/src/index.js +8 -13
- package/lib/components/color-picker/src/index.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -0
- package/lib/components/date-picker/src/panel-utils.d.ts +2 -0
- package/lib/components/dialog/src/use-dialog.js +1 -1
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/form/index.d.ts +4 -0
- package/lib/components/form/src/form-item2.js +1 -0
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.d.ts +1 -0
- package/lib/components/form/src/form.js +5 -0
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form.vue.d.ts +4 -0
- package/lib/components/index.js +1 -1
- package/lib/components/menu/index.d.ts +224 -0
- package/lib/components/menu/src/menu.js +39 -17
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.d.ts +138 -2
- package/lib/components/menu/src/sub-menu.js +17 -2
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/message/src/instance.js +1 -1
- package/lib/components/message/src/instance.js.map +1 -1
- package/lib/components/message/src/method.js +1 -1
- package/lib/components/message/src/method.js.map +1 -1
- package/lib/components/message-box/src/message-box.type.d.ts +1 -1
- package/lib/components/message-box/src/messageBox.js +10 -9
- package/lib/components/message-box/src/messageBox.js.map +1 -1
- package/lib/components/notification/src/notification.d.ts +2 -0
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +111 -5
- package/lib/components/notification/src/notification2.js +85 -92
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/notification/src/notify.js.map +1 -1
- package/lib/components/page-header/index.d.ts +46 -0
- package/lib/components/page-header/src/page-header.vue.d.ts +46 -0
- package/lib/components/page-header/src/page-header2.js +69 -27
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/pagination/index.d.ts +6 -0
- package/lib/components/pagination/src/components/next.d.ts +6 -0
- package/lib/components/pagination/src/components/next.js +4 -0
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next.vue.d.ts +18 -1
- package/lib/components/pagination/src/components/next2.js +1 -2
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.d.ts +6 -0
- package/lib/components/pagination/src/components/prev.js +4 -0
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev.vue.d.ts +18 -1
- package/lib/components/pagination/src/components/prev2.js +1 -2
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/pagination.d.ts +8 -0
- package/lib/components/pagination/src/pagination.js +12 -0
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/popconfirm/index.d.ts +7 -0
- package/lib/components/popconfirm/src/popconfirm.d.ts +1 -0
- package/lib/components/popconfirm/src/popconfirm.js +5 -1
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +454 -447
- package/lib/components/popconfirm/src/popconfirm2.js +13 -4
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/src/popover2.js +1 -1
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +169 -45
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +45 -169
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/src/useOption.js +1 -1
- package/lib/components/select/src/useOption.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +31 -32
- package/lib/components/select/src/useSelect.js +9 -12
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/slider/src/composables/use-marks.js +1 -1
- package/lib/components/slider/src/composables/use-marks.js.map +1 -1
- package/lib/components/slot/src/only-child.js +3 -1
- package/lib/components/slot/src/only-child.js.map +1 -1
- package/lib/components/space/index.d.ts +3 -3
- package/lib/components/space/src/space.d.ts +5 -4
- package/lib/components/space/src/space.js.map +1 -1
- package/lib/components/space/src/use-space.d.ts +1 -1
- package/lib/components/switch/src/switch2.js +2 -1
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/table/style-helper.js +11 -9
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table-body/events-helper.d.ts +1 -3
- package/lib/components/table/src/table-body/events-helper.js +2 -2
- package/lib/components/table/src/table-body/events-helper.js.map +1 -1
- package/lib/components/table/src/table-body/index.js +0 -4
- package/lib/components/table/src/table-body/index.js.map +1 -1
- package/lib/components/table/src/table-body/render-helper.js +2 -2
- package/lib/components/table/src/table-body/render-helper.js.map +1 -1
- package/lib/components/table/src/table-header/index.js +1 -2
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/util.js +1 -0
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +17 -20
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +21 -22
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js +12 -4
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +1 -0
- package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +1 -0
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +1 -0
- package/lib/components/transfer/index.d.ts +10 -10
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +2 -2
- package/lib/components/transfer/src/transfer.vue.d.ts +10 -10
- package/lib/components/tree/src/model/node.js +3 -3
- package/lib/components/tree/src/model/node.js.map +1 -1
- package/lib/components/tree/src/model/tree-store.js +1 -1
- package/lib/components/tree/src/model/tree-store.js.map +1 -1
- package/lib/components/tree-v2/src/composables/useTree.d.ts +4 -0
- package/lib/components/tree-v2/src/composables/useTree.js +21 -7
- package/lib/components/tree-v2/src/composables/useTree.js.map +1 -1
- package/lib/components/tree-v2/src/tree.js +10 -2
- package/lib/components/tree-v2/src/tree.js.map +1 -1
- package/lib/components/virtual-list/src/builders/build-list.js +2 -2
- package/lib/components/virtual-list/src/builders/build-list.js.map +1 -1
- package/lib/hooks/use-id/index.js +4 -1
- package/lib/hooks/use-id/index.js.map +1 -1
- package/lib/hooks/use-lockscreen/index.js +4 -6
- package/lib/hooks/use-lockscreen/index.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/zh-tw.d.ts +35 -0
- package/lib/locale/lang/zh-tw.js +46 -11
- package/lib/locale/lang/zh-tw.js.map +1 -1
- package/lib/utils/dom/index.d.ts +0 -1
- package/lib/utils/dom/index.js +0 -3
- package/lib/utils/dom/index.js.map +1 -1
- package/lib/utils/index.js +0 -3
- package/lib/utils/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +6 -4
- package/tags.json +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-message.css +1 -1
- package/theme-chalk/el-page-header.css +1 -1
- package/theme-chalk/el-popover.css +1 -1
- package/theme-chalk/el-rate.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +0 -2
- package/theme-chalk/src/form.scss +17 -6
- package/theme-chalk/src/input.scss +1 -0
- package/theme-chalk/src/menu.scss +0 -11
- package/theme-chalk/src/message.scss +1 -0
- package/theme-chalk/src/page-header.scss +40 -26
- package/theme-chalk/src/popover.scss +8 -0
- package/theme-chalk/src/rate.scss +1 -1
- package/theme-chalk/src/select/common.scss +3 -5
- package/theme-chalk/src/select.scss +1 -0
- package/theme-chalk/src/table.scss +15 -25
- package/web-types.json +1 -1
- package/es/utils/dom/resize-event.d.ts +0 -9
- package/es/utils/dom/resize-event.mjs +0 -34
- package/es/utils/dom/resize-event.mjs.map +0 -1
- package/lib/utils/dom/resize-event.d.ts +0 -9
- package/lib/utils/dom/resize-event.js +0 -39
- package/lib/utils/dom/resize-event.js.map +0 -1
|
@@ -7,10 +7,12 @@ var index$4 = require('../../button/index.js');
|
|
|
7
7
|
var index$3 = require('../../icon/index.js');
|
|
8
8
|
var index$2 = require('../../tooltip/index.js');
|
|
9
9
|
require('../../../hooks/index.js');
|
|
10
|
+
require('../../../utils/index.js');
|
|
10
11
|
var popconfirm = require('./popconfirm.js');
|
|
11
12
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
13
|
var index = require('../../../hooks/use-locale/index.js');
|
|
13
14
|
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
15
|
+
var style = require('../../../utils/dom/style.js');
|
|
14
16
|
|
|
15
17
|
const __default__ = {
|
|
16
18
|
name: "ElPopconfirm"
|
|
@@ -27,6 +29,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
29
|
var _a, _b;
|
|
28
30
|
(_b = (_a = tooltipRef.value) == null ? void 0 : _a.onClose) == null ? void 0 : _b.call(_a);
|
|
29
31
|
};
|
|
32
|
+
const style$1 = vue.computed(() => {
|
|
33
|
+
return {
|
|
34
|
+
width: style.addUnit(props.width)
|
|
35
|
+
};
|
|
36
|
+
});
|
|
30
37
|
const confirm = (e) => {
|
|
31
38
|
var _a;
|
|
32
39
|
(_a = props.onConfirm) == null ? void 0 : _a.call(props, e);
|
|
@@ -40,17 +47,19 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
40
47
|
const finalConfirmButtonText = vue.computed(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText"));
|
|
41
48
|
const finalCancelButtonText = vue.computed(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText"));
|
|
42
49
|
return (_ctx, _cache) => {
|
|
43
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$2.ElTooltip), {
|
|
50
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$2.ElTooltip), vue.mergeProps({
|
|
44
51
|
ref_key: "tooltipRef",
|
|
45
52
|
ref: tooltipRef,
|
|
46
53
|
trigger: "click",
|
|
47
|
-
effect: "light"
|
|
54
|
+
effect: "light"
|
|
55
|
+
}, _ctx.$attrs, {
|
|
48
56
|
"popper-class": `${vue.unref(ns).namespace.value}-popover`,
|
|
57
|
+
"popper-style": vue.unref(style$1),
|
|
49
58
|
teleported: _ctx.teleported,
|
|
50
59
|
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
51
60
|
"hide-after": _ctx.hideAfter,
|
|
52
61
|
persistent: _ctx.persistent
|
|
53
|
-
}, {
|
|
62
|
+
}), {
|
|
54
63
|
content: vue.withCtx(() => [
|
|
55
64
|
vue.createElementVNode("div", {
|
|
56
65
|
class: vue.normalizeClass(vue.unref(ns).b())
|
|
@@ -102,7 +111,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
102
111
|
_ctx.$slots.reference ? vue.renderSlot(_ctx.$slots, "reference", { key: 0 }) : vue.createCommentVNode("v-if", true)
|
|
103
112
|
]),
|
|
104
113
|
_: 3
|
|
105
|
-
},
|
|
114
|
+
}, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]);
|
|
106
115
|
};
|
|
107
116
|
}
|
|
108
117
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popconfirm2.js","sources":["../../../../../../packages/components/popconfirm/src/popconfirm.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n trigger=\"click\"\n effect=\"light\"\n :popper-class=\"`${ns.namespace.value}-popover`\"\n :teleported=\"teleported\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n :hide-after=\"hideAfter\"\n :persistent=\"persistent\"\n >\n <template #content>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('main')\">\n <el-icon\n v-if=\"!hideIcon && icon\"\n :class=\"ns.e('icon')\"\n :style=\"{ color: iconColor }\"\n >\n <component :is=\"icon\" />\n </el-icon>\n {{ title }}\n </div>\n <div :class=\"ns.e('action')\">\n <el-button\n size=\"small\"\n :type=\"cancelButtonType === 'text' ? '' : cancelButtonType\"\n :text=\"cancelButtonType === 'text'\"\n @click=\"cancel\"\n >\n {{ finalCancelButtonText }}\n </el-button>\n <el-button\n size=\"small\"\n :type=\"confirmButtonType === 'text' ? '' : confirmButtonType\"\n :text=\"confirmButtonType === 'text'\"\n @click=\"confirm\"\n >\n {{ finalConfirmButtonText }}\n </el-button>\n </div>\n </div>\n </template>\n <template v-if=\"$slots.reference\">\n <slot name=\"reference\" />\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport ElIcon from '@element-plus/components/icon'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { popconfirmProps } from './popconfirm'\n\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'ElPopconfirm',\n})\n\nconst props = defineProps(popconfirmProps)\n\nconst { t } = useLocale()\nconst ns = useNamespace('popconfirm')\nconst tooltipRef = ref<TooltipInstance>()\n\nconst hidePopper = () => {\n tooltipRef.value?.onClose?.()\n}\n\nconst confirm = (e: Event) => {\n props.onConfirm?.(e)\n hidePopper()\n}\nconst cancel = (e: Event) => {\n props.onCancel?.(e)\n hidePopper()\n}\n\nconst finalConfirmButtonText = computed(\n () => props.confirmButtonText || t('el.popconfirm.confirmButtonText')\n)\nconst finalCancelButtonText = computed(\n () => props.cancelButtonText || t('el.popconfirm.cancelButtonText')\n)\n</script>\n"],"names":["useLocale","useNamespace","ref"],"mappings":"
|
|
1
|
+
{"version":3,"file":"popconfirm2.js","sources":["../../../../../../packages/components/popconfirm/src/popconfirm.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n trigger=\"click\"\n effect=\"light\"\n v-bind=\"$attrs\"\n :popper-class=\"`${ns.namespace.value}-popover`\"\n :popper-style=\"style\"\n :teleported=\"teleported\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n :hide-after=\"hideAfter\"\n :persistent=\"persistent\"\n >\n <template #content>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('main')\">\n <el-icon\n v-if=\"!hideIcon && icon\"\n :class=\"ns.e('icon')\"\n :style=\"{ color: iconColor }\"\n >\n <component :is=\"icon\" />\n </el-icon>\n {{ title }}\n </div>\n <div :class=\"ns.e('action')\">\n <el-button\n size=\"small\"\n :type=\"cancelButtonType === 'text' ? '' : cancelButtonType\"\n :text=\"cancelButtonType === 'text'\"\n @click=\"cancel\"\n >\n {{ finalCancelButtonText }}\n </el-button>\n <el-button\n size=\"small\"\n :type=\"confirmButtonType === 'text' ? '' : confirmButtonType\"\n :text=\"confirmButtonType === 'text'\"\n @click=\"confirm\"\n >\n {{ finalConfirmButtonText }}\n </el-button>\n </div>\n </div>\n </template>\n <template v-if=\"$slots.reference\">\n <slot name=\"reference\" />\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport ElIcon from '@element-plus/components/icon'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { addUnit } from '@element-plus/utils'\nimport { popconfirmProps } from './popconfirm'\n\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'ElPopconfirm',\n})\n\nconst props = defineProps(popconfirmProps)\n\nconst { t } = useLocale()\nconst ns = useNamespace('popconfirm')\nconst tooltipRef = ref<TooltipInstance>()\n\nconst hidePopper = () => {\n tooltipRef.value?.onClose?.()\n}\n\nconst style = computed(() => {\n return {\n width: addUnit(props.width),\n }\n})\n\nconst confirm = (e: Event) => {\n props.onConfirm?.(e)\n hidePopper()\n}\nconst cancel = (e: Event) => {\n props.onCancel?.(e)\n hidePopper()\n}\n\nconst finalConfirmButtonText = computed(\n () => props.confirmButtonText || t('el.popconfirm.confirmButtonText')\n)\nconst finalCancelButtonText = computed(\n () => props.cancelButtonText || t('el.popconfirm.cancelButtonText')\n)\n</script>\n"],"names":["useLocale","useNamespace","ref","style","computed","addUnit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoEA,IAAA,MAAA,EAAA,MAAAA,eAAA,EAAA,CAAA;AACA,IAAA,MAAA,EAAA,GAAAC,qBAAA,YAAA,CAAA,CAAA;AACA,IAAA,MAAA,aAAAC,OAAA,EAAA,CAAA;AAEA,IAAA,MAAA,aAAA,MAAA;AACA,MAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AAAA,MACA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,UAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA;AAEA,KAAA,CAAA;AACA,IAAA,MAAAC,OAAA,GAAAC,YAAA,CAAA,MAAA;AAAA,MACA,OAAA;AAAA,QACA,KAAA,EAAAC,aAAA,CAAA,KAAA,CAAA,KAAA,CAAA;AAAA,OACA,CAAA;AAEA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,iBAAA;AACA,MAAA,IAAA,EAAA,CAAA;AAAA,MACA,CAAA,EAAA,GAAA,KAAA,CAAA,SAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA;AACA,MAAA,UAAA,EAAA,CAAA;AACA,KAAA,CAAA;AACA,IAAA,MAAA,MAAA,GAAA,CAAA,CAAA,KAAA;AAAA,MACA,IAAA,EAAA,CAAA;AAEA,MAAA,CAAA,EAAA,0BAAA,GACA,KAAA,CAAA,GAAA,EAAA,CAAA,UAAA,EAAA,CAAA,CAAA,CAAA;AAEA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
42
42
|
return [ns.b(), props.popperClass, { [ns.m("plain")]: !!props.content }];
|
|
43
43
|
});
|
|
44
44
|
const gpuAcceleration = vue.computed(() => {
|
|
45
|
-
return props.transition ===
|
|
45
|
+
return props.transition === `${ns.namespace.value}-fade-in-linear`;
|
|
46
46
|
});
|
|
47
47
|
const hide = () => {
|
|
48
48
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover2.js","sources":["../../../../../../packages/components/popover/src/popover.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n v-bind=\"$attrs\"\n :trigger=\"trigger\"\n :placement=\"placement\"\n :disabled=\"disabled\"\n :visible=\"visible\"\n :transition=\"transition\"\n :popper-options=\"popperOptions\"\n :tabindex=\"tabindex\"\n :content=\"content\"\n :offset=\"offset\"\n :show-after=\"showAfter\"\n :hide-after=\"hideAfter\"\n :auto-close=\"autoClose\"\n :show-arrow=\"showArrow\"\n :aria-label=\"title\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :popper-class=\"kls\"\n :popper-style=\"style\"\n :teleported=\"teleported\"\n :persistent=\"persistent\"\n :gpu-acceleration=\"gpuAcceleration\"\n @update:visible=\"onUpdateVisible\"\n @before-show=\"beforeEnter\"\n @before-hide=\"beforeLeave\"\n @show=\"afterEnter\"\n @hide=\"afterLeave\"\n >\n <template v-if=\"$slots.reference\">\n <slot name=\"reference\" />\n </template>\n\n <template #content>\n <div v-if=\"title\" :class=\"ns.e('title')\" role=\"title\">\n {{ title }}\n </div>\n <slot>\n {{ content }}\n </slot>\n </template>\n </el-tooltip>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref, unref } from 'vue'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { addUnit } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { popoverEmits, popoverProps } from './popover'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'ElPopover',\n})\n\nconst props = defineProps(popoverProps)\nconst emit = defineEmits(popoverEmits)\n\nconst updateEventKeyRaw = `onUpdate:visible` as const\n\nconst onUpdateVisible = computed(() => {\n return props[updateEventKeyRaw]\n})\n\nconst ns = useNamespace('popover')\nconst tooltipRef = ref<TooltipInstance>()\nconst popperRef = computed(() => {\n return unref(tooltipRef)?.popperRef\n})\n\nconst style = computed(() => {\n return [\n {\n width: addUnit(props.width),\n },\n props.popperStyle!,\n ]\n})\n\nconst kls = computed(() => {\n return [ns.b(), props.popperClass!, { [ns.m('plain')]: !!props.content }]\n})\n\nconst gpuAcceleration = computed(() => {\n return props.transition ===
|
|
1
|
+
{"version":3,"file":"popover2.js","sources":["../../../../../../packages/components/popover/src/popover.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n v-bind=\"$attrs\"\n :trigger=\"trigger\"\n :placement=\"placement\"\n :disabled=\"disabled\"\n :visible=\"visible\"\n :transition=\"transition\"\n :popper-options=\"popperOptions\"\n :tabindex=\"tabindex\"\n :content=\"content\"\n :offset=\"offset\"\n :show-after=\"showAfter\"\n :hide-after=\"hideAfter\"\n :auto-close=\"autoClose\"\n :show-arrow=\"showArrow\"\n :aria-label=\"title\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :popper-class=\"kls\"\n :popper-style=\"style\"\n :teleported=\"teleported\"\n :persistent=\"persistent\"\n :gpu-acceleration=\"gpuAcceleration\"\n @update:visible=\"onUpdateVisible\"\n @before-show=\"beforeEnter\"\n @before-hide=\"beforeLeave\"\n @show=\"afterEnter\"\n @hide=\"afterLeave\"\n >\n <template v-if=\"$slots.reference\">\n <slot name=\"reference\" />\n </template>\n\n <template #content>\n <div v-if=\"title\" :class=\"ns.e('title')\" role=\"title\">\n {{ title }}\n </div>\n <slot>\n {{ content }}\n </slot>\n </template>\n </el-tooltip>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref, unref } from 'vue'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { addUnit } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { popoverEmits, popoverProps } from './popover'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'ElPopover',\n})\n\nconst props = defineProps(popoverProps)\nconst emit = defineEmits(popoverEmits)\n\nconst updateEventKeyRaw = `onUpdate:visible` as const\n\nconst onUpdateVisible = computed(() => {\n return props[updateEventKeyRaw]\n})\n\nconst ns = useNamespace('popover')\nconst tooltipRef = ref<TooltipInstance>()\nconst popperRef = computed(() => {\n return unref(tooltipRef)?.popperRef\n})\n\nconst style = computed(() => {\n return [\n {\n width: addUnit(props.width),\n },\n props.popperStyle!,\n ]\n})\n\nconst kls = computed(() => {\n return [ns.b(), props.popperClass!, { [ns.m('plain')]: !!props.content }]\n})\n\nconst gpuAcceleration = computed(() => {\n return props.transition === `${ns.namespace.value}-fade-in-linear`\n})\n\nconst hide = () => {\n tooltipRef.value?.hide()\n}\n\nconst beforeEnter = () => {\n emit('before-enter')\n}\nconst beforeLeave = () => {\n emit('before-leave')\n}\n\nconst afterEnter = () => {\n emit('after-enter')\n}\n\nconst afterLeave = () => {\n emit('update:visible', false)\n emit('after-leave')\n}\n\ndefineExpose({\n /** @description popper ref */\n popperRef,\n /** @description hide popover */\n hide,\n})\n</script>\n"],"names":["computed","useNamespace","ref","unref","style","addUnit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4DA,IAAA,MAAA,iBAAA,GAAA,CAAA,gBAAA,CAAA,CAAA;AAEA,IAAA,MAAA,eAAA,GAAAA,aAAA,MAAA;AACA,MAAA,OAAA,KAAA,CAAA,iBAAA,CAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAAC,mBAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,aAAAC,OAAA,EAAA,CAAA;AACA,IAAA,MAAA,SAAA,GAAAF,aAAA,MAAA;AACA,MAAA,IAAA,EAAA,CAAA;AAAA,MACA,OAAA,CAAA,EAAA,GAAAG,SAAA,CAAA,UAAA,CAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,CAAA;AAEA,KAAA,CAAA,CAAA;AACA,IAAA,MAAAC,OAAA,GAAAJ,YAAA,CAAA,MAAA;AAAA,MACA,OAAA;AAAA,QACA;AAAA,UACA,KAAA,EAAAK,aAAA,CAAA,KAAA,CAAA,KAAA,CAAA;AAAA,SACA;AAAA,QACA,KAAA,CAAA,WAAA;AAAA,OACA,CAAA;AAEA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,GAAA,GAAAL,YAAA,CAAA;AAAA,MACA,OAAA,CAAA,EAAA,CAAA,CAAA,EAAA,EAAA,KAAA,CAAA,WAAA,EAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,KAAA,CAAA,OAAA,EAAA,CAAA,CAAA;AAEA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,eAAA,GAAAA,YAAA,CAAA,MAAA;AAAA,MACA,OAAA,KAAA,CAAA,UAAA,KAAA,CAAA,EAAA,EAAA,CAAA,SAAA,CAAA,KAAA,CAAA,eAAA,CAAA,CAAA;AAEA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,IAAA,GAAA;AAAA,MACA,IAAA,EAAA,CAAA;AAEA,MAAA,CAAA,EAAA,mBAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,EAAA,CAAA;AACA,KAAA,CAAA;AAAA,IACA,MAAA,WAAA,GAAA,MAAA;AACA,MAAA,IAAA,eAAA,CAAA,CAAA;AACA,KAAA,CAAA;AAAA,IACA,MAAA,WAAA,GAAA,MAAA;AAEA,MAAA,IAAA,eAAA,CAAA,CAAA;AACA,KAAA,CAAA;AAAA,IACA,MAAA,UAAA,GAAA,MAAA;AAEA,MAAA,IAAA,cAAA,CAAA,CAAA;AACA,KAAA,CAAA;AACA,IAAA,MAAA,UAAA,GAAA,MAAA;AAAA,MACA,IAAA,CAAA,gBAAA,EAAA,KAAA,CAAA,CAAA;AAEA,MAAA,IAAA,CAAA,aAAA,CAAA,CAAA;AAAA,KAEA,CAAA;AAAA,IAEA,MAAA,CAAA;AAAA,MACA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var scrollbar$1 = require('./src/
|
|
6
|
+
var scrollbar$1 = require('./src/scrollbar.js');
|
|
7
7
|
var util = require('./src/util.js');
|
|
8
|
-
var scrollbar = require('./src/
|
|
8
|
+
var scrollbar = require('./src/scrollbar2.js');
|
|
9
9
|
var thumb = require('./src/thumb.js');
|
|
10
10
|
var install = require('../../utils/vue/install.js');
|
|
11
11
|
|
|
@@ -2,54 +2,178 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
5
|
+
var vue = require('vue');
|
|
7
6
|
var core = require('@vueuse/core');
|
|
7
|
+
require('../../../utils/index.js');
|
|
8
|
+
require('../../../tokens/index.js');
|
|
9
|
+
require('../../../hooks/index.js');
|
|
10
|
+
var util = require('./util.js');
|
|
11
|
+
var bar = require('./bar2.js');
|
|
12
|
+
var scrollbar = require('./scrollbar2.js');
|
|
13
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
14
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
15
|
+
var style = require('../../../utils/dom/style.js');
|
|
16
|
+
var shared = require('@vue/shared');
|
|
17
|
+
var error = require('../../../utils/error.js');
|
|
18
|
+
var scrollbar$1 = require('../../../tokens/scrollbar.js');
|
|
8
19
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
20
|
+
const __default__ = {
|
|
21
|
+
name: "ElScrollbar"
|
|
22
|
+
};
|
|
23
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
24
|
+
...__default__,
|
|
25
|
+
props: scrollbar.scrollbarProps,
|
|
26
|
+
emits: scrollbar.scrollbarEmits,
|
|
27
|
+
setup(__props, { expose, emit }) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const ns = index.useNamespace("scrollbar");
|
|
30
|
+
let stopResizeObserver = void 0;
|
|
31
|
+
let stopResizeListener = void 0;
|
|
32
|
+
const scrollbar$ = vue.ref();
|
|
33
|
+
const wrap$ = vue.ref();
|
|
34
|
+
const resize$ = vue.ref();
|
|
35
|
+
const sizeWidth = vue.ref("0");
|
|
36
|
+
const sizeHeight = vue.ref("0");
|
|
37
|
+
const barRef = vue.ref();
|
|
38
|
+
const ratioY = vue.ref(1);
|
|
39
|
+
const ratioX = vue.ref(1);
|
|
40
|
+
const SCOPE = "ElScrollbar";
|
|
41
|
+
const style$1 = vue.computed(() => {
|
|
42
|
+
const style2 = {};
|
|
43
|
+
if (props.height)
|
|
44
|
+
style2.height = style.addUnit(props.height);
|
|
45
|
+
if (props.maxHeight)
|
|
46
|
+
style2.maxHeight = style.addUnit(props.maxHeight);
|
|
47
|
+
return [props.wrapStyle, style2];
|
|
48
|
+
});
|
|
49
|
+
const handleScroll = () => {
|
|
50
|
+
var _a;
|
|
51
|
+
if (wrap$.value) {
|
|
52
|
+
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrap$.value);
|
|
53
|
+
emit("scroll", {
|
|
54
|
+
scrollTop: wrap$.value.scrollTop,
|
|
55
|
+
scrollLeft: wrap$.value.scrollLeft
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
function scrollTo(arg1, arg2) {
|
|
60
|
+
if (shared.isObject(arg1)) {
|
|
61
|
+
wrap$.value.scrollTo(arg1);
|
|
62
|
+
} else if (core.isNumber(arg1) && core.isNumber(arg2)) {
|
|
63
|
+
wrap$.value.scrollTo(arg1, arg2);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const setScrollTop = (value) => {
|
|
67
|
+
if (!core.isNumber(value)) {
|
|
68
|
+
error.debugWarn(SCOPE, "value must be a number");
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
wrap$.value.scrollTop = value;
|
|
72
|
+
};
|
|
73
|
+
const setScrollLeft = (value) => {
|
|
74
|
+
if (!core.isNumber(value)) {
|
|
75
|
+
error.debugWarn(SCOPE, "value must be a number");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
wrap$.value.scrollLeft = value;
|
|
79
|
+
};
|
|
80
|
+
const update = () => {
|
|
81
|
+
if (!wrap$.value)
|
|
82
|
+
return;
|
|
83
|
+
const offsetHeight = wrap$.value.offsetHeight - util.GAP;
|
|
84
|
+
const offsetWidth = wrap$.value.offsetWidth - util.GAP;
|
|
85
|
+
const originalHeight = offsetHeight ** 2 / wrap$.value.scrollHeight;
|
|
86
|
+
const originalWidth = offsetWidth ** 2 / wrap$.value.scrollWidth;
|
|
87
|
+
const height = Math.max(originalHeight, props.minSize);
|
|
88
|
+
const width = Math.max(originalWidth, props.minSize);
|
|
89
|
+
ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
|
|
90
|
+
ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
|
|
91
|
+
sizeHeight.value = height + util.GAP < offsetHeight ? `${height}px` : "";
|
|
92
|
+
sizeWidth.value = width + util.GAP < offsetWidth ? `${width}px` : "";
|
|
93
|
+
};
|
|
94
|
+
vue.watch(() => props.noresize, (noresize) => {
|
|
95
|
+
if (noresize) {
|
|
96
|
+
stopResizeObserver == null ? void 0 : stopResizeObserver();
|
|
97
|
+
stopResizeListener == null ? void 0 : stopResizeListener();
|
|
98
|
+
} else {
|
|
99
|
+
;
|
|
100
|
+
({ stop: stopResizeObserver } = core.useResizeObserver(resize$, update));
|
|
101
|
+
stopResizeListener = core.useEventListener("resize", update);
|
|
102
|
+
}
|
|
103
|
+
}, { immediate: true });
|
|
104
|
+
vue.watch(() => [props.maxHeight, props.height], () => {
|
|
105
|
+
if (!props.native)
|
|
106
|
+
vue.nextTick(() => {
|
|
107
|
+
var _a;
|
|
108
|
+
update();
|
|
109
|
+
if (wrap$.value) {
|
|
110
|
+
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrap$.value);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
vue.provide(scrollbar$1.scrollbarContextKey, vue.reactive({
|
|
115
|
+
scrollbarElement: scrollbar$,
|
|
116
|
+
wrapElement: wrap$
|
|
117
|
+
}));
|
|
118
|
+
vue.onMounted(() => {
|
|
119
|
+
if (!props.native)
|
|
120
|
+
vue.nextTick(() => {
|
|
121
|
+
update();
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
vue.onUpdated(() => update());
|
|
125
|
+
expose({
|
|
126
|
+
wrap$,
|
|
127
|
+
update,
|
|
128
|
+
scrollTo,
|
|
129
|
+
setScrollTop,
|
|
130
|
+
setScrollLeft,
|
|
131
|
+
handleScroll
|
|
132
|
+
});
|
|
133
|
+
return (_ctx, _cache) => {
|
|
134
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
135
|
+
ref_key: "scrollbar$",
|
|
136
|
+
ref: scrollbar$,
|
|
137
|
+
class: vue.normalizeClass(vue.unref(ns).b())
|
|
138
|
+
}, [
|
|
139
|
+
vue.createElementVNode("div", {
|
|
140
|
+
ref_key: "wrap$",
|
|
141
|
+
ref: wrap$,
|
|
142
|
+
class: vue.normalizeClass([
|
|
143
|
+
_ctx.wrapClass,
|
|
144
|
+
vue.unref(ns).e("wrap"),
|
|
145
|
+
{ [vue.unref(ns).em("wrap", "hidden-default")]: !_ctx.native }
|
|
146
|
+
]),
|
|
147
|
+
style: vue.normalizeStyle(vue.unref(style$1)),
|
|
148
|
+
onScroll: handleScroll
|
|
149
|
+
}, [
|
|
150
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
|
|
151
|
+
ref_key: "resize$",
|
|
152
|
+
ref: resize$,
|
|
153
|
+
class: vue.normalizeClass([vue.unref(ns).e("view"), _ctx.viewClass]),
|
|
154
|
+
style: vue.normalizeStyle(_ctx.viewStyle)
|
|
155
|
+
}, {
|
|
156
|
+
default: vue.withCtx(() => [
|
|
157
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
158
|
+
]),
|
|
159
|
+
_: 3
|
|
160
|
+
}, 8, ["class", "style"]))
|
|
161
|
+
], 38),
|
|
162
|
+
!_ctx.native ? (vue.openBlock(), vue.createBlock(bar["default"], {
|
|
163
|
+
key: 0,
|
|
164
|
+
ref_key: "barRef",
|
|
165
|
+
ref: barRef,
|
|
166
|
+
height: sizeHeight.value,
|
|
167
|
+
width: sizeWidth.value,
|
|
168
|
+
always: _ctx.always,
|
|
169
|
+
"ratio-x": ratioX.value,
|
|
170
|
+
"ratio-y": ratioY.value
|
|
171
|
+
}, null, 8, ["height", "width", "always", "ratio-x", "ratio-y"])) : vue.createCommentVNode("v-if", true)
|
|
172
|
+
], 2);
|
|
173
|
+
};
|
|
44
174
|
}
|
|
45
175
|
});
|
|
46
|
-
|
|
47
|
-
scroll: ({
|
|
48
|
-
scrollTop,
|
|
49
|
-
scrollLeft
|
|
50
|
-
}) => [scrollTop, scrollLeft].every(core.isNumber)
|
|
51
|
-
};
|
|
176
|
+
var Scrollbar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);
|
|
52
177
|
|
|
53
|
-
exports
|
|
54
|
-
exports.scrollbarProps = scrollbarProps;
|
|
178
|
+
exports["default"] = Scrollbar;
|
|
55
179
|
//# sourceMappingURL=scrollbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbar.js","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.
|
|
1
|
+
{"version":3,"file":"scrollbar.js","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.vue"],"sourcesContent":["<template>\n <div ref=\"scrollbar$\" :class=\"ns.b()\">\n <div\n ref=\"wrap$\"\n :class=\"[\n wrapClass,\n ns.e('wrap'),\n { [ns.em('wrap', 'hidden-default')]: !native },\n ]\"\n :style=\"style\"\n @scroll=\"handleScroll\"\n >\n <component\n :is=\"tag\"\n ref=\"resize$\"\n :class=\"[ns.e('view'), viewClass]\"\n :style=\"viewStyle\"\n >\n <slot />\n </component>\n </div>\n <template v-if=\"!native\">\n <bar\n ref=\"barRef\"\n :height=\"sizeHeight\"\n :width=\"sizeWidth\"\n :always=\"always\"\n :ratio-x=\"ratioX\"\n :ratio-y=\"ratioY\"\n />\n </template>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n onUpdated,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport { addUnit, debugWarn, isNumber, isObject } from '@element-plus/utils'\nimport { scrollbarContextKey } from '@element-plus/tokens'\nimport { useNamespace } from '@element-plus/hooks'\nimport { GAP } from './util'\nimport Bar from './bar.vue'\nimport { scrollbarEmits, scrollbarProps } from './scrollbar'\nimport type { BarInstance } from './bar'\nimport type { CSSProperties, StyleValue } from 'vue'\n\ndefineOptions({\n name: 'ElScrollbar',\n})\n\nconst props = defineProps(scrollbarProps)\nconst emit = defineEmits(scrollbarEmits)\n\nconst ns = useNamespace('scrollbar')\n\nlet stopResizeObserver: (() => void) | undefined = undefined\nlet stopResizeListener: (() => void) | undefined = undefined\n\nconst scrollbar$ = ref<HTMLDivElement>()\nconst wrap$ = ref<HTMLDivElement>()\nconst resize$ = ref<HTMLElement>()\n\nconst sizeWidth = ref('0')\nconst sizeHeight = ref('0')\nconst barRef = ref<BarInstance>()\nconst ratioY = ref(1)\nconst ratioX = ref(1)\nconst SCOPE = 'ElScrollbar'\n\nconst style = computed<StyleValue>(() => {\n const style: CSSProperties = {}\n if (props.height) style.height = addUnit(props.height)\n if (props.maxHeight) style.maxHeight = addUnit(props.maxHeight)\n return [props.wrapStyle, style]\n})\n\nconst handleScroll = () => {\n if (wrap$.value) {\n barRef.value?.handleScroll(wrap$.value)\n\n emit('scroll', {\n scrollTop: wrap$.value.scrollTop,\n scrollLeft: wrap$.value.scrollLeft,\n })\n }\n}\n\n// TODO: refactor method overrides, due to script setup dts\n// @ts-nocheck\nfunction scrollTo(xCord: number, yCord?: number): void\nfunction scrollTo(options: ScrollToOptions): void\nfunction scrollTo(arg1: unknown, arg2?: number) {\n if (isObject(arg1)) {\n wrap$.value!.scrollTo(arg1)\n } else if (isNumber(arg1) && isNumber(arg2)) {\n wrap$.value!.scrollTo(arg1, arg2)\n }\n}\n\nconst setScrollTop = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(SCOPE, 'value must be a number')\n return\n }\n wrap$.value!.scrollTop = value\n}\n\nconst setScrollLeft = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(SCOPE, 'value must be a number')\n return\n }\n wrap$.value!.scrollLeft = value\n}\n\nconst update = () => {\n if (!wrap$.value) return\n const offsetHeight = wrap$.value.offsetHeight - GAP\n const offsetWidth = wrap$.value.offsetWidth - GAP\n\n const originalHeight = offsetHeight ** 2 / wrap$.value.scrollHeight\n const originalWidth = offsetWidth ** 2 / wrap$.value.scrollWidth\n const height = Math.max(originalHeight, props.minSize)\n const width = Math.max(originalWidth, props.minSize)\n\n ratioY.value =\n originalHeight /\n (offsetHeight - originalHeight) /\n (height / (offsetHeight - height))\n ratioX.value =\n originalWidth /\n (offsetWidth - originalWidth) /\n (width / (offsetWidth - width))\n\n sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : ''\n sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : ''\n}\n\nwatch(\n () => props.noresize,\n (noresize) => {\n if (noresize) {\n stopResizeObserver?.()\n stopResizeListener?.()\n } else {\n ;({ stop: stopResizeObserver } = useResizeObserver(resize$, update))\n stopResizeListener = useEventListener('resize', update)\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => [props.maxHeight, props.height],\n () => {\n if (!props.native)\n nextTick(() => {\n update()\n if (wrap$.value) {\n barRef.value?.handleScroll(wrap$.value)\n }\n })\n }\n)\n\nprovide(\n scrollbarContextKey,\n reactive({\n scrollbarElement: scrollbar$,\n wrapElement: wrap$,\n })\n)\n\nonMounted(() => {\n if (!props.native)\n nextTick(() => {\n update()\n })\n})\nonUpdated(() => update())\n\ndefineExpose({\n /** @description scrollbar wrap ref */\n wrap$,\n /** @description update scrollbar state manually */\n update,\n /** @description scrolls to a particular set of coordinates */\n scrollTo,\n /** @description set distance to scroll top */\n setScrollTop,\n /** @description set distance to scroll left */\n setScrollLeft,\n /** @description handle scroll event */\n handleScroll,\n})\n</script>\n"],"names":["useNamespace","ref","style","computed","addUnit","isObject","isNumber","debugWarn","GAP","watch","useResizeObserver","useEventListener","nextTick","provide","scrollbarContextKey","reactive","onMounted","onUpdated"],"mappings":"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"}
|
|
@@ -2,178 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var core = require('@vueuse/core');
|
|
7
5
|
require('../../../utils/index.js');
|
|
8
|
-
require('../../../
|
|
9
|
-
require('
|
|
10
|
-
var util = require('./util.js');
|
|
11
|
-
var bar = require('./bar2.js');
|
|
12
|
-
var scrollbar = require('./scrollbar.js');
|
|
13
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
14
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
15
|
-
var style = require('../../../utils/dom/style.js');
|
|
16
|
-
var shared = require('@vue/shared');
|
|
17
|
-
var error = require('../../../utils/error.js');
|
|
18
|
-
var scrollbar$1 = require('../../../tokens/scrollbar.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
7
|
+
var core = require('@vueuse/core');
|
|
19
8
|
|
|
20
|
-
const
|
|
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
|
-
scrollLeft: wrap$.value.scrollLeft
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
function scrollTo(arg1, arg2) {
|
|
60
|
-
if (shared.isObject(arg1)) {
|
|
61
|
-
wrap$.value.scrollTo(arg1);
|
|
62
|
-
} else if (core.isNumber(arg1) && core.isNumber(arg2)) {
|
|
63
|
-
wrap$.value.scrollTo(arg1, arg2);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const setScrollTop = (value) => {
|
|
67
|
-
if (!core.isNumber(value)) {
|
|
68
|
-
error.debugWarn(SCOPE, "value must be a number");
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
wrap$.value.scrollTop = value;
|
|
72
|
-
};
|
|
73
|
-
const setScrollLeft = (value) => {
|
|
74
|
-
if (!core.isNumber(value)) {
|
|
75
|
-
error.debugWarn(SCOPE, "value must be a number");
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
wrap$.value.scrollLeft = value;
|
|
79
|
-
};
|
|
80
|
-
const update = () => {
|
|
81
|
-
if (!wrap$.value)
|
|
82
|
-
return;
|
|
83
|
-
const offsetHeight = wrap$.value.offsetHeight - util.GAP;
|
|
84
|
-
const offsetWidth = wrap$.value.offsetWidth - util.GAP;
|
|
85
|
-
const originalHeight = offsetHeight ** 2 / wrap$.value.scrollHeight;
|
|
86
|
-
const originalWidth = offsetWidth ** 2 / wrap$.value.scrollWidth;
|
|
87
|
-
const height = Math.max(originalHeight, props.minSize);
|
|
88
|
-
const width = Math.max(originalWidth, props.minSize);
|
|
89
|
-
ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
|
|
90
|
-
ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
|
|
91
|
-
sizeHeight.value = height + util.GAP < offsetHeight ? `${height}px` : "";
|
|
92
|
-
sizeWidth.value = width + util.GAP < offsetWidth ? `${width}px` : "";
|
|
93
|
-
};
|
|
94
|
-
vue.watch(() => props.noresize, (noresize) => {
|
|
95
|
-
if (noresize) {
|
|
96
|
-
stopResizeObserver == null ? void 0 : stopResizeObserver();
|
|
97
|
-
stopResizeListener == null ? void 0 : stopResizeListener();
|
|
98
|
-
} else {
|
|
99
|
-
;
|
|
100
|
-
({ stop: stopResizeObserver } = core.useResizeObserver(resize$, update));
|
|
101
|
-
stopResizeListener = core.useEventListener("resize", update);
|
|
102
|
-
}
|
|
103
|
-
}, { immediate: true });
|
|
104
|
-
vue.watch(() => [props.maxHeight, props.height], () => {
|
|
105
|
-
if (!props.native)
|
|
106
|
-
vue.nextTick(() => {
|
|
107
|
-
var _a;
|
|
108
|
-
update();
|
|
109
|
-
if (wrap$.value) {
|
|
110
|
-
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrap$.value);
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
vue.provide(scrollbar$1.scrollbarContextKey, vue.reactive({
|
|
115
|
-
scrollbarElement: scrollbar$,
|
|
116
|
-
wrapElement: wrap$
|
|
117
|
-
}));
|
|
118
|
-
vue.onMounted(() => {
|
|
119
|
-
if (!props.native)
|
|
120
|
-
vue.nextTick(() => {
|
|
121
|
-
update();
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
vue.onUpdated(() => update());
|
|
125
|
-
expose({
|
|
126
|
-
wrap$,
|
|
127
|
-
update,
|
|
128
|
-
scrollTo,
|
|
129
|
-
setScrollTop,
|
|
130
|
-
setScrollLeft,
|
|
131
|
-
handleScroll
|
|
132
|
-
});
|
|
133
|
-
return (_ctx, _cache) => {
|
|
134
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
135
|
-
ref_key: "scrollbar$",
|
|
136
|
-
ref: scrollbar$,
|
|
137
|
-
class: vue.normalizeClass(vue.unref(ns).b())
|
|
138
|
-
}, [
|
|
139
|
-
vue.createElementVNode("div", {
|
|
140
|
-
ref_key: "wrap$",
|
|
141
|
-
ref: wrap$,
|
|
142
|
-
class: vue.normalizeClass([
|
|
143
|
-
_ctx.wrapClass,
|
|
144
|
-
vue.unref(ns).e("wrap"),
|
|
145
|
-
{ [vue.unref(ns).em("wrap", "hidden-default")]: !_ctx.native }
|
|
146
|
-
]),
|
|
147
|
-
style: vue.normalizeStyle(vue.unref(style$1)),
|
|
148
|
-
onScroll: handleScroll
|
|
149
|
-
}, [
|
|
150
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
|
|
151
|
-
ref_key: "resize$",
|
|
152
|
-
ref: resize$,
|
|
153
|
-
class: vue.normalizeClass([vue.unref(ns).e("view"), _ctx.viewClass]),
|
|
154
|
-
style: vue.normalizeStyle(_ctx.viewStyle)
|
|
155
|
-
}, {
|
|
156
|
-
default: vue.withCtx(() => [
|
|
157
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
158
|
-
]),
|
|
159
|
-
_: 3
|
|
160
|
-
}, 8, ["class", "style"]))
|
|
161
|
-
], 38),
|
|
162
|
-
!_ctx.native ? (vue.openBlock(), vue.createBlock(bar["default"], {
|
|
163
|
-
key: 0,
|
|
164
|
-
ref_key: "barRef",
|
|
165
|
-
ref: barRef,
|
|
166
|
-
height: sizeHeight.value,
|
|
167
|
-
width: sizeWidth.value,
|
|
168
|
-
always: _ctx.always,
|
|
169
|
-
"ratio-x": ratioX.value,
|
|
170
|
-
"ratio-y": ratioY.value
|
|
171
|
-
}, null, 8, ["height", "width", "always", "ratio-x", "ratio-y"])) : vue.createCommentVNode("v-if", true)
|
|
172
|
-
], 2);
|
|
173
|
-
};
|
|
9
|
+
const scrollbarProps = runtime.buildProps({
|
|
10
|
+
height: {
|
|
11
|
+
type: [String, Number],
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
maxHeight: {
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
native: Boolean,
|
|
19
|
+
wrapStyle: {
|
|
20
|
+
type: runtime.definePropType([String, Object, Array]),
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
wrapClass: {
|
|
24
|
+
type: [String, Array],
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
viewClass: {
|
|
28
|
+
type: [String, Array],
|
|
29
|
+
default: ""
|
|
30
|
+
},
|
|
31
|
+
viewStyle: {
|
|
32
|
+
type: [String, Array, Object],
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
noresize: Boolean,
|
|
36
|
+
tag: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "div"
|
|
39
|
+
},
|
|
40
|
+
always: Boolean,
|
|
41
|
+
minSize: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 20
|
|
174
44
|
}
|
|
175
45
|
});
|
|
176
|
-
|
|
46
|
+
const scrollbarEmits = {
|
|
47
|
+
scroll: ({
|
|
48
|
+
scrollTop,
|
|
49
|
+
scrollLeft
|
|
50
|
+
}) => [scrollTop, scrollLeft].every(core.isNumber)
|
|
51
|
+
};
|
|
177
52
|
|
|
178
|
-
exports
|
|
53
|
+
exports.scrollbarEmits = scrollbarEmits;
|
|
54
|
+
exports.scrollbarProps = scrollbarProps;
|
|
179
55
|
//# sourceMappingURL=scrollbar2.js.map
|