element-plus 2.3.2 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +225 -193
- package/dist/index.full.min.js +14 -14
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +225 -194
- 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/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/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 +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/src/affix.mjs +1 -1
- package/es/components/avatar/src/avatar.mjs +1 -1
- package/es/components/avatar/src/avatar2.mjs +1 -1
- package/es/components/badge/src/badge2.mjs +1 -1
- package/es/components/button/index.d.ts +15 -0
- package/es/components/button/src/button.d.ts +4 -3
- package/es/components/button/src/button.mjs +5 -1
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +15 -0
- package/es/components/button/src/button2.mjs +34 -35
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/button/src/use-button.d.ts +11 -0
- package/es/components/button/src/use-button.mjs +12 -0
- package/es/components/button/src/use-button.mjs.map +1 -1
- package/es/components/calendar/index.d.ts +15 -0
- package/es/components/calendar/src/calendar.vue.d.ts +17 -2
- package/es/components/carousel/src/carousel.mjs +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag.mjs +1 -1
- package/es/components/checkbox/src/checkbox.mjs +1 -1
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs +1 -1
- package/es/components/col/src/col2.mjs +1 -1
- package/es/components/collapse/src/collapse.mjs +1 -1
- package/es/components/color-picker/index.d.ts +16 -0
- package/es/components/color-picker/src/color-picker.vue.d.ts +16 -0
- package/es/components/color-picker/src/color-picker2.mjs +8 -1
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/utils/draggable.mjs +1 -0
- package/es/components/color-picker/src/utils/draggable.mjs.map +1 -1
- package/es/components/countdown/src/countdown.mjs +1 -1
- package/es/components/countdown/src/utils.mjs +1 -1
- package/es/components/date-picker/index.d.ts +173 -172
- package/es/components/date-picker/index.mjs +1 -0
- package/es/components/date-picker/index.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +15 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +15 -0
- package/es/components/date-picker/src/date-picker.d.ts +86 -86
- package/es/components/date-picker/src/date-picker.mjs +1 -5
- package/es/components/date-picker/src/date-picker.mjs.map +1 -1
- package/es/components/date-picker/src/panel-utils.d.ts +30 -0
- package/es/components/date-picker/src/props/date-picker.d.ts +77 -0
- package/es/components/date-picker/src/props/date-picker.mjs +3 -0
- package/es/components/date-picker/src/props/date-picker.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/dropdown/index.d.ts +1 -0
- package/es/components/dropdown/index.mjs +1 -0
- package/es/components/dropdown/index.mjs.map +1 -1
- package/es/components/dropdown/src/instance.d.ts +2 -0
- package/es/components/dropdown/src/instance.mjs +2 -0
- package/es/components/dropdown/src/instance.mjs.map +1 -0
- package/es/components/form/src/form-item2.mjs +2 -1
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.mjs +1 -1
- package/es/components/image/src/image.mjs +1 -1
- package/es/components/image/src/image2.mjs +30 -28
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer.mjs +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +2 -1
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +1 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input/src/utils.mjs +1 -1
- package/es/components/input-number/src/input-number.mjs +1 -1
- package/es/components/input-number/src/input-number2.mjs +1 -2
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/loading/src/loading.mjs +1 -4
- package/es/components/loading/src/loading.mjs.map +1 -1
- package/es/components/loading/src/service.mjs +2 -2
- package/es/components/loading/src/service.mjs.map +1 -1
- package/es/components/loading/src/types.d.ts +24 -0
- package/es/components/menu/src/menu.mjs +2 -1
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.mjs +1 -1
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/message/src/message.d.ts +6 -0
- package/es/components/message/src/message.mjs +1 -1
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- package/es/components/message/src/method.mjs.map +1 -1
- package/es/components/message-box/src/messageBox.mjs +1 -1
- package/es/components/message-box/src/messageBox.mjs.map +1 -1
- package/es/components/notification/src/notification.d.ts +3 -0
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +1 -1
- package/es/components/notification/src/notify.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popconfirm/index.d.ts +15 -0
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +15 -0
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/src/utils.d.ts +1 -1
- package/es/components/popper/src/utils.mjs +1 -0
- package/es/components/popper/src/utils.mjs.map +1 -1
- package/es/components/progress/index.d.ts +8 -0
- package/es/components/progress/src/progress.d.ts +2 -0
- package/es/components/progress/src/progress.mjs +2 -0
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress.vue.d.ts +8 -0
- package/es/components/progress/src/progress2.mjs +3 -1
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/radio/src/radio.mjs +1 -1
- package/es/components/rate/src/rate.mjs +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +2 -1
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/useSelect.mjs +6 -3
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +1 -1
- package/es/components/slider/src/slider.mjs +1 -1
- package/es/components/space/src/space.mjs +1 -1
- package/es/components/space/src/use-space.mjs +1 -1
- package/es/components/statistic/src/statistic2.mjs +1 -1
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +1 -1
- package/es/components/steps/src/steps.mjs +1 -1
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/switch/src/switch.mjs +1 -1
- package/es/components/switch/src/switch2.mjs +1 -1
- package/es/components/table/src/composables/use-scrollbar.mjs +1 -1
- package/es/components/table/src/table-body/index.mjs +1 -1
- package/es/components/table/src/table-body/index.mjs.map +1 -1
- package/es/components/table/src/table-header/event-helper.mjs +1 -1
- package/es/components/table/src/table-header/event-helper.mjs.map +1 -1
- package/es/components/table/src/table-layout.mjs +1 -1
- package/es/components/table/src/table-layout.mjs.map +1 -1
- package/es/components/table/src/table.mjs +1 -1
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/util.mjs +1 -1
- package/es/components/table-v2/src/components/row.mjs +1 -1
- package/es/components/table-v2/src/composables/use-row.mjs +1 -1
- package/es/components/table-v2/src/composables/use-styles.mjs +1 -1
- package/es/components/table-v2/src/table-grid.mjs +1 -1
- package/es/components/tabs/src/tabs.mjs +1 -2
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/time-picker/src/common/props.d.ts +27 -9
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-picker/src/props/shared.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +6 -0
- package/es/components/time-picker/src/time-picker.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +2 -2
- package/es/components/transfer/index.d.ts +15 -0
- package/es/components/transfer/src/transfer.vue.d.ts +15 -0
- package/es/components/tree/src/tree.mjs +9 -5
- package/es/components/tree/src/tree.mjs.map +1 -1
- package/es/components/upload/index.d.ts +8 -0
- package/es/components/upload/src/upload-list.vue.d.ts +8 -0
- package/es/components/upload/src/upload.vue.d.ts +8 -0
- package/es/components/virtual-list/src/builders/build-grid.mjs +2 -1
- package/es/components/virtual-list/src/builders/build-grid.mjs.map +1 -1
- package/es/components/virtual-list/src/builders/build-list.mjs +2 -1
- package/es/components/virtual-list/src/builders/build-list.mjs.map +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-grid.mjs +1 -2
- package/es/components/virtual-list/src/components/dynamic-size-grid.mjs.map +1 -1
- package/es/components/virtual-list/src/components/fixed-size-grid.mjs +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/directives/click-outside/index.mjs.map +1 -1
- package/es/hooks/use-delayed-toggle/index.mjs +1 -1
- package/es/hooks/use-escape-keydown/index.mjs +2 -1
- package/es/hooks/use-escape-keydown/index.mjs.map +1 -1
- package/es/hooks/use-floating/index.mjs.map +1 -1
- package/es/hooks/use-id/index.mjs +1 -1
- package/es/hooks/use-id/index.mjs.map +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs.map +1 -1
- package/es/hooks/use-model-toggle/index.mjs +2 -1
- package/es/hooks/use-model-toggle/index.mjs.map +1 -1
- package/es/hooks/use-popper-container/index.mjs +2 -1
- package/es/hooks/use-popper-container/index.mjs.map +1 -1
- package/es/hooks/use-teleport/index.mjs +1 -1
- package/es/hooks/use-teleport/index.mjs.map +1 -1
- package/es/hooks/use-z-index/index.mjs +1 -1
- package/es/index.mjs +1 -0
- package/es/index.mjs.map +1 -1
- package/es/utils/browser.d.ts +2 -0
- package/es/utils/browser.mjs +1 -0
- package/es/utils/browser.mjs.map +1 -1
- package/es/utils/dom/position.mjs +1 -0
- package/es/utils/dom/position.mjs.map +1 -1
- package/es/utils/dom/scroll.mjs +2 -1
- package/es/utils/dom/scroll.mjs.map +1 -1
- package/es/utils/dom/style.mjs +3 -2
- package/es/utils/dom/style.mjs.map +1 -1
- package/es/utils/i18n.mjs +1 -1
- package/es/utils/i18n.mjs.map +1 -1
- package/es/utils/index.mjs +2 -2
- package/es/utils/raf.mjs +1 -0
- package/es/utils/raf.mjs.map +1 -1
- package/es/utils/types.d.ts +2 -1
- package/es/utils/types.mjs +3 -2
- package/es/utils/types.mjs.map +1 -1
- package/es/utils/vue/global-node.mjs +1 -0
- package/es/utils/vue/global-node.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/global.d.ts +3 -0
- package/lib/components/affix/src/affix.js +3 -3
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/avatar/src/avatar.js +2 -2
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +2 -2
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/badge/src/badge2.js +2 -2
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/button/index.d.ts +15 -0
- package/lib/components/button/src/button.d.ts +4 -3
- package/lib/components/button/src/button.js +4 -0
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +15 -0
- package/lib/components/button/src/button2.js +33 -34
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/button/src/use-button.d.ts +11 -0
- package/lib/components/button/src/use-button.js +12 -0
- package/lib/components/button/src/use-button.js.map +1 -1
- package/lib/components/calendar/index.d.ts +15 -0
- package/lib/components/calendar/src/calendar.vue.d.ts +17 -2
- package/lib/components/carousel/src/carousel.js +2 -2
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +2 -2
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/index.js.map +1 -1
- package/lib/components/check-tag/src/check-tag.js +3 -3
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.js +3 -3
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.js +2 -2
- package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
- package/lib/components/col/src/col2.js +3 -3
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/collapse/src/collapse.js +2 -2
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +16 -0
- package/lib/components/color-picker/src/color-picker.vue.d.ts +16 -0
- package/lib/components/color-picker/src/color-picker2.js +8 -1
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/utils/draggable.js +1 -0
- package/lib/components/color-picker/src/utils/draggable.js.map +1 -1
- package/lib/components/countdown/src/countdown.js +2 -2
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/utils.js +2 -2
- package/lib/components/countdown/src/utils.js.map +1 -1
- package/lib/components/date-picker/index.d.ts +173 -172
- package/lib/components/date-picker/index.js +4 -2
- package/lib/components/date-picker/index.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +15 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +15 -0
- package/lib/components/date-picker/src/date-picker.d.ts +86 -86
- package/lib/components/date-picker/src/date-picker.js +1 -5
- package/lib/components/date-picker/src/date-picker.js.map +1 -1
- package/lib/components/date-picker/src/panel-utils.d.ts +30 -0
- package/lib/components/date-picker/src/props/date-picker.d.ts +77 -0
- package/lib/components/date-picker/src/props/date-picker.js +3 -0
- package/lib/components/date-picker/src/props/date-picker.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +2 -2
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/dropdown/index.d.ts +1 -0
- package/lib/components/dropdown/index.js +1 -0
- package/lib/components/dropdown/index.js.map +1 -1
- package/lib/components/dropdown/src/instance.d.ts +2 -0
- package/lib/components/dropdown/src/instance.js +3 -0
- package/lib/components/dropdown/src/instance.js.map +1 -0
- package/lib/components/form/src/form-item2.js +2 -1
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.js +2 -2
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/image/src/image.js +2 -2
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +29 -27
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +2 -1
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input/src/utils.js +3 -3
- package/lib/components/input/src/utils.js.map +1 -1
- package/lib/components/input-number/src/input-number.js +4 -4
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +7 -8
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/loading/src/loading.js +1 -4
- package/lib/components/loading/src/loading.js.map +1 -1
- package/lib/components/loading/src/service.js +2 -2
- package/lib/components/loading/src/service.js.map +1 -1
- package/lib/components/loading/src/types.d.ts +24 -0
- package/lib/components/menu/src/menu.js +2 -1
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.js +1 -1
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/message/src/message.d.ts +6 -0
- package/lib/components/message/src/message.js +1 -1
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/method.js +2 -2
- package/lib/components/message/src/method.js.map +1 -1
- package/lib/components/message-box/src/messageBox.js +1 -1
- package/lib/components/message-box/src/messageBox.js.map +1 -1
- package/lib/components/notification/src/notification.d.ts +3 -0
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notify.js +1 -1
- package/lib/components/notification/src/notify.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +8 -8
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -0
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +15 -0
- package/lib/components/popover/src/popover.js +2 -2
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popper/src/utils.d.ts +1 -1
- package/lib/components/popper/src/utils.js +1 -0
- package/lib/components/popper/src/utils.js.map +1 -1
- package/lib/components/progress/index.d.ts +8 -0
- package/lib/components/progress/src/progress.d.ts +2 -0
- package/lib/components/progress/src/progress.js +2 -0
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress.vue.d.ts +8 -0
- package/lib/components/progress/src/progress2.js +3 -1
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/radio/src/radio.js +3 -3
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/rate/src/rate.js +3 -3
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +4 -3
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/useSelect.js +7 -4
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/slider/src/button.js +2 -2
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/slider.js +2 -2
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/space/src/space.js +3 -3
- package/lib/components/space/src/space.js.map +1 -1
- package/lib/components/space/src/use-space.js +2 -2
- package/lib/components/space/src/use-space.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +2 -2
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +2 -2
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/steps/src/steps.js +2 -2
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/switch/src/switch.js +4 -4
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +4 -4
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/composables/use-scrollbar.js +2 -2
- package/lib/components/table/src/composables/use-scrollbar.js.map +1 -1
- package/lib/components/table/src/table-body/index.js +1 -1
- package/lib/components/table/src/table-body/index.js.map +1 -1
- package/lib/components/table/src/table-header/event-helper.js +1 -1
- package/lib/components/table/src/table-header/event-helper.js.map +1 -1
- package/lib/components/table/src/table-layout.js +1 -1
- package/lib/components/table/src/table-layout.js.map +1 -1
- package/lib/components/table/src/table.js +1 -1
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/util.js +4 -4
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/table-v2/src/components/row.js +2 -2
- package/lib/components/table-v2/src/components/row.js.map +1 -1
- package/lib/components/table-v2/src/composables/use-row.js +2 -2
- package/lib/components/table-v2/src/composables/use-row.js.map +1 -1
- package/lib/components/table-v2/src/composables/use-styles.js +3 -3
- package/lib/components/table-v2/src/composables/use-styles.js.map +1 -1
- package/lib/components/table-v2/src/table-grid.js +2 -2
- package/lib/components/table-v2/src/table-grid.js.map +1 -1
- package/lib/components/tabs/src/tabs.js +2 -3
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/time-picker/src/common/props.d.ts +27 -9
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-picker/src/props/shared.js.map +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +6 -0
- package/lib/components/time-picker/src/time-picker.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +2 -2
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +1 -1
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/transfer/index.d.ts +15 -0
- package/lib/components/transfer/src/transfer.vue.d.ts +15 -0
- package/lib/components/tree/src/tree.js +8 -4
- package/lib/components/tree/src/tree.js.map +1 -1
- package/lib/components/upload/index.d.ts +8 -0
- package/lib/components/upload/src/upload-list.vue.d.ts +8 -0
- package/lib/components/upload/src/upload.vue.d.ts +8 -0
- package/lib/components/virtual-list/src/builders/build-grid.js +8 -7
- package/lib/components/virtual-list/src/builders/build-grid.js.map +1 -1
- package/lib/components/virtual-list/src/builders/build-list.js +6 -5
- package/lib/components/virtual-list/src/builders/build-list.js.map +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-grid.js +2 -3
- package/lib/components/virtual-list/src/components/dynamic-size-grid.js.map +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-grid.js +3 -3
- package/lib/components/virtual-list/src/components/fixed-size-grid.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/directives/click-outside/index.js.map +1 -1
- package/lib/hooks/use-delayed-toggle/index.js +2 -2
- package/lib/hooks/use-delayed-toggle/index.js.map +1 -1
- package/lib/hooks/use-escape-keydown/index.js +2 -1
- package/lib/hooks/use-escape-keydown/index.js.map +1 -1
- package/lib/hooks/use-floating/index.js.map +1 -1
- package/lib/hooks/use-id/index.js +1 -1
- package/lib/hooks/use-id/index.js.map +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js.map +1 -1
- package/lib/hooks/use-model-toggle/index.js +3 -2
- package/lib/hooks/use-model-toggle/index.js.map +1 -1
- package/lib/hooks/use-popper-container/index.js +2 -1
- package/lib/hooks/use-popper-container/index.js.map +1 -1
- package/lib/hooks/use-teleport/index.js +1 -1
- package/lib/hooks/use-teleport/index.js.map +1 -1
- package/lib/hooks/use-z-index/index.js +2 -2
- package/lib/hooks/use-z-index/index.js.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/utils/browser.d.ts +2 -0
- package/lib/utils/browser.js +8 -0
- package/lib/utils/browser.js.map +1 -1
- package/lib/utils/dom/position.js +1 -0
- package/lib/utils/dom/position.js.map +1 -1
- package/lib/utils/dom/scroll.js +2 -1
- package/lib/utils/dom/scroll.js.map +1 -1
- package/lib/utils/dom/style.js +3 -2
- package/lib/utils/dom/style.js.map +1 -1
- package/lib/utils/i18n.js +1 -1
- package/lib/utils/i18n.js.map +1 -1
- package/lib/utils/index.js +11 -9
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/raf.js +1 -0
- package/lib/utils/raf.js.map +1 -1
- package/lib/utils/types.d.ts +2 -1
- package/lib/utils/types.js +4 -9
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/vue/global-node.js +1 -0
- package/lib/utils/vue/global-node.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-progress.css +1 -1
- package/theme-chalk/el-transfer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/image.scss +6 -6
- package/theme-chalk/src/menu.scss +1 -0
- package/theme-chalk/src/progress.scss +18 -0
- package/theme-chalk/src/transfer.scss +1 -2
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.mjs","sources":["../../../../../packages/utils/dom/position.ts"],"sourcesContent":["import { isClient } from '
|
|
1
|
+
{"version":3,"file":"position.mjs","sources":["../../../../../packages/utils/dom/position.ts"],"sourcesContent":["import { isClient } from '../browser'\n\nexport const isInContainer = (\n el?: Element,\n container?: Element | Window\n): boolean => {\n if (!isClient || !el || !container) return false\n\n const elRect = el.getBoundingClientRect()\n\n let containerRect: Pick<DOMRect, 'top' | 'bottom' | 'left' | 'right'>\n if (container instanceof Element) {\n containerRect = container.getBoundingClientRect()\n } else {\n containerRect = {\n top: 0,\n right: window.innerWidth,\n bottom: window.innerHeight,\n left: 0,\n }\n }\n return (\n elRect.top < containerRect.bottom &&\n elRect.bottom > containerRect.top &&\n elRect.right > containerRect.left &&\n elRect.left < containerRect.right\n )\n}\n\nexport const getOffsetTop = (el: HTMLElement) => {\n let offset = 0\n let parent = el\n\n while (parent) {\n offset += parent.offsetTop\n parent = parent.offsetParent as HTMLElement\n }\n\n return offset\n}\n\nexport const getOffsetTopDistance = (\n el: HTMLElement,\n containerEl: HTMLElement\n) => {\n return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl))\n}\n\nexport const getClientXY = (event: MouseEvent | TouchEvent) => {\n let clientX: number\n let clientY: number\n if (event.type === 'touchend') {\n clientY = (event as TouchEvent).changedTouches[0].clientY\n clientX = (event as TouchEvent).changedTouches[0].clientX\n } else if (event.type.startsWith('touch')) {\n clientY = (event as TouchEvent).touches[0].clientY\n clientX = (event as TouchEvent).touches[0].clientX\n } else {\n clientY = (event as MouseEvent).clientY\n clientX = (event as MouseEvent).clientX\n }\n return {\n clientX,\n clientY,\n }\n}\n"],"names":[],"mappings":";;;AACY,MAAC,aAAa,GAAG,CAAC,EAAE,EAAE,SAAS,KAAK;AAChD,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,IAAI,CAAC,SAAS;AACpC,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,MAAM,MAAM,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;AAC5C,EAAE,IAAI,aAAa,CAAC;AACpB,EAAE,IAAI,SAAS,YAAY,OAAO,EAAE;AACpC,IAAI,aAAa,GAAG,SAAS,CAAC,qBAAqB,EAAE,CAAC;AACtD,GAAG,MAAM;AACT,IAAI,aAAa,GAAG;AACpB,MAAM,GAAG,EAAE,CAAC;AACZ,MAAM,KAAK,EAAE,MAAM,CAAC,UAAU;AAC9B,MAAM,MAAM,EAAE,MAAM,CAAC,WAAW;AAChC,MAAM,IAAI,EAAE,CAAC;A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AC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AACvC,GAAG,MAAM;AACT,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC5B,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC5B,GAAG;AACH,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;"}
|
package/es/utils/dom/scroll.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.mjs","sources":["../../../../../packages/utils/dom/scroll.ts"],"sourcesContent":["import { isClient } from '
|
|
1
|
+
{"version":3,"file":"scroll.mjs","sources":["../../../../../packages/utils/dom/scroll.ts"],"sourcesContent":["import { isClient } from '../browser'\nimport { getStyle } from './style'\n\nexport const isScroll = (el: HTMLElement, isVertical?: boolean): boolean => {\n if (!isClient) return false\n\n const key = (\n {\n undefined: 'overflow',\n true: 'overflow-y',\n false: 'overflow-x',\n } as const\n )[String(isVertical)]!\n const overflow = getStyle(el, key)\n return ['scroll', 'auto', 'overlay'].some((s) => overflow.includes(s))\n}\n\nexport const getScrollContainer = (\n el: HTMLElement,\n isVertical?: boolean\n): Window | HTMLElement | undefined => {\n if (!isClient) return\n\n let parent: HTMLElement = el\n while (parent) {\n if ([window, document, document.documentElement].includes(parent))\n return window\n\n if (isScroll(parent, isVertical)) return parent\n\n parent = parent.parentNode as HTMLElement\n }\n\n return parent\n}\n\nlet scrollBarWidth: number\nexport const getScrollBarWidth = (namespace: string): number => {\n if (!isClient) return 0\n if (scrollBarWidth !== undefined) return scrollBarWidth\n\n const outer = document.createElement('div')\n outer.className = `${namespace}-scrollbar__wrap`\n outer.style.visibility = 'hidden'\n outer.style.width = '100px'\n outer.style.position = 'absolute'\n outer.style.top = '-9999px'\n document.body.appendChild(outer)\n\n const widthNoScroll = outer.offsetWidth\n outer.style.overflow = 'scroll'\n\n const inner = document.createElement('div')\n inner.style.width = '100%'\n outer.appendChild(inner)\n\n const widthWithScroll = inner.offsetWidth\n outer.parentNode?.removeChild(outer)\n scrollBarWidth = widthNoScroll - widthWithScroll\n\n return scrollBarWidth\n}\n\n/**\n * Scroll with in the container element, positioning the **selected** element at the top\n * of the container\n */\nexport function scrollIntoView(\n container: HTMLElement,\n selected: HTMLElement\n): void {\n if (!isClient) return\n\n if (!selected) {\n container.scrollTop = 0\n return\n }\n\n const offsetParents: HTMLElement[] = []\n let pointer = selected.offsetParent\n while (\n pointer !== null &&\n container !== pointer &&\n container.contains(pointer)\n ) {\n offsetParents.push(pointer as HTMLElement)\n pointer = (pointer as HTMLElement).offsetParent\n }\n const top =\n selected.offsetTop +\n offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0)\n const bottom = top + selected.offsetHeight\n const viewRectTop = container.scrollTop\n const viewRectBottom = viewRectTop + container.clientHeight\n\n if (top < viewRectTop) {\n container.scrollTop = top\n } else if (bottom > viewRectBottom) {\n container.scrollTop = bottom - container.clientHeight\n }\n}\n"],"names":[],"mappings":";;;;AAEY,MAAC,QAAQ,GAAG,CAAC,EAAE,EAAE,UAAU,KAAK;AAC5C,EAAE,IAAI,CAAC,QAAQ;AACf,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,MAAM,GAAG,GAAG;AACd,IAAI,SAAS,EAAE,UAAU;AACzB,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,KAAK,EAAE,YAAY;AACvB,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;AACxB,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AACrC,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,EAAE;AACU,MAAC,kBAAkB,GAAG,CAAC,EAAE,EAAE,UAAU,KAAK;AACtD,EAAE,I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AAC;AAC7C,EAAE,MAAM,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC;AAC1C,EAAE,MAAM,cAAc,GAAG,WAAW,GAAG,SAAS,CAAC,YAAY,CAAC;AAC9D,EAAE,IAAI,GAAG,GAAG,WAAW,EAAE;AACzB,IAAI,SAAS,CAAC,SAAS,GAAG,GAAG,CAAC;AAC9B,GAAG,MAAM,IAAI,MAAM,GAAG,cAAc,EAAE;AACtC,IAAI,SAAS,CAAC,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC;AAC1D,GAAG;AACH;;;;"}
|
package/es/utils/dom/style.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { isNumber, isStringNumber } from '../types.mjs';
|
|
2
|
+
import '../browser.mjs';
|
|
3
3
|
import '../strings.mjs';
|
|
4
4
|
import { entriesOf, keysOf } from '../objects.mjs';
|
|
5
5
|
import { debugWarn } from '../error.mjs';
|
|
6
|
+
import { isClient } from '@vueuse/core';
|
|
6
7
|
import { camelize, isObject, isString } from '@vue/shared';
|
|
7
8
|
|
|
8
9
|
const SCOPE = "utils/dom/style";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","sources":["../../../../../packages/utils/dom/style.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"style.mjs","sources":["../../../../../packages/utils/dom/style.ts"],"sourcesContent":["import { isNumber, isObject, isString, isStringNumber } from '../types'\nimport { isClient } from '../browser'\nimport { camelize } from '../strings'\nimport { entriesOf, keysOf } from '../objects'\nimport { debugWarn } from '../error'\nimport type { CSSProperties } from 'vue'\n\nconst SCOPE = 'utils/dom/style'\n\nexport const classNameToArray = (cls = '') =>\n cls.split(' ').filter((item) => !!item.trim())\n\nexport const hasClass = (el: Element, cls: string): boolean => {\n if (!el || !cls) return false\n if (cls.includes(' ')) throw new Error('className should not contain space.')\n return el.classList.contains(cls)\n}\n\nexport const addClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.add(...classNameToArray(cls))\n}\n\nexport const removeClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.remove(...classNameToArray(cls))\n}\n\nexport const getStyle = (\n element: HTMLElement,\n styleName: keyof CSSProperties\n): string => {\n if (!isClient || !element || !styleName) return ''\n\n let key = camelize(styleName)\n if (key === 'float') key = 'cssFloat'\n try {\n const style = (element.style as any)[key]\n if (style) return style\n const computed: any = document.defaultView?.getComputedStyle(element, '')\n return computed ? computed[key] : ''\n } catch {\n return (element.style as any)[key]\n }\n}\n\nexport const setStyle = (\n element: HTMLElement,\n styleName: CSSProperties | keyof CSSProperties,\n value?: string | number\n) => {\n if (!element || !styleName) return\n\n if (isObject(styleName)) {\n entriesOf(styleName).forEach(([prop, value]) =>\n setStyle(element, prop, value)\n )\n } else {\n const key: any = camelize(styleName)\n element.style[key] = value as any\n }\n}\n\nexport const removeStyle = (\n element: HTMLElement,\n style: CSSProperties | keyof CSSProperties\n) => {\n if (!element || !style) return\n\n if (isObject(style)) {\n keysOf(style).forEach((prop) => removeStyle(element, prop))\n } else {\n setStyle(element, style, '')\n }\n}\n\nexport function addUnit(value?: string | number, defaultUnit = 'px') {\n if (!value) return ''\n if (isNumber(value) || isStringNumber(value)) {\n return `${value}${defaultUnit}`\n } else if (isString(value)) {\n return value\n }\n debugWarn(SCOPE, 'binding value must be a string or number')\n}\n"],"names":[],"mappings":";;;;;;;;AAKA,MAAM,KAAK,GAAG,iBAAiB,CAAC;AACpB,MAAC,gBAAgB,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE;AACjF,MAAC,QAAQ,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK;AACrC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG;AACjB,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AG,IAAI,EAAE;AACnD,EAAE,IAAI,CAAC,KAAK;AACZ,IAAI,OAAO,EAAE,CAAC;AACd,EAAE,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE;AAChD,IAAI,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AACpC,GAAG,MAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC9B,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG;AACH,EAAE,SAAS,CAAC,KAAK,EAAE,0CAA0C,CAAC,CAAC;AAC/D;;;;"}
|
package/es/utils/i18n.mjs
CHANGED
package/es/utils/i18n.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.mjs","sources":["../../../../packages/utils/i18n.ts"],"sourcesContent":["export const isKorean = (text: string) =>\n /([
|
|
1
|
+
{"version":3,"file":"i18n.mjs","sources":["../../../../packages/utils/i18n.ts"],"sourcesContent":["export const isKorean = (text: string) =>\n /([\\uAC00-\\uD7AF\\u3130-\\u318F])+/gi.test(text)\n"],"names":[],"mappings":"AAAY,MAAC,QAAQ,GAAG,CAAC,IAAI,KAAK,mCAAmC,CAAC,IAAI,CAAC,IAAI;;;;"}
|
package/es/utils/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ export { entriesOf, getProp, keysOf } from './objects.mjs';
|
|
|
9
9
|
export { cAF, rAF } from './raf.mjs';
|
|
10
10
|
export { generateId, getRandomInt } from './rand.mjs';
|
|
11
11
|
export { capitalize, escapeStringRegexp } from './strings.mjs';
|
|
12
|
-
export { isElement, isEmpty, isPropAbsent, isStringNumber, isUndefined } from './types.mjs';
|
|
12
|
+
export { isBoolean, isElement, isEmpty, isNumber, isPropAbsent, isStringNumber, isUndefined } from './types.mjs';
|
|
13
13
|
export { mutable } from './typescript.mjs';
|
|
14
14
|
export { attemptFocus, focusNode, getSibling, isFocusable, isLeaf, isVisible, obtainAllFocusableElements, triggerEvent } from './dom/aria.mjs';
|
|
15
15
|
export { composeEventHandlers, whenMouse } from './dom/event.mjs';
|
|
@@ -25,7 +25,7 @@ export { getComponentSize } from './vue/size.mjs';
|
|
|
25
25
|
export { isValidComponentSize, isValidDatePickType } from './vue/validator.mjs';
|
|
26
26
|
export { PatchFlags, ensureOnlyChild, flattedChildren, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from './vue/vnode.mjs';
|
|
27
27
|
export { castArray as ensureArray } from 'lodash-unified';
|
|
28
|
+
export { isClient, isIOS } from '@vueuse/core';
|
|
28
29
|
export { NOOP, camelize, hasOwn, hyphenate, isArray, isDate, isFunction, isObject, isPromise, isString, isSymbol, hyphenate as kebabCase } from '@vue/shared';
|
|
29
|
-
export { isBoolean, isNumber } from '@vueuse/core';
|
|
30
30
|
export { isVNode } from 'vue';
|
|
31
31
|
//# sourceMappingURL=index.mjs.map
|
package/es/utils/raf.mjs
CHANGED
package/es/utils/raf.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raf.mjs","sources":["../../../../packages/utils/raf.ts"],"sourcesContent":["import { isClient } from '
|
|
1
|
+
{"version":3,"file":"raf.mjs","sources":["../../../../packages/utils/raf.ts"],"sourcesContent":["import { isClient } from './browser'\n\nexport const rAF = (fn: () => void) =>\n isClient\n ? window.requestAnimationFrame(fn)\n : (setTimeout(fn, 16) as unknown as number)\n\nexport const cAF = (handle: number) =>\n isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle)\n"],"names":[],"mappings":";;;AACY,MAAC,GAAG,GAAG,CAAC,EAAE,KAAK,QAAQ,GAAG,MAAM,CAAC,qBAAqB,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE;AAChF,MAAC,GAAG,GAAG,CAAC,MAAM,KAAK,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM;;;;"}
|
package/es/utils/types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { isArray, isFunction, isObject, isString, isDate, isPromise, isSymbol, } from '@vue/shared';
|
|
2
|
-
export { isBoolean, isNumber } from '@vueuse/core';
|
|
3
2
|
export { isVNode } from 'vue';
|
|
4
3
|
export declare const isUndefined: (val: any) => val is undefined;
|
|
4
|
+
export declare const isBoolean: (val: any) => val is boolean;
|
|
5
|
+
export declare const isNumber: (val: any) => val is number;
|
|
5
6
|
export declare const isEmpty: (val: unknown) => boolean;
|
|
6
7
|
export declare const isElement: (e: unknown) => e is Element;
|
|
7
8
|
export declare const isPropAbsent: (prop: unknown) => prop is null | undefined;
|
package/es/utils/types.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { isArray, isObject, isString } from '@vue/shared';
|
|
2
2
|
export { isArray, isDate, isFunction, isObject, isPromise, isString, isSymbol } from '@vue/shared';
|
|
3
3
|
import { isNil } from 'lodash-unified';
|
|
4
|
-
export { isBoolean, isNumber } from '@vueuse/core';
|
|
5
4
|
export { isVNode } from 'vue';
|
|
6
5
|
|
|
7
6
|
const isUndefined = (val) => val === void 0;
|
|
7
|
+
const isBoolean = (val) => typeof val === "boolean";
|
|
8
|
+
const isNumber = (val) => typeof val === "number";
|
|
8
9
|
const isEmpty = (val) => !val && val !== 0 || isArray(val) && val.length === 0 || isObject(val) && !Object.keys(val).length;
|
|
9
10
|
const isElement = (e) => {
|
|
10
11
|
if (typeof Element === "undefined")
|
|
@@ -21,5 +22,5 @@ const isStringNumber = (val) => {
|
|
|
21
22
|
return !Number.isNaN(Number(val));
|
|
22
23
|
};
|
|
23
24
|
|
|
24
|
-
export { isElement, isEmpty, isPropAbsent, isStringNumber, isUndefined };
|
|
25
|
+
export { isBoolean, isElement, isEmpty, isNumber, isPropAbsent, isStringNumber, isUndefined };
|
|
25
26
|
//# sourceMappingURL=types.mjs.map
|
package/es/utils/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../../packages/utils/types.ts"],"sourcesContent":["import { isArray, isObject, isString } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\n\nexport {\n isArray,\n isFunction,\n isObject,\n isString,\n isDate,\n isPromise,\n isSymbol,\n} from '@vue/shared'\nexport {
|
|
1
|
+
{"version":3,"file":"types.mjs","sources":["../../../../packages/utils/types.ts"],"sourcesContent":["import { isArray, isObject, isString } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\n\nexport {\n isArray,\n isFunction,\n isObject,\n isString,\n isDate,\n isPromise,\n isSymbol,\n} from '@vue/shared'\nexport { isVNode } from 'vue'\n\nexport const isUndefined = (val: any): val is undefined => val === undefined\nexport const isBoolean = (val: any): val is boolean => typeof val === 'boolean'\nexport const isNumber = (val: any): val is number => typeof val === 'number'\n\nexport const isEmpty = (val: unknown) =>\n (!val && val !== 0) ||\n (isArray(val) && val.length === 0) ||\n (isObject(val) && !Object.keys(val).length)\n\nexport const isElement = (e: unknown): e is Element => {\n if (typeof Element === 'undefined') return false\n return e instanceof Element\n}\n\nexport const isPropAbsent = (prop: unknown): prop is null | undefined => {\n return isNil(prop)\n}\n\nexport const isStringNumber = (val: string): boolean => {\n if (!isString(val)) {\n return false\n }\n return !Number.isNaN(Number(val))\n}\n"],"names":[],"mappings":";;;;;AAYY,MAAC,WAAW,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,KAAK,EAAE;AACvC,MAAC,SAAS,GAAG,CAAC,GAAG,KAAK,OAAO,GAAG,KAAK,UAAU;AAC/C,MAAC,QAAQ,GAAG,CAAC,GAAG,KAAK,OAAO,GAAG,KAAK,SAAS;AAC7C,MAAC,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO;AACvH,MAAC,SAAS,GAAG,CAAC,CAAC,KAAK;AAChC,EAAE,IAAI,OAAO,OAAO,KAAK,WAAW;AACpC,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,OAAO,CAAC,YAAY,OAAO,CAAC;AAC9B,EAAE;AACU,MAAC,YAAY,GAAG,CAAC,IAAI,KAAK;AACtC,EAAE,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;AACrB,EAAE;AACU,MAAC,cAAc,GAAG,CAAC,GAAG,KAAK;AACvC,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACtB,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG;AACH,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACpC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-node.mjs","sources":["../../../../../packages/utils/vue/global-node.ts"],"sourcesContent":["import { isClient } from '
|
|
1
|
+
{"version":3,"file":"global-node.mjs","sources":["../../../../../packages/utils/vue/global-node.ts"],"sourcesContent":["import { isClient } from '../browser'\n\nconst globalNodes: HTMLElement[] = []\nlet target: HTMLElement = !isClient ? (undefined as any) : document.body\n\nexport function createGlobalNode(id?: string) {\n const el = document.createElement('div')\n if (id !== undefined) {\n el.setAttribute('id', id)\n }\n\n target.appendChild(el)\n globalNodes.push(el)\n\n return el\n}\n\nexport function removeGlobalNode(el: HTMLElement) {\n globalNodes.splice(globalNodes.indexOf(el), 1)\n el.remove()\n}\n\nexport function changeGlobalNodesTarget(el: HTMLElement) {\n if (el === target) return\n\n target = el\n globalNodes.forEach((el) => {\n if (el.contains(target) === false) {\n target.appendChild(el)\n }\n })\n}\n"],"names":[],"mappings":";;;AACA,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,IAAI,MAAM,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC;AACzC,SAAS,gBAAgB,CAAC,EAAE,EAAE;AACrC,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC3C,EAAE,IAAI,EAAE,KAAK,KAAK,CAAC,EAAE;AACrB,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC9B,GAAG;AACH,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;AACzB,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvB,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC;AACM,SAAS,gBAAgB,CAAC,EAAE,EAAE;AACrC,EAAE,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACjD,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC;AACd,CAAC;AACM,SAAS,uBAAuB,CAAC,EAAE,EAAE;AAC5C,EAAE,IAAI,EAAE,KAAK,MAAM;AACnB,IAAI,OAAO;AACX,EAAE,MAAM,GAAG,EAAE,CAAC;AACd,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC/B,IAAI,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE;AACxC,MAAM,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,CAAC,CAAC;AACL;;;;"}
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.3.
|
|
1
|
+
export declare const version = "2.3.4";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.3.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.3.4'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
package/global.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ declare module '@vue/runtime-core' {
|
|
|
75
75
|
ElTableColumn: typeof import('element-plus')['ElTableColumn']
|
|
76
76
|
ElTabs: typeof import('element-plus')['ElTabs']
|
|
77
77
|
ElTag: typeof import('element-plus')['ElTag']
|
|
78
|
+
ElText: typeof import('element-plus')['ElText']
|
|
78
79
|
ElTimePicker: typeof import('element-plus')['ElTimePicker']
|
|
79
80
|
ElTimeSelect: typeof import('element-plus')['ElTimeSelect']
|
|
80
81
|
ElTimeline: typeof import('element-plus')['ElTimeline']
|
|
@@ -83,10 +84,12 @@ declare module '@vue/runtime-core' {
|
|
|
83
84
|
ElTransfer: typeof import('element-plus')['ElTransfer']
|
|
84
85
|
ElTree: typeof import('element-plus')['ElTree']
|
|
85
86
|
ElTreeV2: typeof import('element-plus')['ElTreeV2']
|
|
87
|
+
ElTreeSelect: typeof import('element-plus')['ElTreeSelect']
|
|
86
88
|
ElUpload: typeof import('element-plus')['ElUpload']
|
|
87
89
|
ElSpace: typeof import('element-plus')['ElSpace']
|
|
88
90
|
ElSkeleton: typeof import('element-plus')['ElSkeleton']
|
|
89
91
|
ElSkeletonItem: typeof import('element-plus')['ElSkeletonItem']
|
|
92
|
+
ElStatistic: typeof import('element-plus')['ElStatistic']
|
|
90
93
|
ElCheckTag: typeof import('element-plus')['ElCheckTag']
|
|
91
94
|
ElDescriptions: typeof import('element-plus')['ElDescriptions']
|
|
92
95
|
ElDescriptionsItem: typeof import('element-plus')['ElDescriptionsItem']
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
require('../../../utils/index.js');
|
|
6
6
|
require('../../../constants/index.js');
|
|
7
7
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
8
|
-
var
|
|
8
|
+
var types = require('../../../utils/types.js');
|
|
9
9
|
var event = require('../../../constants/event.js');
|
|
10
10
|
|
|
11
11
|
const affixProps = runtime.buildProps({
|
|
@@ -28,8 +28,8 @@ const affixProps = runtime.buildProps({
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
const affixEmits = {
|
|
31
|
-
scroll: ({ scrollTop, fixed }) =>
|
|
32
|
-
[event.CHANGE_EVENT]: (fixed) =>
|
|
31
|
+
scroll: ({ scrollTop, fixed }) => types.isNumber(scrollTop) && types.isBoolean(fixed),
|
|
32
|
+
[event.CHANGE_EVENT]: (fixed) => types.isBoolean(fixed)
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
exports.affixEmits = affixEmits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix.js","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n /**\n * @description affix element zIndex value\n * */\n zIndex: {\n type: definePropType<ZIndexProperty>([Number, String]),\n default: 100,\n },\n /**\n * @description target container. (CSS selector)\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description offset distance\n * */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description position of affix\n * */\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix>\n"],"names":["buildProps","definePropType","isNumber","isBoolean","CHANGE_EVENT"],"mappings":";;;;;;;;;;AAOY,MAAC,UAAU,GAAGA,kBAAU,CAAC;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAKC,
|
|
1
|
+
{"version":3,"file":"affix.js","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n /**\n * @description affix element zIndex value\n * */\n zIndex: {\n type: definePropType<ZIndexProperty>([Number, String]),\n default: 100,\n },\n /**\n * @description target container. (CSS selector)\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description offset distance\n * */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description position of affix\n * */\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix>\n"],"names":["buildProps","definePropType","isNumber","isBoolean","CHANGE_EVENT"],"mappings":";;;;;;;;;;AAOY,MAAC,UAAU,GAAGA,kBAAU,CAAC;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAKC,cAAQ,CAAC,SAAS,CAAC,IAAIC,eAAS,CAAC,KAAK,CAAC;AAC3E,EAAE,CAACC,kBAAY,GAAG,CAAC,KAAK,KAAKD,eAAS,CAAC,KAAK,CAAC;AAC7C;;;;;"}
|
|
@@ -6,7 +6,7 @@ require('../../../utils/index.js');
|
|
|
6
6
|
require('../../../constants/index.js');
|
|
7
7
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
8
8
|
var size = require('../../../constants/size.js');
|
|
9
|
-
var
|
|
9
|
+
var types = require('../../../utils/types.js');
|
|
10
10
|
var icon = require('../../../utils/vue/icon.js');
|
|
11
11
|
|
|
12
12
|
const avatarProps = runtime.buildProps({
|
|
@@ -14,7 +14,7 @@ const avatarProps = runtime.buildProps({
|
|
|
14
14
|
type: [Number, String],
|
|
15
15
|
values: size.componentSizes,
|
|
16
16
|
default: "",
|
|
17
|
-
validator: (val) =>
|
|
17
|
+
validator: (val) => types.isNumber(val)
|
|
18
18
|
},
|
|
19
19
|
shape: {
|
|
20
20
|
type: String,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","sources":["../../../../../../packages/components/avatar/src/avatar.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isNumber,\n} from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ObjectFitProperty } from 'csstype'\n\nexport const avatarProps = buildProps({\n /**\n * @description avatar size.\n */\n size: {\n type: [Number, String],\n values: componentSizes,\n default: '',\n validator: (val: unknown): val is number => isNumber(val),\n },\n /**\n * @description avatar shape.\n */\n shape: {\n type: String,\n values: ['circle', 'square'],\n default: 'circle',\n },\n /**\n * @description representation type to icon, more info on icon component.\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description the source of the image for an image avatar.\n */\n src: {\n type: String,\n default: '',\n },\n /**\n * @description native attribute `alt` of image avatar.\n */\n alt: String,\n /**\n * @description native attribute srcset of image avatar.\n */\n srcSet: String,\n /**\n * @description set how the image fit its container for an image avatar.\n */\n fit: {\n type: definePropType<ObjectFitProperty>(String),\n default: 'cover',\n },\n} as const)\nexport type AvatarProps = ExtractPropTypes<typeof avatarProps>\n\nexport const avatarEmits = {\n error: (evt: Event) => evt instanceof Event,\n}\nexport type AvatarEmits = typeof avatarEmits\n"],"names":["buildProps","componentSizes","isNumber","iconPropType","definePropType"],"mappings":";;;;;;;;;;;AAOY,MAAC,WAAW,GAAGA,kBAAU,CAAC;AACtC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,MAAM,EAAEC,mBAAc;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,SAAS,EAAE,CAAC,GAAG,KAAKC,
|
|
1
|
+
{"version":3,"file":"avatar.js","sources":["../../../../../../packages/components/avatar/src/avatar.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isNumber,\n} from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ObjectFitProperty } from 'csstype'\n\nexport const avatarProps = buildProps({\n /**\n * @description avatar size.\n */\n size: {\n type: [Number, String],\n values: componentSizes,\n default: '',\n validator: (val: unknown): val is number => isNumber(val),\n },\n /**\n * @description avatar shape.\n */\n shape: {\n type: String,\n values: ['circle', 'square'],\n default: 'circle',\n },\n /**\n * @description representation type to icon, more info on icon component.\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description the source of the image for an image avatar.\n */\n src: {\n type: String,\n default: '',\n },\n /**\n * @description native attribute `alt` of image avatar.\n */\n alt: String,\n /**\n * @description native attribute srcset of image avatar.\n */\n srcSet: String,\n /**\n * @description set how the image fit its container for an image avatar.\n */\n fit: {\n type: definePropType<ObjectFitProperty>(String),\n default: 'cover',\n },\n} as const)\nexport type AvatarProps = ExtractPropTypes<typeof avatarProps>\n\nexport const avatarEmits = {\n error: (evt: Event) => evt instanceof Event,\n}\nexport type AvatarEmits = typeof avatarEmits\n"],"names":["buildProps","componentSizes","isNumber","iconPropType","definePropType"],"mappings":";;;;;;;;;;;AAOY,MAAC,WAAW,GAAGA,kBAAU,CAAC;AACtC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,MAAM,EAAEC,mBAAc;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,SAAS,EAAE,CAAC,GAAG,KAAKC,cAAQ,CAAC,GAAG,CAAC;AACrC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;AAChC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,GAAG,EAAE,MAAM;AACb,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,KAAK;AACtC;;;;;"}
|
|
@@ -10,7 +10,7 @@ var avatar = require('./avatar.js');
|
|
|
10
10
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
11
|
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
12
|
var shared = require('@vue/shared');
|
|
13
|
-
var
|
|
13
|
+
var types = require('../../../utils/types.js');
|
|
14
14
|
var style = require('../../../utils/dom/style.js');
|
|
15
15
|
|
|
16
16
|
const _hoisted_1 = ["src", "alt", "srcset"];
|
|
@@ -38,7 +38,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
38
38
|
});
|
|
39
39
|
const sizeStyle = vue.computed(() => {
|
|
40
40
|
const { size } = props;
|
|
41
|
-
return
|
|
41
|
+
return types.isNumber(size) ? ns.cssVarBlock({
|
|
42
42
|
size: style.addUnit(size) || ""
|
|
43
43
|
}) : void 0;
|
|
44
44
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar2.js","sources":["../../../../../../packages/components/avatar/src/avatar.vue"],"sourcesContent":["<template>\n <span :class=\"avatarClass\" :style=\"sizeStyle\">\n <img\n v-if=\"(src || srcSet) && !hasLoadError\"\n :src=\"src\"\n :alt=\"alt\"\n :srcset=\"srcSet\"\n :style=\"fitStyle\"\n @error=\"handleError\"\n />\n <el-icon v-else-if=\"icon\">\n <component :is=\"icon\" />\n </el-icon>\n <slot v-else />\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { addUnit, isNumber, isString } from '@element-plus/utils'\nimport { avatarEmits, avatarProps } from './avatar'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElAvatar',\n})\n\nconst props = defineProps(avatarProps)\nconst emit = defineEmits(avatarEmits)\n\nconst ns = useNamespace('avatar')\n\nconst hasLoadError = ref(false)\n\nconst avatarClass = computed(() => {\n const { size, icon, shape } = props\n const classList = [ns.b()]\n if (isString(size)) classList.push(ns.m(size))\n if (icon) classList.push(ns.m('icon'))\n if (shape) classList.push(ns.m(shape))\n return classList\n})\n\nconst sizeStyle = computed(() => {\n const { size } = props\n return isNumber(size)\n ? (ns.cssVarBlock({\n size: addUnit(size) || '',\n }) as CSSProperties)\n : undefined\n})\n\nconst fitStyle = computed<CSSProperties>(() => ({\n objectFit: props.fit,\n}))\n\n// need reset hasLoadError to false if src changed\nwatch(\n () => props.src,\n () => (hasLoadError.value = false)\n)\n\nfunction handleError(e: Event) {\n hasLoadError.value = true\n emit('error', e)\n}\n</script>\n"],"names":["useNamespace","ref","computed","isString","isNumber","addUnit","watch"],"mappings":";;;;;;;;;;;;;;;;uCA0Bc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,YAAA,GAAeC,QAAI,KAAK,CAAA,CAAA;AAE9B,IAAM,MAAA,WAAA,GAAcC,aAAS,MAAM;AACjC,MAAM,MAAA,EAAE,IAAM,EAAA,IAAA,EAAM,KAAU,EAAA,GAAA,KAAA,CAAA;AAC9B,MAAA,MAAM,SAAY,GAAA,CAAC,EAAG,CAAA,CAAA,EAAG,CAAA,CAAA;AACzB,MAAA,IAAIC,gBAAS,IAAI,CAAA;AAAG,QAAA,SAAA,CAAU,IAAK,CAAA,EAAA,CAAG,CAAE,CAAA,IAAI,CAAC,CAAA,CAAA;AAC7C,MAAI,IAAA,IAAA;AAAM,QAAA,SAAA,CAAU,IAAK,CAAA,EAAA,CAAG,CAAE,CAAA,MAAM,CAAC,CAAA,CAAA;AACrC,MAAI,IAAA,KAAA;AAAO,QAAA,SAAA,CAAU,IAAK,CAAA,EAAA,CAAG,CAAE,CAAA,KAAK,CAAC,CAAA,CAAA;AACrC,MAAO,OAAA,SAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAYD,aAAS,MAAM;AAC/B,MAAA,MAAM,EAAE,IAAS,EAAA,GAAA,KAAA,CAAA;AACjB,MAAA,OAAOE,
|
|
1
|
+
{"version":3,"file":"avatar2.js","sources":["../../../../../../packages/components/avatar/src/avatar.vue"],"sourcesContent":["<template>\n <span :class=\"avatarClass\" :style=\"sizeStyle\">\n <img\n v-if=\"(src || srcSet) && !hasLoadError\"\n :src=\"src\"\n :alt=\"alt\"\n :srcset=\"srcSet\"\n :style=\"fitStyle\"\n @error=\"handleError\"\n />\n <el-icon v-else-if=\"icon\">\n <component :is=\"icon\" />\n </el-icon>\n <slot v-else />\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { addUnit, isNumber, isString } from '@element-plus/utils'\nimport { avatarEmits, avatarProps } from './avatar'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElAvatar',\n})\n\nconst props = defineProps(avatarProps)\nconst emit = defineEmits(avatarEmits)\n\nconst ns = useNamespace('avatar')\n\nconst hasLoadError = ref(false)\n\nconst avatarClass = computed(() => {\n const { size, icon, shape } = props\n const classList = [ns.b()]\n if (isString(size)) classList.push(ns.m(size))\n if (icon) classList.push(ns.m('icon'))\n if (shape) classList.push(ns.m(shape))\n return classList\n})\n\nconst sizeStyle = computed(() => {\n const { size } = props\n return isNumber(size)\n ? (ns.cssVarBlock({\n size: addUnit(size) || '',\n }) as CSSProperties)\n : undefined\n})\n\nconst fitStyle = computed<CSSProperties>(() => ({\n objectFit: props.fit,\n}))\n\n// need reset hasLoadError to false if src changed\nwatch(\n () => props.src,\n () => (hasLoadError.value = false)\n)\n\nfunction handleError(e: Event) {\n hasLoadError.value = true\n emit('error', e)\n}\n</script>\n"],"names":["useNamespace","ref","computed","isString","isNumber","addUnit","watch"],"mappings":";;;;;;;;;;;;;;;;uCA0Bc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,YAAA,GAAeC,QAAI,KAAK,CAAA,CAAA;AAE9B,IAAM,MAAA,WAAA,GAAcC,aAAS,MAAM;AACjC,MAAM,MAAA,EAAE,IAAM,EAAA,IAAA,EAAM,KAAU,EAAA,GAAA,KAAA,CAAA;AAC9B,MAAA,MAAM,SAAY,GAAA,CAAC,EAAG,CAAA,CAAA,EAAG,CAAA,CAAA;AACzB,MAAA,IAAIC,gBAAS,IAAI,CAAA;AAAG,QAAA,SAAA,CAAU,IAAK,CAAA,EAAA,CAAG,CAAE,CAAA,IAAI,CAAC,CAAA,CAAA;AAC7C,MAAI,IAAA,IAAA;AAAM,QAAA,SAAA,CAAU,IAAK,CAAA,EAAA,CAAG,CAAE,CAAA,MAAM,CAAC,CAAA,CAAA;AACrC,MAAI,IAAA,KAAA;AAAO,QAAA,SAAA,CAAU,IAAK,CAAA,EAAA,CAAG,CAAE,CAAA,KAAK,CAAC,CAAA,CAAA;AACrC,MAAO,OAAA,SAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAYD,aAAS,MAAM;AAC/B,MAAA,MAAM,EAAE,IAAS,EAAA,GAAA,KAAA,CAAA;AACjB,MAAA,OAAOE,cAAS,CAAA,IAAI,CACf,GAAA,EAAA,CAAG,WAAY,CAAA;AAAA,QACd,IAAA,EAAMC,aAAQ,CAAA,IAAI,CAAK,IAAA,EAAA;AAAA,OACxB,CACD,GAAA,KAAA,CAAA,CAAA;AAAA,KACL,CAAA,CAAA;AAED,IAAM,MAAA,QAAA,GAAWH,aAAwB,OAAO;AAAA,MAC9C,WAAW,KAAM,CAAA,GAAA;AAAA,KACjB,CAAA,CAAA,CAAA;AAGF,IAAAI,SAAA,CACE,MAAM,KAAM,CAAA,GAAA,EACZ,MAAO,YAAA,CAAa,QAAQ,KAC9B,CAAA,CAAA;AAEA,IAAA,SAAA,WAAA,CAAqB,CAAU,EAAA;AAC7B,MAAA,YAAA,CAAa,KAAQ,GAAA,IAAA,CAAA;AACrB,MAAA,IAAA,CAAK,SAAS,CAAC,CAAA,CAAA;AAAA,KACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,7 +8,7 @@ require('../../../utils/index.js');
|
|
|
8
8
|
var badge = require('./badge.js');
|
|
9
9
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
10
|
var index = require('../../../hooks/use-namespace/index.js');
|
|
11
|
-
var
|
|
11
|
+
var types = require('../../../utils/types.js');
|
|
12
12
|
|
|
13
13
|
const _hoisted_1 = ["textContent"];
|
|
14
14
|
const __default__ = vue.defineComponent({
|
|
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
23
23
|
const content = vue.computed(() => {
|
|
24
24
|
if (props.isDot)
|
|
25
25
|
return "";
|
|
26
|
-
if (
|
|
26
|
+
if (types.isNumber(props.value) && types.isNumber(props.max)) {
|
|
27
27
|
return props.max < props.value ? `${props.max}+` : `${props.value}`;
|
|
28
28
|
}
|
|
29
29
|
return `${props.value}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge2.js","sources":["../../../../../../packages/components/badge/src/badge.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <slot />\n <transition :name=\"`${ns.namespace.value}-zoom-in-center`\">\n <sup\n v-show=\"!hidden && (content || isDot)\"\n :class=\"[\n ns.e('content'),\n ns.em('content', type),\n ns.is('fixed', !!$slots.default),\n ns.is('dot', isDot),\n ]\"\n v-text=\"content\"\n />\n </transition>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isNumber } from '@element-plus/utils'\nimport { badgeProps } from './badge'\n\ndefineOptions({\n name: 'ElBadge',\n})\n\nconst props = defineProps(badgeProps)\n\nconst ns = useNamespace('badge')\n\nconst content = computed<string>(() => {\n if (props.isDot) return ''\n\n if (isNumber(props.value) && isNumber(props.max)) {\n return props.max < props.value ? `${props.max}+` : `${props.value}`\n }\n return `${props.value}`\n})\n\ndefineExpose({\n /** @description badge content */\n content,\n})\n</script>\n"],"names":["useNamespace","computed","isNumber"],"mappings":";;;;;;;;;;;;;uCAwBc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAE/B,IAAM,MAAA,OAAA,GAAUC,aAAiB,MAAM;AACrC,MAAA,IAAI,KAAM,CAAA,KAAA;AAAO,QAAO,OAAA,EAAA,CAAA;AAExB,MAAA,IAAIC,
|
|
1
|
+
{"version":3,"file":"badge2.js","sources":["../../../../../../packages/components/badge/src/badge.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <slot />\n <transition :name=\"`${ns.namespace.value}-zoom-in-center`\">\n <sup\n v-show=\"!hidden && (content || isDot)\"\n :class=\"[\n ns.e('content'),\n ns.em('content', type),\n ns.is('fixed', !!$slots.default),\n ns.is('dot', isDot),\n ]\"\n v-text=\"content\"\n />\n </transition>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isNumber } from '@element-plus/utils'\nimport { badgeProps } from './badge'\n\ndefineOptions({\n name: 'ElBadge',\n})\n\nconst props = defineProps(badgeProps)\n\nconst ns = useNamespace('badge')\n\nconst content = computed<string>(() => {\n if (props.isDot) return ''\n\n if (isNumber(props.value) && isNumber(props.max)) {\n return props.max < props.value ? `${props.max}+` : `${props.value}`\n }\n return `${props.value}`\n})\n\ndefineExpose({\n /** @description badge content */\n content,\n})\n</script>\n"],"names":["useNamespace","computed","isNumber"],"mappings":";;;;;;;;;;;;;uCAwBc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAE/B,IAAM,MAAA,OAAA,GAAUC,aAAiB,MAAM;AACrC,MAAA,IAAI,KAAM,CAAA,KAAA;AAAO,QAAO,OAAA,EAAA,CAAA;AAExB,MAAA,IAAIC,eAAS,KAAM,CAAA,KAAK,KAAKA,cAAS,CAAA,KAAA,CAAM,GAAG,CAAG,EAAA;AAChD,QAAO,OAAA,KAAA,CAAM,MAAM,KAAM,CAAA,KAAA,GAAQ,GAAG,KAAM,CAAA,GAAA,CAAA,CAAA,CAAA,GAAS,GAAG,KAAM,CAAA,KAAA,CAAA,CAAA,CAAA;AAAA,OAC9D;AACA,MAAA,OAAO,GAAG,KAAM,CAAA,KAAA,CAAA,CAAA,CAAA;AAAA,KACjB,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,OAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -26,6 +26,7 @@ export declare const ElButton: import("element-plus/es/utils").SFCWithInstall<im
|
|
|
26
26
|
readonly color: StringConstructor;
|
|
27
27
|
readonly dark: BooleanConstructor;
|
|
28
28
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
29
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
29
30
|
}, {
|
|
30
31
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
31
32
|
readonly size: {
|
|
@@ -55,6 +56,7 @@ export declare const ElButton: import("element-plus/es/utils").SFCWithInstall<im
|
|
|
55
56
|
readonly color: StringConstructor;
|
|
56
57
|
readonly dark: BooleanConstructor;
|
|
57
58
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
59
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
58
60
|
}>> & {
|
|
59
61
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
60
62
|
}>>;
|
|
@@ -82,6 +84,17 @@ export declare const ElButton: import("element-plus/es/utils").SFCWithInstall<im
|
|
|
82
84
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
83
85
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
84
86
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
87
|
+
_props: import("vue").ComputedRef<{
|
|
88
|
+
ariaDisabled: boolean;
|
|
89
|
+
disabled: boolean;
|
|
90
|
+
autofocus: boolean;
|
|
91
|
+
type: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
92
|
+
} | {
|
|
93
|
+
ariaDisabled?: undefined;
|
|
94
|
+
disabled?: undefined;
|
|
95
|
+
autofocus?: undefined;
|
|
96
|
+
type?: undefined;
|
|
97
|
+
}>;
|
|
85
98
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
86
99
|
handleClick: (evt: MouseEvent) => void;
|
|
87
100
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -177,6 +190,7 @@ export declare const ElButton: import("element-plus/es/utils").SFCWithInstall<im
|
|
|
177
190
|
readonly color: StringConstructor;
|
|
178
191
|
readonly dark: BooleanConstructor;
|
|
179
192
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
193
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
180
194
|
}>> & {
|
|
181
195
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
182
196
|
}, {
|
|
@@ -187,6 +201,7 @@ export declare const ElButton: import("element-plus/es/utils").SFCWithInstall<im
|
|
|
187
201
|
readonly text: boolean;
|
|
188
202
|
readonly round: boolean;
|
|
189
203
|
readonly circle: boolean;
|
|
204
|
+
readonly tag: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
190
205
|
readonly nativeType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
191
206
|
readonly loadingIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
192
207
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes } from 'vue';
|
|
1
|
+
import type { Component, ExtractPropTypes } from 'vue';
|
|
2
2
|
export declare const buttonTypes: readonly ["default", "primary", "success", "warning", "info", "danger", "text", ""];
|
|
3
3
|
export declare const buttonNativeTypes: readonly ["button", "submit", "reset"];
|
|
4
4
|
export declare const buttonProps: {
|
|
@@ -11,14 +11,14 @@ export declare const buttonProps: {
|
|
|
11
11
|
readonly disabled: BooleanConstructor;
|
|
12
12
|
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger", unknown, "", boolean>;
|
|
13
13
|
readonly icon: {
|
|
14
|
-
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string |
|
|
14
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
15
15
|
readonly required: false;
|
|
16
16
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
17
17
|
__epPropKey: true;
|
|
18
18
|
};
|
|
19
19
|
readonly nativeType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
20
20
|
readonly loading: BooleanConstructor;
|
|
21
|
-
readonly loadingIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string |
|
|
21
|
+
readonly loadingIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>, boolean>;
|
|
22
22
|
readonly plain: BooleanConstructor;
|
|
23
23
|
readonly text: BooleanConstructor;
|
|
24
24
|
readonly link: BooleanConstructor;
|
|
@@ -29,6 +29,7 @@ export declare const buttonProps: {
|
|
|
29
29
|
readonly color: StringConstructor;
|
|
30
30
|
readonly dark: BooleanConstructor;
|
|
31
31
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
32
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
32
33
|
};
|
|
33
34
|
export declare const buttonEmits: {
|
|
34
35
|
click: (evt: MouseEvent) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: Boolean,\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: Boolean,\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two chinese characters\n */\n autoInsertSpace: {\n type: Boolean,\n default: undefined,\n },\n} as const)\nexport const buttonEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type ButtonProps = ExtractPropTypes<typeof buttonProps>\nexport type ButtonEmits = typeof buttonEmits\n\nexport type ButtonType = ButtonProps['type']\nexport type ButtonNativeType = ButtonProps['nativeType']\n\nexport interface ButtonConfigContext {\n autoInsertSpace?: boolean\n}\n"],"names":["buildProps","useSizeProp","iconPropType","Loading"],"mappings":";;;;;;;;;;;AAGY,MAAC,WAAW,GAAG;AAC3B,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,EAAE;AACJ,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE;AACnD,MAAC,WAAW,GAAGA,kBAAU,CAAC;AACtC,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,WAAW;AACvB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,iBAAiB;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEA,iBAAY;AACtB,IAAI,OAAO,EAAE,MAAMC,gBAAO;AAC1B,GAAG;AACH,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,EAAE,EAAE,OAAO;AACb,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: Boolean,\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: Boolean,\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two chinese characters\n */\n autoInsertSpace: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: definePropType<string | Component>([String, Object]),\n default: 'button',\n },\n} as const)\nexport const buttonEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type ButtonProps = ExtractPropTypes<typeof buttonProps>\nexport type ButtonEmits = typeof buttonEmits\n\nexport type ButtonType = ButtonProps['type']\nexport type ButtonNativeType = ButtonProps['nativeType']\n\nexport interface ButtonConfigContext {\n autoIn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;AACnB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;;;;"}
|
|
@@ -26,6 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
readonly color: StringConstructor;
|
|
27
27
|
readonly dark: BooleanConstructor;
|
|
28
28
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
29
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
29
30
|
}, {
|
|
30
31
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
31
32
|
readonly size: {
|
|
@@ -55,6 +56,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
55
56
|
readonly color: StringConstructor;
|
|
56
57
|
readonly dark: BooleanConstructor;
|
|
57
58
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
59
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
58
60
|
}>> & {
|
|
59
61
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
60
62
|
}>>;
|
|
@@ -82,6 +84,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
82
84
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
83
85
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
84
86
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
87
|
+
_props: import("vue").ComputedRef<{
|
|
88
|
+
ariaDisabled: boolean;
|
|
89
|
+
disabled: boolean;
|
|
90
|
+
autofocus: boolean;
|
|
91
|
+
type: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
92
|
+
} | {
|
|
93
|
+
ariaDisabled?: undefined;
|
|
94
|
+
disabled?: undefined;
|
|
95
|
+
autofocus?: undefined;
|
|
96
|
+
type?: undefined;
|
|
97
|
+
}>;
|
|
85
98
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
86
99
|
handleClick: (evt: MouseEvent) => void;
|
|
87
100
|
ElIcon: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -177,6 +190,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
177
190
|
readonly color: StringConstructor;
|
|
178
191
|
readonly dark: BooleanConstructor;
|
|
179
192
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
193
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
180
194
|
}>> & {
|
|
181
195
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
182
196
|
}, {
|
|
@@ -187,6 +201,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
187
201
|
readonly text: boolean;
|
|
188
202
|
readonly round: boolean;
|
|
189
203
|
readonly circle: boolean;
|
|
204
|
+
readonly tag: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
190
205
|
readonly nativeType: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
191
206
|
readonly loadingIcon: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
192
207
|
readonly autoInsertSpace: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|