@element-plus/nightly 0.0.20220220 → 0.0.20220224
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +3347 -6119
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +3348 -6120
- 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/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.d.ts +6 -8
- package/es/components/affix/src/affix.vue.d.ts +6 -8
- package/es/components/affix/src/affix2.mjs +35 -34
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/avatar/index.d.ts +58 -0
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/index.mjs.map +1 -1
- package/es/components/avatar/src/avatar.vue.d.ts +58 -0
- package/es/components/avatar/src/avatar2.mjs +29 -38
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +4 -1
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/button/index.d.ts +12 -1
- package/es/components/button/index.mjs +3 -3
- package/es/components/button/index.mjs.map +1 -1
- package/es/components/button/src/button-group.vue.d.ts +6 -0
- package/es/components/button/src/button-group2.mjs +15 -16
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +0 -1
- package/es/components/button/src/button2.mjs +3 -5
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/calendar/index.d.ts +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/index.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +27 -29
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +22 -12
- package/es/components/cascader/src/index.vue.d.ts +11 -6
- package/es/components/config-provider/index.d.ts +3 -3
- package/es/components/config-provider/src/config-provider.d.ts +2 -1
- package/es/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +3 -3
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +2 -2
- package/es/components/date-picker/src/date-picker-com/panel-month-range.vue.d.ts +2 -2
- package/es/components/descriptions/index.d.ts +2 -2
- package/es/components/descriptions/src/description-item.d.ts +1 -1
- package/es/components/dialog/index.d.ts +200 -32
- package/es/components/dialog/index.mjs +2 -2
- package/es/components/dialog/index.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.d.ts +12 -0
- package/es/components/dialog/src/dialog-content.mjs +40 -0
- package/es/components/dialog/src/dialog-content.mjs.map +1 -0
- package/es/components/dialog/src/dialog-content.vue.d.ts +84 -0
- package/es/components/dialog/src/dialog-content2.mjs +84 -0
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -0
- package/es/components/dialog/src/dialog.d.ts +9 -7
- package/es/components/dialog/src/dialog.mjs +5 -30
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +236 -67
- package/es/components/dialog/src/dialog2.mjs +96 -122
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/dialog/src/token.d.ts +10 -0
- package/es/components/dialog/src/token.mjs +4 -0
- package/es/components/dialog/src/token.mjs.map +1 -0
- package/es/components/drawer/index.d.ts +22 -18
- package/es/components/drawer/src/drawer.d.ts +9 -7
- package/es/components/drawer/src/drawer.vue.d.ts +22 -18
- package/es/components/dropdown/index.d.ts +8 -3
- package/es/components/dropdown/src/dropdown-item-impl.mjs +5 -5
- package/es/components/dropdown/src/dropdown-item-impl.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +2 -1
- package/es/components/dropdown/src/dropdown-item.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +8 -3
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/focus-trap/src/focus-trap.mjs +19 -15
- package/es/components/focus-trap/src/focus-trap.mjs.map +1 -1
- package/es/components/message/index.d.ts +1 -1
- package/es/components/message/src/message-method.d.ts +1 -1
- package/es/components/message/src/message-method.mjs +10 -7
- package/es/components/message/src/message-method.mjs.map +1 -1
- package/es/components/message/src/message.d.ts +3 -3
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/notification/index.d.ts +1 -1
- package/es/components/popconfirm/index.d.ts +3 -0
- package/es/components/popconfirm/src/popconfirm.d.ts +1 -0
- package/es/components/popconfirm/src/popconfirm.mjs +2 -1
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +3 -0
- package/es/components/popconfirm/src/popconfirm2.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/index.d.ts +30 -10
- package/es/components/popover/src/index.mjs +19 -3
- package/es/components/popover/src/index.mjs.map +1 -1
- package/es/components/popover/src/index.vue.d.ts +15 -5
- package/es/components/popover/src/popover.d.ts +1 -0
- package/es/components/popover/src/popover.mjs +4 -0
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popper/src/content.mjs +9 -0
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content.vue.d.ts +3 -0
- package/es/components/popper/src/popper.d.ts +1 -0
- package/es/components/popper/src/popper.mjs +3 -0
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/row/index.d.ts +3 -3
- package/es/components/row/src/row.d.ts +4 -4
- package/es/components/row/src/row.mjs +8 -1
- package/es/components/row/src/row.mjs.map +1 -1
- package/es/components/scrollbar/index.d.ts +1 -1
- package/es/components/scrollbar/src/bar.vue.d.ts +2 -2
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +1 -1
- package/es/components/select/index.d.ts +8 -3
- package/es/components/select/src/select.vue.d.ts +8 -3
- package/es/components/select/src/useSelect.d.ts +8 -3
- package/es/components/select-v2/index.d.ts +18 -8
- package/es/components/select-v2/src/select.vue.d.ts +9 -4
- package/es/components/select-v2/src/useSelect.d.ts +8 -3
- package/es/components/slider/index.d.ts +2 -2
- package/es/components/slider/src/index.vue.d.ts +1 -1
- package/es/components/slot/src/only-child.mjs +3 -1
- package/es/components/slot/src/only-child.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +2 -2
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +8 -3
- package/es/components/table/src/store/watcher.mjs +4 -8
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.mjs +2 -2
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-footer/index.mjs +3 -1
- package/es/components/table/src/table-footer/index.mjs.map +1 -1
- package/es/components/table/src/table-layout.mjs +2 -5
- package/es/components/table/src/table-layout.mjs.map +1 -1
- package/es/components/table/src/table.mjs +1 -0
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +6 -2
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +9 -3
- package/es/components/time-picker/src/time-picker-com/useTimePicker.d.ts +2 -2
- package/es/components/tooltip/index.d.ts +4 -1
- package/es/components/tooltip/src/content.mjs +22 -4
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content.vue.d.ts +8 -2
- package/es/components/tooltip/src/tokens.d.ts +2 -0
- package/es/components/tooltip/src/tokens.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +4 -1
- package/es/components/tooltip/src/tooltip2.mjs +7 -1
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/transfer/index.d.ts +4 -4
- package/es/components/transfer/src/index.vue.d.ts +2 -2
- package/es/components/tree-v2/index.d.ts +1 -1
- package/es/components/tree-v2/src/tree.vue.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-list.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +1 -1
- package/es/defaults.d.ts +1 -1
- package/es/hooks/use-global-config/index.d.ts +1 -1
- package/es/hooks/use-model-toggle/index.d.ts +10 -7
- package/es/hooks/use-model-toggle/index.mjs +9 -7
- package/es/hooks/use-model-toggle/index.mjs.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/{locale.d.ts → locales.d.ts} +0 -0
- package/es/{locale.mjs → locales.mjs} +1 -1
- package/es/locales.mjs.map +1 -0
- package/es/utils/vue/install.d.ts +2 -2
- package/es/utils/vue/install.mjs +2 -0
- package/es/utils/vue/install.mjs.map +1 -1
- package/es/utils/vue/typescript.d.ts +4 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.d.ts +6 -8
- package/lib/components/affix/src/affix.vue.d.ts +6 -8
- package/lib/components/affix/src/affix2.js +34 -33
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/avatar/index.d.ts +58 -0
- package/lib/components/avatar/src/avatar.vue.d.ts +58 -0
- package/lib/components/avatar/src/avatar2.js +31 -40
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/badge/src/badge2.js +4 -1
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/button/index.d.ts +12 -1
- package/lib/components/button/src/button-group.vue.d.ts +6 -0
- package/lib/components/button/src/button-group2.js +14 -15
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +0 -1
- package/lib/components/button/src/button2.js +3 -5
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/calendar/index.d.ts +1 -1
- package/lib/components/card/src/card2.js +26 -28
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/cascader/index.d.ts +22 -12
- package/lib/components/cascader/src/index.vue.d.ts +11 -6
- package/lib/components/config-provider/index.d.ts +3 -3
- package/lib/components/config-provider/src/config-provider.d.ts +2 -1
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +3 -3
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +2 -2
- package/lib/components/date-picker/src/date-picker-com/panel-month-range.vue.d.ts +2 -2
- package/lib/components/descriptions/index.d.ts +2 -2
- package/lib/components/descriptions/src/description-item.d.ts +1 -1
- package/lib/components/dialog/index.d.ts +200 -32
- package/lib/components/dialog/src/dialog-content.d.ts +12 -0
- package/lib/components/dialog/src/dialog-content.js +45 -0
- package/lib/components/dialog/src/dialog-content.js.map +1 -0
- package/lib/components/dialog/src/dialog-content.vue.d.ts +84 -0
- package/lib/components/dialog/src/dialog-content2.js +88 -0
- package/lib/components/dialog/src/dialog-content2.js.map +1 -0
- package/lib/components/dialog/src/dialog.d.ts +9 -7
- package/lib/components/dialog/src/dialog.js +5 -30
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +236 -67
- package/lib/components/dialog/src/dialog2.js +101 -127
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/dialog/src/token.d.ts +10 -0
- package/lib/components/dialog/src/token.js +8 -0
- package/lib/components/dialog/src/token.js.map +1 -0
- package/lib/components/drawer/index.d.ts +22 -18
- package/lib/components/drawer/src/drawer.d.ts +9 -7
- package/lib/components/drawer/src/drawer.vue.d.ts +22 -18
- package/lib/components/dropdown/index.d.ts +8 -3
- package/lib/components/dropdown/src/dropdown-item-impl.js +5 -5
- package/lib/components/dropdown/src/dropdown-item-impl.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +2 -1
- package/lib/components/dropdown/src/dropdown-item.js +2 -2
- package/lib/components/dropdown/src/dropdown-item.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +8 -3
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/focus-trap/src/focus-trap.js +18 -14
- package/lib/components/focus-trap/src/focus-trap.js.map +1 -1
- package/lib/components/message/index.d.ts +1 -1
- package/lib/components/message/src/message-method.d.ts +1 -1
- package/lib/components/message/src/message-method.js +10 -7
- package/lib/components/message/src/message-method.js.map +1 -1
- package/lib/components/message/src/message.d.ts +3 -3
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/notification/index.d.ts +1 -1
- package/lib/components/popconfirm/index.d.ts +3 -0
- package/lib/components/popconfirm/src/popconfirm.d.ts +1 -0
- package/lib/components/popconfirm/src/popconfirm.js +2 -1
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +3 -0
- package/lib/components/popconfirm/src/popconfirm2.js +2 -2
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/index.d.ts +30 -10
- package/lib/components/popover/src/index.js +19 -3
- package/lib/components/popover/src/index.js.map +1 -1
- package/lib/components/popover/src/index.vue.d.ts +15 -5
- package/lib/components/popover/src/popover.d.ts +1 -0
- package/lib/components/popover/src/popover.js +4 -0
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popper/src/content.js +9 -0
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content.vue.d.ts +3 -0
- package/lib/components/popper/src/popper.d.ts +1 -0
- package/lib/components/popper/src/popper.js +3 -0
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/row/index.d.ts +3 -3
- package/lib/components/row/src/row.d.ts +4 -4
- package/lib/components/row/src/row.js +8 -1
- package/lib/components/row/src/row.js.map +1 -1
- package/lib/components/scrollbar/index.d.ts +1 -1
- package/lib/components/scrollbar/src/bar.vue.d.ts +2 -2
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +1 -1
- package/lib/components/select/index.d.ts +8 -3
- package/lib/components/select/src/select.vue.d.ts +8 -3
- package/lib/components/select/src/useSelect.d.ts +8 -3
- package/lib/components/select-v2/index.d.ts +18 -8
- package/lib/components/select-v2/src/select.vue.d.ts +9 -4
- package/lib/components/select-v2/src/useSelect.d.ts +8 -3
- package/lib/components/slider/index.d.ts +2 -2
- package/lib/components/slider/src/index.vue.d.ts +1 -1
- package/lib/components/slot/src/only-child.js +2 -0
- package/lib/components/slot/src/only-child.js.map +1 -1
- package/lib/components/switch/src/switch2.js +2 -2
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +8 -3
- package/lib/components/table/src/store/watcher.js +4 -8
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table/style-helper.js +2 -2
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table-footer/index.js +3 -1
- package/lib/components/table/src/table-footer/index.js.map +1 -1
- package/lib/components/table/src/table-layout.js +2 -5
- package/lib/components/table/src/table-layout.js.map +1 -1
- package/lib/components/table/src/table.js +1 -0
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +6 -2
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +9 -3
- package/lib/components/time-picker/src/time-picker-com/useTimePicker.d.ts +2 -2
- package/lib/components/tooltip/index.d.ts +4 -1
- package/lib/components/tooltip/src/content.js +22 -4
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content.vue.d.ts +8 -2
- package/lib/components/tooltip/src/tokens.d.ts +2 -0
- package/lib/components/tooltip/src/tokens.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +4 -1
- package/lib/components/tooltip/src/tooltip2.js +7 -1
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/transfer/index.d.ts +4 -4
- package/lib/components/transfer/src/index.vue.d.ts +2 -2
- package/lib/components/tree-v2/index.d.ts +1 -1
- package/lib/components/tree-v2/src/tree.vue.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-list.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +1 -1
- package/lib/defaults.d.ts +1 -1
- package/lib/hooks/use-global-config/index.d.ts +1 -1
- package/lib/hooks/use-model-toggle/index.d.ts +10 -7
- package/lib/hooks/use-model-toggle/index.js +9 -7
- package/lib/hooks/use-model-toggle/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/{locale.d.ts → locales.d.ts} +0 -0
- package/lib/{locale.js → locales.js} +1 -1
- package/lib/locales.js.map +1 -0
- package/lib/utils/vue/install.d.ts +2 -2
- package/lib/utils/vue/install.js +2 -0
- package/lib/utils/vue/install.js.map +1 -1
- package/lib/utils/vue/typescript.d.ts +4 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +6 -6
- package/tags.json +1 -1
- package/theme-chalk/base.css +1 -1
- package/theme-chalk/display.css +1 -1
- package/theme-chalk/el-button.css +1 -1
- package/theme-chalk/el-cascader.css +1 -1
- package/theme-chalk/el-check-tag.css +1 -1
- package/theme-chalk/el-checkbox-button.css +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-dialog.css +1 -1
- package/theme-chalk/el-dropdown.css +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/el-input-number.css +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/el-reset.css +1 -1
- package/theme-chalk/el-row.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-switch.css +1 -1
- package/theme-chalk/el-table-column.css +1 -1
- package/theme-chalk/el-tag.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/el-var.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/button.scss +1 -1
- package/theme-chalk/src/cascader.scss +13 -12
- package/theme-chalk/src/check-tag.scss +7 -5
- package/theme-chalk/src/checkbox-button.scss +1 -1
- package/theme-chalk/src/common/var.scss +37 -21
- package/theme-chalk/src/dark/vars.scss +6 -0
- package/theme-chalk/src/date-picker/date-table.scss +14 -14
- package/theme-chalk/src/date-picker/picker.scss +3 -4
- package/theme-chalk/src/dialog.scss +6 -2
- package/theme-chalk/src/form.scss +2 -2
- package/theme-chalk/src/input-number.scss +6 -4
- package/theme-chalk/src/input.scss +146 -40
- package/theme-chalk/src/mixins/_button.scss +119 -15
- package/theme-chalk/src/mixins/_var.scss +21 -8
- package/theme-chalk/src/mixins/function.scss +17 -0
- package/theme-chalk/src/mixins/mixins.scss +8 -0
- package/theme-chalk/src/reset.scss +1 -1
- package/theme-chalk/src/row.scss +3 -1
- package/theme-chalk/src/select-v2.scss +2 -1
- package/theme-chalk/src/select.scss +15 -4
- package/theme-chalk/src/switch.scss +2 -0
- package/theme-chalk/src/tag.scss +64 -66
- package/theme-chalk/src/var.scss +6 -0
- package/web-types.json +1 -1
- package/es/locale.mjs.map +0 -1
- package/lib/locale.js.map +0 -1
|
@@ -17,37 +17,35 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
17
17
|
...__default__,
|
|
18
18
|
props: affix.affixProps,
|
|
19
19
|
emits: affix.affixEmits,
|
|
20
|
-
setup(__props, { emit }) {
|
|
20
|
+
setup(__props, { expose, emit }) {
|
|
21
21
|
const props = __props;
|
|
22
22
|
const ns = index.useNamespace("affix");
|
|
23
23
|
const target = vue.shallowRef();
|
|
24
24
|
const root = vue.shallowRef();
|
|
25
25
|
const scrollContainer = vue.shallowRef();
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
transform: 0
|
|
33
|
-
});
|
|
26
|
+
const fixed = vue.ref(false);
|
|
27
|
+
const height = vue.ref(0);
|
|
28
|
+
const width = vue.ref(0);
|
|
29
|
+
const scrollTop = vue.ref(0);
|
|
30
|
+
const clientHeight = vue.ref(0);
|
|
31
|
+
const transform = vue.ref(0);
|
|
34
32
|
const rootStyle = vue.computed(() => {
|
|
35
33
|
return {
|
|
36
|
-
height:
|
|
37
|
-
width:
|
|
34
|
+
height: fixed.value ? `${height.value}px` : "",
|
|
35
|
+
width: fixed.value ? `${width.value}px` : ""
|
|
38
36
|
};
|
|
39
37
|
});
|
|
40
38
|
const affixStyle = vue.computed(() => {
|
|
41
|
-
if (!
|
|
39
|
+
if (!fixed.value)
|
|
42
40
|
return;
|
|
43
41
|
const offset = props.offset ? `${props.offset}px` : 0;
|
|
44
|
-
const
|
|
42
|
+
const _transform = transform.value ? `translateY(${transform.value}px)` : "";
|
|
45
43
|
return {
|
|
46
|
-
height: `${
|
|
47
|
-
width: `${
|
|
44
|
+
height: `${height.value}px`,
|
|
45
|
+
width: `${width.value}px`,
|
|
48
46
|
top: props.position === "top" ? offset : "",
|
|
49
47
|
bottom: props.position === "bottom" ? offset : "",
|
|
50
|
-
transform,
|
|
48
|
+
transform: _transform,
|
|
51
49
|
zIndex: props.zIndex
|
|
52
50
|
};
|
|
53
51
|
});
|
|
@@ -56,37 +54,37 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
56
54
|
return;
|
|
57
55
|
const rootRect = root.value.getBoundingClientRect();
|
|
58
56
|
const targetRect = target.value.getBoundingClientRect();
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
height.value = rootRect.height;
|
|
58
|
+
width.value = rootRect.width;
|
|
59
|
+
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
|
60
|
+
clientHeight.value = document.documentElement.clientHeight;
|
|
63
61
|
if (props.position === "top") {
|
|
64
62
|
if (props.target) {
|
|
65
|
-
const difference = targetRect.bottom - props.offset -
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
const difference = targetRect.bottom - props.offset - height.value;
|
|
64
|
+
fixed.value = props.offset > rootRect.top && targetRect.bottom > 0;
|
|
65
|
+
transform.value = difference < 0 ? difference : 0;
|
|
68
66
|
} else {
|
|
69
|
-
|
|
67
|
+
fixed.value = props.offset > rootRect.top;
|
|
70
68
|
}
|
|
71
69
|
} else {
|
|
72
70
|
if (props.target) {
|
|
73
|
-
const difference =
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
const difference = clientHeight.value - targetRect.top - props.offset - height.value;
|
|
72
|
+
fixed.value = clientHeight.value - props.offset < rootRect.bottom && clientHeight.value > targetRect.top;
|
|
73
|
+
transform.value = difference < 0 ? -difference : 0;
|
|
76
74
|
} else {
|
|
77
|
-
|
|
75
|
+
fixed.value = clientHeight.value - props.offset < rootRect.bottom;
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
78
|
};
|
|
81
79
|
const onScroll = () => {
|
|
82
80
|
update();
|
|
83
81
|
emit("scroll", {
|
|
84
|
-
scrollTop:
|
|
85
|
-
fixed:
|
|
82
|
+
scrollTop: scrollTop.value,
|
|
83
|
+
fixed: fixed.value
|
|
86
84
|
});
|
|
87
85
|
};
|
|
88
|
-
vue.watch(
|
|
89
|
-
emit("change",
|
|
86
|
+
vue.watch(fixed, (fixed2) => {
|
|
87
|
+
emit("change", fixed2);
|
|
90
88
|
});
|
|
91
89
|
vue.onMounted(() => {
|
|
92
90
|
var _a;
|
|
@@ -103,6 +101,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
103
101
|
core.useEventListener(scrollContainer, "scroll", onScroll);
|
|
104
102
|
core.useResizeObserver(root, () => update());
|
|
105
103
|
core.useResizeObserver(target, () => update());
|
|
104
|
+
expose({
|
|
105
|
+
update
|
|
106
|
+
});
|
|
106
107
|
return (_ctx, _cache) => {
|
|
107
108
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
108
109
|
ref_key: "root",
|
|
@@ -111,7 +112,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
111
112
|
style: vue.normalizeStyle(vue.unref(rootStyle))
|
|
112
113
|
}, [
|
|
113
114
|
vue.createElementVNode("div", {
|
|
114
|
-
class: vue.normalizeClass({ [vue.unref(ns).m("fixed")]:
|
|
115
|
+
class: vue.normalizeClass({ [vue.unref(ns).m("fixed")]: fixed.value }),
|
|
115
116
|
style: vue.normalizeStyle(vue.unref(affixStyle))
|
|
116
117
|
}, [
|
|
117
118
|
vue.renderSlot(_ctx.$slots, "default")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix2.js","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <div :class=\"{ [ns.m('fixed')]:
|
|
1
|
+
{"version":3,"file":"affix2.js","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <div :class=\"{ [ns.m('fixed')]: fixed }\" :style=\"affixStyle\">\n <slot></slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef, watch } from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport { getScrollContainer } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { affixEmits, affixProps } from './affix'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElAffix',\n})\n\nconst props = defineProps(affixProps)\nconst emit = defineEmits(affixEmits)\n\nconst ns = useNamespace('affix')\n\nconst target = shallowRef<HTMLElement>()\nconst root = shallowRef<HTMLDivElement>()\nconst scrollContainer = shallowRef<HTMLElement | Window>()\n\nconst fixed = ref(false)\nconst height = ref(0) // height of root\nconst width = ref(0) // width of root\nconst scrollTop = ref(0) // scrollTop of documentElement\nconst clientHeight = ref(0) // clientHeight of documentElement\nconst transform = ref(0)\n\nconst rootStyle = computed<CSSProperties>(() => {\n return {\n height: fixed.value ? `${height.value}px` : '',\n width: fixed.value ? `${width.value}px` : '',\n }\n})\n\nconst affixStyle = computed<CSSProperties | undefined>(() => {\n if (!fixed.value) return\n\n const offset = props.offset ? `${props.offset}px` : 0\n const _transform = transform.value ? `translateY(${transform.value}px)` : ''\n\n return {\n height: `${height.value}px`,\n width: `${width.value}px`,\n top: props.position === 'top' ? offset : '',\n bottom: props.position === 'bottom' ? offset : '',\n transform: _transform,\n zIndex: props.zIndex,\n }\n})\n\nconst update = () => {\n if (!root.value || !target.value || !scrollContainer.value) return\n\n const rootRect = root.value.getBoundingClientRect()\n const targetRect = target.value.getBoundingClientRect()\n height.value = rootRect.height\n width.value = rootRect.width\n scrollTop.value =\n scrollContainer.value instanceof Window\n ? document.documentElement.scrollTop\n : scrollContainer.value.scrollTop || 0\n clientHeight.value = document.documentElement.clientHeight\n\n if (props.position === 'top') {\n if (props.target) {\n const difference = targetRect.bottom - props.offset - height.value\n fixed.value = props.offset > rootRect.top && targetRect.bottom > 0\n transform.value = difference < 0 ? difference : 0\n } else {\n fixed.value = props.offset > rootRect.top\n }\n } else {\n if (props.target) {\n const difference =\n clientHeight.value - targetRect.top - props.offset - height.value\n fixed.value =\n clientHeight.value - props.offset < rootRect.bottom &&\n clientHeight.value > targetRect.top\n transform.value = difference < 0 ? -difference : 0\n } else {\n fixed.value = clientHeight.value - props.offset < rootRect.bottom\n }\n }\n}\n\nconst onScroll = () => {\n update()\n\n emit('scroll', {\n scrollTop: scrollTop.value,\n fixed: fixed.value,\n })\n}\n\nwatch(fixed, (fixed) => {\n emit('change', fixed)\n})\n\nonMounted(() => {\n if (props.target) {\n target.value =\n document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!target.value) {\n throw new Error(`Target is not existed: ${props.target}`)\n }\n } else {\n target.value = document.documentElement\n }\n scrollContainer.value = getScrollContainer(root.value!, true)\n})\n\nuseEventListener(scrollContainer, 'scroll', onScroll)\nuseResizeObserver(root, () => update())\nuseResizeObserver(target, () => update())\n\ndefineExpose({\n /** @description update affix status */\n update,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;AAOA;;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA;;;;;;;AASA;;;AAIA;;;;;;;;;;;AAaA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,11 +7,69 @@ export declare const ElAvatar: import("element-plus/es/utils").SFCWithInstall<im
|
|
|
7
7
|
readonly srcSet: StringConstructor;
|
|
8
8
|
readonly fit: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("csstype").ObjectFitProperty>, "cover", unknown, unknown, unknown>;
|
|
9
9
|
}, {
|
|
10
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<readonly [NumberConstructor, StringConstructor], "default", unknown, "default" | "small" | "large", number>;
|
|
12
|
+
readonly shape: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "circle", unknown, "circle" | "square", unknown>;
|
|
13
|
+
readonly icon: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, unknown, unknown, unknown, unknown>;
|
|
14
|
+
readonly src: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
15
|
+
readonly alt: StringConstructor;
|
|
16
|
+
readonly srcSet: StringConstructor;
|
|
17
|
+
readonly fit: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("csstype").ObjectFitProperty>, "cover", unknown, unknown, unknown>;
|
|
18
|
+
}>> & {
|
|
19
|
+
onError?: ((evt: Event) => any) | undefined;
|
|
20
|
+
}>>;
|
|
21
|
+
emit: (event: "error", evt: Event) => void;
|
|
22
|
+
ns: {
|
|
23
|
+
namespace: import("vue").ComputedRef<string>;
|
|
24
|
+
b: (blockSuffix?: string) => string;
|
|
25
|
+
e: (element?: string | undefined) => string;
|
|
26
|
+
m: (modifier?: string | undefined) => string;
|
|
27
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
28
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
29
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
30
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
31
|
+
is: {
|
|
32
|
+
(name: string, state: boolean | undefined): string;
|
|
33
|
+
(name: string): string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
10
36
|
hasLoadError: import("vue").Ref<boolean>;
|
|
11
37
|
avatarClass: import("vue").ComputedRef<string[]>;
|
|
12
38
|
sizeStyle: import("vue").ComputedRef<import("vue").CSSProperties | undefined>;
|
|
13
39
|
fitStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
14
40
|
handleError: (e: Event) => void;
|
|
41
|
+
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
42
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
43
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
44
|
+
}, {
|
|
45
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
46
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
47
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
48
|
+
}>> & {
|
|
49
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
50
|
+
}>>;
|
|
51
|
+
ns: {
|
|
52
|
+
namespace: import("vue").ComputedRef<string>;
|
|
53
|
+
b: (blockSuffix?: string) => string;
|
|
54
|
+
e: (element?: string | undefined) => string;
|
|
55
|
+
m: (modifier?: string | undefined) => string;
|
|
56
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
57
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
58
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
59
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
60
|
+
is: {
|
|
61
|
+
(name: string, state: boolean | undefined): string;
|
|
62
|
+
(name: string): string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
style: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
66
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
67
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
68
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
69
|
+
}>>, {
|
|
70
|
+
size: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown>;
|
|
71
|
+
color: string;
|
|
72
|
+
}>> & Record<string, any>;
|
|
15
73
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
74
|
error: (evt: Event) => boolean;
|
|
17
75
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -8,11 +8,69 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
8
|
readonly srcSet: StringConstructor;
|
|
9
9
|
readonly fit: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("csstype").ObjectFitProperty>, "cover", unknown, unknown, unknown>;
|
|
10
10
|
}, {
|
|
11
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<readonly [NumberConstructor, StringConstructor], "default", unknown, "default" | "small" | "large", number>;
|
|
13
|
+
readonly shape: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "circle", unknown, "circle" | "square", unknown>;
|
|
14
|
+
readonly icon: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, unknown, unknown, unknown, unknown>;
|
|
15
|
+
readonly src: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
16
|
+
readonly alt: StringConstructor;
|
|
17
|
+
readonly srcSet: StringConstructor;
|
|
18
|
+
readonly fit: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("csstype").ObjectFitProperty>, "cover", unknown, unknown, unknown>;
|
|
19
|
+
}>> & {
|
|
20
|
+
onError?: ((evt: Event) => any) | undefined;
|
|
21
|
+
}>>;
|
|
22
|
+
emit: (event: "error", evt: Event) => void;
|
|
23
|
+
ns: {
|
|
24
|
+
namespace: import("vue").ComputedRef<string>;
|
|
25
|
+
b: (blockSuffix?: string) => string;
|
|
26
|
+
e: (element?: string | undefined) => string;
|
|
27
|
+
m: (modifier?: string | undefined) => string;
|
|
28
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
29
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
30
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
31
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
32
|
+
is: {
|
|
33
|
+
(name: string, state: boolean | undefined): string;
|
|
34
|
+
(name: string): string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
11
37
|
hasLoadError: import("vue").Ref<boolean>;
|
|
12
38
|
avatarClass: import("vue").ComputedRef<string[]>;
|
|
13
39
|
sizeStyle: import("vue").ComputedRef<CSSProperties | undefined>;
|
|
14
40
|
fitStyle: import("vue").ComputedRef<CSSProperties>;
|
|
15
41
|
handleError: (e: Event) => void;
|
|
42
|
+
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
43
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
44
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
45
|
+
}, {
|
|
46
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
47
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
48
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
49
|
+
}>> & {
|
|
50
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
51
|
+
}>>;
|
|
52
|
+
ns: {
|
|
53
|
+
namespace: import("vue").ComputedRef<string>;
|
|
54
|
+
b: (blockSuffix?: string) => string;
|
|
55
|
+
e: (element?: string | undefined) => string;
|
|
56
|
+
m: (modifier?: string | undefined) => string;
|
|
57
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
58
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
59
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
60
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
61
|
+
is: {
|
|
62
|
+
(name: string, state: boolean | undefined): string;
|
|
63
|
+
(name: string): string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
style: import("vue").ComputedRef<CSSProperties>;
|
|
67
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
68
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
69
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
70
|
+
}>>, {
|
|
71
|
+
size: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown>;
|
|
72
|
+
color: string;
|
|
73
|
+
}>> & Record<string, any>;
|
|
16
74
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
75
|
error: (evt: Event) => boolean;
|
|
18
76
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -3,25 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
-
var index = require('../../icon/index.js');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
7
7
|
require('../../../hooks/index.js');
|
|
8
8
|
require('../../../utils/index.js');
|
|
9
9
|
var avatar = require('./avatar.js');
|
|
10
|
-
var
|
|
11
|
-
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
10
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
11
|
var shared = require('@vue/shared');
|
|
13
12
|
var core = require('@vueuse/core');
|
|
14
13
|
var style = require('../../../utils/vue/style.js');
|
|
15
14
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const _hoisted_1 = ["src", "alt", "srcset"];
|
|
16
|
+
const __default__ = {
|
|
17
|
+
name: "ElAvatar"
|
|
18
|
+
};
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
20
|
+
...__default__,
|
|
21
21
|
props: avatar.avatarProps,
|
|
22
22
|
emits: avatar.avatarEmits,
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
23
|
+
setup(__props, { emit }) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const ns = index.useNamespace("avatar");
|
|
25
26
|
const hasLoadError = vue.ref(false);
|
|
26
27
|
const avatarClass = vue.computed(() => {
|
|
27
28
|
const { size, icon, shape } = props;
|
|
@@ -48,38 +49,28 @@ const _sfc_main = vue.defineComponent({
|
|
|
48
49
|
hasLoadError.value = true;
|
|
49
50
|
emit("error", e);
|
|
50
51
|
}
|
|
51
|
-
return {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
return (_ctx, _cache) => {
|
|
53
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
54
|
+
class: vue.normalizeClass(vue.unref(avatarClass)),
|
|
55
|
+
style: vue.normalizeStyle(vue.unref(sizeStyle))
|
|
56
|
+
}, [
|
|
57
|
+
(_ctx.src || _ctx.srcSet) && !hasLoadError.value ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
58
|
+
key: 0,
|
|
59
|
+
src: _ctx.src,
|
|
60
|
+
alt: _ctx.alt,
|
|
61
|
+
srcset: _ctx.srcSet,
|
|
62
|
+
style: vue.normalizeStyle(vue.unref(fitStyle)),
|
|
63
|
+
onError: handleError
|
|
64
|
+
}, null, 44, _hoisted_1)) : _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 1 }, {
|
|
65
|
+
default: vue.withCtx(() => [
|
|
66
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
})) : vue.renderSlot(_ctx.$slots, "default", { key: 2 })
|
|
70
|
+
], 6);
|
|
57
71
|
};
|
|
58
72
|
}
|
|
59
73
|
});
|
|
60
|
-
const _hoisted_1 = ["src", "alt", "srcset"];
|
|
61
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
62
|
-
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
63
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
64
|
-
class: vue.normalizeClass(_ctx.avatarClass),
|
|
65
|
-
style: vue.normalizeStyle(_ctx.sizeStyle)
|
|
66
|
-
}, [
|
|
67
|
-
(_ctx.src || _ctx.srcSet) && !_ctx.hasLoadError ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
68
|
-
key: 0,
|
|
69
|
-
src: _ctx.src,
|
|
70
|
-
alt: _ctx.alt,
|
|
71
|
-
srcset: _ctx.srcSet,
|
|
72
|
-
style: vue.normalizeStyle(_ctx.fitStyle),
|
|
73
|
-
onError: _cache[0] || (_cache[0] = (...args) => _ctx.handleError && _ctx.handleError(...args))
|
|
74
|
-
}, null, 44, _hoisted_1)) : _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_el_icon, { key: 1 }, {
|
|
75
|
-
default: vue.withCtx(() => [
|
|
76
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
|
|
77
|
-
]),
|
|
78
|
-
_: 1
|
|
79
|
-
})) : vue.renderSlot(_ctx.$slots, "default", { key: 2 })
|
|
80
|
-
], 6);
|
|
81
|
-
}
|
|
82
|
-
var Avatar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render]]);
|
|
83
74
|
|
|
84
|
-
exports["default"] =
|
|
75
|
+
exports["default"] = _sfc_main;
|
|
85
76
|
//# sourceMappingURL=avatar2.js.map
|
|
@@ -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></slot>\n </span>\n</template>\n\n<script lang=\"ts\">\nimport {
|
|
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></slot>\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 { isNumber, isString, addUnit } 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 ? ({\n '--el-avatar-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":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiCA;AAEA;AAEA;;;;;;;;;;;AASA;;;;;;AASA;;;AAKA;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -16,7 +16,7 @@ const __default__ = {
|
|
|
16
16
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
17
|
...__default__,
|
|
18
18
|
props: badge.badgeProps,
|
|
19
|
-
setup(__props) {
|
|
19
|
+
setup(__props, { expose }) {
|
|
20
20
|
const props = __props;
|
|
21
21
|
const ns = index.useNamespace("badge");
|
|
22
22
|
const content = vue.computed(() => {
|
|
@@ -27,6 +27,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
27
|
}
|
|
28
28
|
return `${props.value}`;
|
|
29
29
|
});
|
|
30
|
+
expose({
|
|
31
|
+
content
|
|
32
|
+
});
|
|
30
33
|
return (_ctx, _cache) => {
|
|
31
34
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
32
35
|
class: vue.normalizeClass(vue.unref(ns).b())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge2.js","sources":["../../../../../../packages/components/badge/src/badge.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <slot></slot>\n <transition :name=\"`${ns.namespace.value}-zoom-in-center`\">\n <sup\n v-show=\"!hidden && (content || content === '0' || 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 </sup>\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</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA+BA;AAEA
|
|
1
|
+
{"version":3,"file":"badge2.js","sources":["../../../../../../packages/components/badge/src/badge.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <slot></slot>\n <transition :name=\"`${ns.namespace.value}-zoom-in-center`\">\n <sup\n v-show=\"!hidden && (content || content === '0' || 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 </sup>\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":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA+BA;AAEA;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -57,7 +57,6 @@ export declare const ElButton: import("element-plus/es/utils").SFCWithInstall<im
|
|
|
57
57
|
_type: import("vue").ComputedRef<"default" | "" | "primary" | "success" | "warning" | "info" | "danger" | "text">;
|
|
58
58
|
autoInsertSpace: import("vue").ComputedRef<import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>>;
|
|
59
59
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
60
|
-
typeColor: import("vue").ComputedRef<string>;
|
|
61
60
|
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
62
61
|
handleClick: (evt: MouseEvent) => void;
|
|
63
62
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -128,6 +127,12 @@ export declare const ElButton: import("element-plus/es/utils").SFCWithInstall<im
|
|
|
128
127
|
readonly size: import("element-plus/es/utils").BuildPropReturn<StringConstructor, never, false, "default" | "small" | "large", never>;
|
|
129
128
|
readonly type: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
130
129
|
}, {
|
|
130
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
131
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<StringConstructor, never, false, "default" | "small" | "large", never>;
|
|
132
|
+
readonly type: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
133
|
+
}>> & {
|
|
134
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
135
|
+
}>>;
|
|
131
136
|
ns: {
|
|
132
137
|
namespace: import("vue").ComputedRef<string>;
|
|
133
138
|
b: (blockSuffix?: string) => string;
|
|
@@ -154,6 +159,12 @@ export declare const ElButtonGroup: import("element-plus/es/utils").SFCWithInsta
|
|
|
154
159
|
readonly size: import("element-plus/es/utils").BuildPropReturn<StringConstructor, never, false, "default" | "small" | "large", never>;
|
|
155
160
|
readonly type: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
156
161
|
}, {
|
|
162
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
163
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<StringConstructor, never, false, "default" | "small" | "large", never>;
|
|
164
|
+
readonly type: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
165
|
+
}>> & {
|
|
166
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
167
|
+
}>>;
|
|
157
168
|
ns: {
|
|
158
169
|
namespace: import("vue").ComputedRef<string>;
|
|
159
170
|
b: (blockSuffix?: string) => string;
|
|
@@ -2,6 +2,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2
2
|
readonly size: import("../../../utils").BuildPropReturn<StringConstructor, never, false, "default" | "small" | "large", never>;
|
|
3
3
|
readonly type: import("../../../utils").BuildPropReturn<StringConstructor, "", unknown, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
4
4
|
}, {
|
|
5
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
readonly size: import("../../../utils").BuildPropReturn<StringConstructor, never, false, "default" | "small" | "large", never>;
|
|
7
|
+
readonly type: import("../../../utils").BuildPropReturn<StringConstructor, "", unknown, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
8
|
+
}>> & {
|
|
9
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
10
|
+
}>>;
|
|
5
11
|
ns: {
|
|
6
12
|
namespace: import("vue").ComputedRef<string>;
|
|
7
13
|
b: (blockSuffix?: string) => string;
|
|
@@ -6,32 +6,31 @@ var vue = require('vue');
|
|
|
6
6
|
require('../../../tokens/index.js');
|
|
7
7
|
require('../../../hooks/index.js');
|
|
8
8
|
var buttonGroup = require('./button-group.js');
|
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
9
|
var button = require('../../../tokens/button.js');
|
|
11
10
|
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
11
|
|
|
13
|
-
const
|
|
14
|
-
name: "ElButtonGroup"
|
|
12
|
+
const __default__ = {
|
|
13
|
+
name: "ElButtonGroup"
|
|
14
|
+
};
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
16
|
+
...__default__,
|
|
15
17
|
props: buttonGroup.buttonGroupProps,
|
|
16
|
-
setup(
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const props = __props;
|
|
17
20
|
vue.provide(button.buttonGroupContextKey, vue.reactive({
|
|
18
21
|
size: vue.toRef(props, "size"),
|
|
19
22
|
type: vue.toRef(props, "type")
|
|
20
23
|
}));
|
|
21
24
|
const ns = index.useNamespace("button");
|
|
22
|
-
return {
|
|
23
|
-
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
27
|
+
class: vue.normalizeClass(`${vue.unref(ns).b("group")}`)
|
|
28
|
+
}, [
|
|
29
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
30
|
+
], 2);
|
|
24
31
|
};
|
|
25
32
|
}
|
|
26
33
|
});
|
|
27
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
28
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
29
|
-
class: vue.normalizeClass(`${_ctx.ns.b("group")}`)
|
|
30
|
-
}, [
|
|
31
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
32
|
-
], 2);
|
|
33
|
-
}
|
|
34
|
-
var ButtonGroup = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render]]);
|
|
35
34
|
|
|
36
|
-
exports["default"] =
|
|
35
|
+
exports["default"] = _sfc_main;
|
|
37
36
|
//# sourceMappingURL=button-group2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group2.js","sources":["../../../../../../packages/components/button/src/button-group.vue"],"sourcesContent":["<template>\n <div :class=\"`${ns.b('group')}`\">\n <slot></slot>\n </div>\n</template>\n<script lang=\"ts\">\nimport {
|
|
1
|
+
{"version":3,"file":"button-group2.js","sources":["../../../../../../packages/components/button/src/button-group.vue"],"sourcesContent":["<template>\n <div :class=\"`${ns.b('group')}`\">\n <slot></slot>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { provide, reactive, toRef } from 'vue'\nimport { buttonGroupContextKey } from '@element-plus/tokens'\nimport { useNamespace } from '@element-plus/hooks'\nimport { buttonGroupProps } from './button-group'\n\ndefineOptions({\n name: 'ElButtonGroup',\n})\nconst props = defineProps(buttonGroupProps)\nprovide(\n buttonGroupContextKey,\n reactive({\n size: toRef(props, 'size'),\n type: toRef(props, 'type'),\n })\n)\nconst ns = useNamespace('button')\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAeA;;;;AAOA;;;;;;;;;;;;;"}
|
|
@@ -57,7 +57,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
57
57
|
_type: import("vue").ComputedRef<"default" | "" | "primary" | "success" | "warning" | "info" | "danger" | "text">;
|
|
58
58
|
autoInsertSpace: import("vue").ComputedRef<import("../../../utils").BuildPropType<BooleanConstructor, unknown, unknown>>;
|
|
59
59
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
60
|
-
typeColor: import("vue").ComputedRef<string>;
|
|
61
60
|
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
62
61
|
handleClick: (evt: MouseEvent) => void;
|
|
63
62
|
ElIcon: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
-
var core = require('@vueuse/core');
|
|
7
6
|
var tinycolor = require('@ctrl/tinycolor');
|
|
8
7
|
var index$4 = require('../../icon/index.js');
|
|
9
8
|
require('../../../hooks/index.js');
|
|
@@ -50,13 +49,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
50
49
|
}
|
|
51
50
|
return false;
|
|
52
51
|
});
|
|
53
|
-
const typeColor = vue.computed(() => core.useCssVar(`--el-color-${props.type}`).value);
|
|
54
52
|
const buttonStyle = vue.computed(() => {
|
|
55
53
|
let styles = {};
|
|
56
|
-
const buttonColor = props.color
|
|
54
|
+
const buttonColor = props.color;
|
|
57
55
|
if (buttonColor) {
|
|
58
56
|
const color = new tinycolor.TinyColor(buttonColor);
|
|
59
|
-
const shadeBgColor = color.shade(
|
|
57
|
+
const shadeBgColor = color.shade(20).toString();
|
|
60
58
|
if (props.plain) {
|
|
61
59
|
styles = {
|
|
62
60
|
"--el-button-bg-color": color.tint(90).toString(),
|
|
@@ -69,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
69
67
|
"--el-button-active-border-color": shadeBgColor
|
|
70
68
|
};
|
|
71
69
|
} else {
|
|
72
|
-
const tintBgColor = color.tint(
|
|
70
|
+
const tintBgColor = color.tint(30).toString();
|
|
73
71
|
styles = {
|
|
74
72
|
"--el-button-bg-color": buttonColor,
|
|
75
73
|
"--el-button-border-color": buttonColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button2.js","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <button\n ref=\"_ref\"\n :class=\"[\n ns.b(),\n ns.m(_type),\n ns.m(_size),\n ns.is('disabled', _disabled),\n ns.is('loading', loading),\n ns.is('plain', plain),\n ns.is('round', round),\n ns.is('circle', circle),\n ]\"\n :disabled=\"_disabled || loading\"\n :autofocus=\"autofocus\"\n :type=\"nativeType\"\n :style=\"buttonStyle\"\n @click=\"handleClick\"\n >\n <template v-if=\"loading\">\n <slot v-if=\"$slots.loading\" name=\"loading\"></slot>\n <el-icon v-else :class=\"ns.is('loading')\">\n <component :is=\"loadingIcon\" />\n </el-icon>\n </template>\n <el-icon v-else-if=\"icon\">\n <component :is=\"icon\" />\n </el-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ [ns.em('text', 'expand')]: shouldAddSpace }\"\n >\n <slot></slot>\n </span>\n </button>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, Text, ref, useSlots } from 'vue'\nimport {
|
|
1
|
+
{"version":3,"file":"button2.js","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <button\n ref=\"_ref\"\n :class=\"[\n ns.b(),\n ns.m(_type),\n ns.m(_size),\n ns.is('disabled', _disabled),\n ns.is('loading', loading),\n ns.is('plain', plain),\n ns.is('round', round),\n ns.is('circle', circle),\n ]\"\n :disabled=\"_disabled || loading\"\n :autofocus=\"autofocus\"\n :type=\"nativeType\"\n :style=\"buttonStyle\"\n @click=\"handleClick\"\n >\n <template v-if=\"loading\">\n <slot v-if=\"$slots.loading\" name=\"loading\"></slot>\n <el-icon v-else :class=\"ns.is('loading')\">\n <component :is=\"loadingIcon\" />\n </el-icon>\n </template>\n <el-icon v-else-if=\"icon\">\n <component :is=\"icon\" />\n </el-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ [ns.em('text', 'expand')]: shouldAddSpace }\"\n >\n <slot></slot>\n </span>\n </button>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, Text, ref, useSlots } from 'vue'\nimport { TinyColor } from '@ctrl/tinycolor'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useDisabled,\n useFormItem,\n useGlobalConfig,\n useNamespace,\n useSize,\n} from '@element-plus/hooks'\nimport { buttonGroupContextKey } from '@element-plus/tokens'\nimport { buttonEmits, buttonProps } from './button'\n\ndefineOptions({\n name: 'ElButton',\n})\n\nconst props = defineProps(buttonProps)\nconst emit = defineEmits(buttonEmits)\nconst slots = useSlots()\n\nconst buttonGroupContext = inject(buttonGroupContextKey, undefined)\nconst globalConfig = useGlobalConfig('button')\nconst ns = useNamespace('button')\nconst { form } = useFormItem()\nconst _size = useSize(computed(() => buttonGroupContext?.size))\nconst _disabled = useDisabled()\nconst _ref = ref<HTMLButtonElement>()\n\nconst _type = computed(() => props.type || buttonGroupContext?.type || '')\nconst autoInsertSpace = computed(\n () => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false\n)\n\n// add space between two characters in Chinese\nconst shouldAddSpace = computed(() => {\n const defaultSlot = slots.default?.()\n if (autoInsertSpace.value && defaultSlot?.length === 1) {\n const slot = defaultSlot[0]\n if (slot?.type === Text) {\n const text = slot.children\n return /^\\p{Unified_Ideograph}{2}$/u.test(text as string)\n }\n }\n return false\n})\n\n// calculate hover & active color by custom color\n// only work when custom color\nconst buttonStyle = computed(() => {\n let styles: Record<string, string> = {}\n\n const buttonColor = props.color\n\n if (buttonColor) {\n const color = new TinyColor(buttonColor)\n const shadeBgColor = color.shade(20).toString()\n if (props.plain) {\n styles = {\n '--el-button-bg-color': color.tint(90).toString(),\n '--el-button-text-color': buttonColor,\n '--el-button-hover-text-color': 'var(--el-color-white)',\n '--el-button-hover-bg-color': buttonColor,\n '--el-button-hover-border-color': buttonColor,\n '--el-button-active-bg-color': shadeBgColor,\n '--el-button-active-text-color': 'var(--el-color-white)',\n '--el-button-active-border-color': shadeBgColor,\n }\n } else {\n const tintBgColor = color.tint(30).toString()\n styles = {\n '--el-button-bg-color': buttonColor,\n '--el-button-border-color': buttonColor,\n '--el-button-hover-bg-color': tintBgColor,\n '--el-button-hover-border-color': tintBgColor,\n '--el-button-active-bg-color': shadeBgColor,\n '--el-button-active-border-color': shadeBgColor,\n }\n }\n\n if (_disabled.value) {\n const disabledButtonColor = color.tint(50).toString()\n styles['--el-button-disabled-bg-color'] = disabledButtonColor\n styles['--el-button-disabled-border-color'] = disabledButtonColor\n }\n }\n\n return styles\n})\n\nconst handleClick = (evt: MouseEvent) => {\n if (props.nativeType === 'reset') {\n form?.resetFields()\n }\n emit('click', evt)\n}\n\ndefineExpose({\n /** @description button html element */\n ref: _ref,\n /** @description button size */\n size: _size,\n /** @description button type */\n type: _type,\n /** @description button disabled */\n disabled: _disabled,\n /** @description whether adding space */\n shouldAddSpace,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAKA;;;;;;;;;;;AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA;;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|