@element-plus/nightly 0.0.20260105 → 0.0.20260107
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/dist/index.full.js +43 -10
- package/dist/index.full.min.js +16 -16
- 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 +43 -10
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +39 -135
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +145 -39
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +59 -485
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +485 -59
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-button.mjs +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +1 -1
- package/es/components/checkbox/src/checkbox.mjs +134 -62
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox2.mjs +62 -134
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +83 -20
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +20 -83
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.mjs +38 -112
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +112 -38
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/dialog2.mjs +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +31 -225
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +225 -31
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +80 -10
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +10 -80
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/form/src/form-item.vue.d.ts +4 -0
- package/es/components/form/src/form-item2.mjs +8 -3
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.vue.d.ts +4 -0
- package/es/components/form/src/form2.mjs +26 -1
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/form/src/types.d.ts +2 -0
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +39 -7
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +7 -39
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +279 -68
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +68 -279
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +23 -23
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +414 -73
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +73 -414
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/input-tag/index.mjs +2 -2
- package/es/components/input-tag/src/input-tag.mjs +344 -82
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag2.mjs +82 -344
- package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +80 -24
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +24 -80
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown.mjs +205 -14
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +14 -205
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +174 -72
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +72 -174
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +149 -15
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +15 -149
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +163 -49
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +49 -163
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/arrow.mjs +38 -7
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +7 -38
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/popper/src/content.mjs +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +295 -85
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +85 -295
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +244 -56
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +56 -244
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/index.mjs +2 -2
- package/es/components/select/src/select.mjs +728 -152
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select2.mjs +152 -728
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton.mjs +67 -17
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +17 -67
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/splitter/index.mjs +2 -2
- package/es/components/splitter/src/splitter.mjs +14 -114
- package/es/components/splitter/src/splitter.mjs.map +1 -1
- package/es/components/splitter/src/splitter2.mjs +114 -14
- package/es/components/splitter/src/splitter2.mjs.map +1 -1
- package/es/components/table/src/store/current.mjs +2 -4
- package/es/components/table/src/store/current.mjs.map +1 -1
- package/es/components/table-v2/src/components/expand-icon.d.ts +11 -8
- package/es/components/table-v2/src/components/expand-icon.mjs +1 -0
- package/es/components/table-v2/src/components/expand-icon.mjs.map +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +131 -26
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +26 -131
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tour/src/tour2.mjs +2 -1
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/transfer/index.mjs +2 -2
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +173 -20
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +20 -173
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer.mjs +203 -69
- package/es/components/transfer/src/transfer.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +69 -203
- package/es/components/transfer/src/transfer2.mjs.map +1 -1
- package/es/components/tree-select/src/tree-select.mjs +1 -1
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/index.mjs +23 -23
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +40 -134
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +144 -40
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +58 -483
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +483 -58
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-button.js +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +1 -1
- package/lib/components/checkbox/src/checkbox.js +134 -63
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox2.js +63 -134
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +83 -21
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +21 -83
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.js +38 -111
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +111 -38
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dialog/src/dialog2.js +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +32 -225
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +225 -32
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +80 -10
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +10 -80
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/form/src/form-item.vue.d.ts +4 -0
- package/lib/components/form/src/form-item2.js +8 -3
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.vue.d.ts +4 -0
- package/lib/components/form/src/form2.js +26 -1
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/form/src/types.d.ts +2 -0
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +39 -7
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +7 -39
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +278 -68
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +68 -278
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +23 -23
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +412 -72
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +72 -412
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/input-tag/index.js +2 -2
- package/lib/components/input-tag/src/input-tag.js +342 -81
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag2.js +81 -342
- package/lib/components/input-tag/src/input-tag2.js.map +1 -1
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +80 -25
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +25 -80
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown.js +205 -15
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +15 -205
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +173 -73
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +73 -173
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +149 -16
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +16 -149
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +163 -50
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +50 -163
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/arrow.js +38 -8
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +8 -38
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/popper/src/content.js +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +294 -85
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +85 -294
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +244 -57
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +57 -244
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/index.js +2 -2
- package/lib/components/select/src/select.js +727 -152
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select2.js +152 -727
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton.js +67 -17
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +17 -67
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/splitter/index.js +2 -2
- package/lib/components/splitter/src/splitter.js +15 -114
- package/lib/components/splitter/src/splitter.js.map +1 -1
- package/lib/components/splitter/src/splitter2.js +114 -15
- package/lib/components/splitter/src/splitter2.js.map +1 -1
- package/lib/components/table/src/store/current.js +2 -4
- package/lib/components/table/src/store/current.js.map +1 -1
- package/lib/components/table-v2/src/components/expand-icon.d.ts +11 -8
- package/lib/components/table-v2/src/components/expand-icon.js +1 -0
- package/lib/components/table-v2/src/components/expand-icon.js.map +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +131 -27
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +27 -131
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tour/src/tour2.js +2 -1
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/transfer/index.js +2 -2
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +173 -22
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +22 -173
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer.js +203 -73
- package/lib/components/transfer/src/transfer.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +73 -203
- package/lib/components/transfer/src/transfer2.js.map +1 -1
- package/lib/components/tree-select/src/tree-select.js +1 -1
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/index.js +23 -23
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1,19 +1,119 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, toRef, getCurrentInstance, watch, computed, provide, reactive, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, renderSlot, createVNode, createCommentVNode, nextTick } from 'vue';
|
|
2
|
+
import { splitterProps, splitterEmits } from './splitter.mjs';
|
|
3
|
+
import { splitterRootContextKey } from './type.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useContainer } from './hooks/useContainer.mjs';
|
|
6
|
+
import { useSize } from './hooks/useSize.mjs';
|
|
7
|
+
import { useResize } from './hooks/useResize.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
+
import { useOrderedChildren } from '../../../hooks/use-ordered-children/index.mjs';
|
|
2
10
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
default: "horizontal",
|
|
7
|
-
values: ["horizontal", "vertical"]
|
|
11
|
+
const _sfc_main = defineComponent({
|
|
12
|
+
...{
|
|
13
|
+
name: "ElSplitter"
|
|
8
14
|
},
|
|
9
|
-
|
|
15
|
+
__name: "splitter",
|
|
16
|
+
props: splitterProps,
|
|
17
|
+
emits: splitterEmits,
|
|
18
|
+
setup(__props, { emit: __emit }) {
|
|
19
|
+
const ns = useNamespace("splitter");
|
|
20
|
+
const emits = __emit;
|
|
21
|
+
const props = __props;
|
|
22
|
+
const layout = toRef(props, "layout");
|
|
23
|
+
const lazy = toRef(props, "lazy");
|
|
24
|
+
const { containerEl, containerSize } = useContainer(layout);
|
|
25
|
+
const {
|
|
26
|
+
removeChild: unregisterPanel,
|
|
27
|
+
children: panels,
|
|
28
|
+
addChild: registerPanel,
|
|
29
|
+
ChildrenSorter: PanelsSorter
|
|
30
|
+
} = useOrderedChildren(getCurrentInstance(), "ElSplitterPanel");
|
|
31
|
+
watch(panels, () => {
|
|
32
|
+
movingIndex.value = null;
|
|
33
|
+
panels.value.forEach((instance, index) => {
|
|
34
|
+
instance.setIndex(index);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
const { percentSizes, pxSizes } = useSize(panels, containerSize);
|
|
38
|
+
const {
|
|
39
|
+
lazyOffset,
|
|
40
|
+
movingIndex,
|
|
41
|
+
onMoveStart,
|
|
42
|
+
onMoving,
|
|
43
|
+
onMoveEnd,
|
|
44
|
+
onCollapse
|
|
45
|
+
} = useResize(panels, containerSize, pxSizes, lazy);
|
|
46
|
+
const splitterStyles = computed(() => {
|
|
47
|
+
return {
|
|
48
|
+
[ns.cssVarBlockName("bar-offset")]: lazy.value ? `${lazyOffset.value}px` : void 0
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
const onResizeStart = (index) => {
|
|
52
|
+
onMoveStart(index);
|
|
53
|
+
emits("resizeStart", index, pxSizes.value);
|
|
54
|
+
};
|
|
55
|
+
const onResize = (index, offset) => {
|
|
56
|
+
onMoving(index, offset);
|
|
57
|
+
if (!lazy.value) {
|
|
58
|
+
emits("resize", index, pxSizes.value);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const onResizeEnd = async (index) => {
|
|
62
|
+
onMoveEnd();
|
|
63
|
+
await nextTick();
|
|
64
|
+
emits("resizeEnd", index, pxSizes.value);
|
|
65
|
+
};
|
|
66
|
+
const onCollapsible = (index, type) => {
|
|
67
|
+
onCollapse(index, type);
|
|
68
|
+
emits("collapse", index, type, pxSizes.value);
|
|
69
|
+
};
|
|
70
|
+
provide(
|
|
71
|
+
splitterRootContextKey,
|
|
72
|
+
reactive({
|
|
73
|
+
panels,
|
|
74
|
+
percentSizes,
|
|
75
|
+
pxSizes,
|
|
76
|
+
layout,
|
|
77
|
+
lazy,
|
|
78
|
+
movingIndex,
|
|
79
|
+
containerSize,
|
|
80
|
+
onMoveStart: onResizeStart,
|
|
81
|
+
onMoving: onResize,
|
|
82
|
+
onMoveEnd: onResizeEnd,
|
|
83
|
+
onCollapse: onCollapsible,
|
|
84
|
+
registerPanel,
|
|
85
|
+
unregisterPanel
|
|
86
|
+
})
|
|
87
|
+
);
|
|
88
|
+
return (_ctx, _cache) => {
|
|
89
|
+
return openBlock(), createElementBlock(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
ref_key: "containerEl",
|
|
93
|
+
ref: containerEl,
|
|
94
|
+
class: normalizeClass([unref(ns).b(), unref(ns).e(layout.value)]),
|
|
95
|
+
style: normalizeStyle(splitterStyles.value)
|
|
96
|
+
},
|
|
97
|
+
[
|
|
98
|
+
renderSlot(_ctx.$slots, "default"),
|
|
99
|
+
createVNode(unref(PanelsSorter)),
|
|
100
|
+
createCommentVNode(" Prevent iframe touch events from breaking "),
|
|
101
|
+
unref(movingIndex) ? (openBlock(), createElementBlock(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
key: 0,
|
|
105
|
+
class: normalizeClass([unref(ns).e("mask"), unref(ns).e(`mask-${layout.value}`)])
|
|
106
|
+
},
|
|
107
|
+
null,
|
|
108
|
+
2
|
|
109
|
+
)) : createCommentVNode("v-if", true)
|
|
110
|
+
],
|
|
111
|
+
6
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
10
115
|
});
|
|
11
|
-
|
|
12
|
-
resizeStart: (index, sizes) => true,
|
|
13
|
-
resize: (index, sizes) => true,
|
|
14
|
-
resizeEnd: (index, sizes) => true,
|
|
15
|
-
collapse: (index, type, sizes) => true
|
|
16
|
-
};
|
|
116
|
+
var Splitter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/splitter/src/splitter.vue"]]);
|
|
17
117
|
|
|
18
|
-
export {
|
|
118
|
+
export { Splitter as default };
|
|
19
119
|
//# sourceMappingURL=splitter2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitter2.mjs","sources":["../../../../../../packages/components/splitter/src/splitter.
|
|
1
|
+
{"version":3,"file":"splitter2.mjs","sources":["../../../../../../packages/components/splitter/src/splitter.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n computed,\n getCurrentInstance,\n nextTick,\n provide,\n reactive,\n toRef,\n watch,\n} from 'vue'\nimport { useNamespace, useOrderedChildren } from '@element-plus/hooks'\nimport { useContainer, useResize, useSize } from './hooks'\nimport { splitterEmits, splitterProps } from './splitter'\nimport { splitterRootContextKey } from './type'\n\nimport type { PanelItemState } from './type'\n\nconst ns = useNamespace('splitter')\n\ndefineOptions({\n name: 'ElSplitter',\n})\n\nconst emits = defineEmits(splitterEmits)\n\nconst props = defineProps(splitterProps)\nconst layout = toRef(props, 'layout')\nconst lazy = toRef(props, 'lazy')\n\nconst { containerEl, containerSize } = useContainer(layout)\n\nconst {\n removeChild: unregisterPanel,\n children: panels,\n addChild: registerPanel,\n ChildrenSorter: PanelsSorter,\n} = useOrderedChildren<PanelItemState>(getCurrentInstance()!, 'ElSplitterPanel')\n\nwatch(panels, () => {\n movingIndex.value = null\n panels.value.forEach((instance: PanelItemState, index: number) => {\n instance.setIndex(index)\n })\n})\n\nconst { percentSizes, pxSizes } = useSize(panels, containerSize)\n\nconst {\n lazyOffset,\n movingIndex,\n onMoveStart,\n onMoving,\n onMoveEnd,\n onCollapse,\n} = useResize(panels, containerSize, pxSizes, lazy)\n\nconst splitterStyles = computed(() => {\n return {\n [ns.cssVarBlockName('bar-offset')]: lazy.value\n ? `${lazyOffset.value}px`\n : undefined,\n }\n})\n\nconst onResizeStart = (index: number) => {\n onMoveStart(index)\n emits('resizeStart', index, pxSizes.value)\n}\n\nconst onResize = (index: number, offset: number) => {\n onMoving(index, offset)\n\n if (!lazy.value) {\n emits('resize', index, pxSizes.value)\n }\n}\n\nconst onResizeEnd = async (index: number) => {\n onMoveEnd()\n await nextTick()\n emits('resizeEnd', index, pxSizes.value)\n}\n\nconst onCollapsible = (index: number, type: 'start' | 'end') => {\n onCollapse(index, type)\n emits('collapse', index, type, pxSizes.value)\n}\n\nprovide(\n splitterRootContextKey,\n reactive({\n panels,\n percentSizes,\n pxSizes,\n layout,\n lazy,\n movingIndex,\n containerSize,\n onMoveStart: onResizeStart,\n onMoving: onResize,\n onMoveEnd: onResizeEnd,\n onCollapse: onCollapsible,\n registerPanel,\n unregisterPanel,\n })\n)\n</script>\n\n<template>\n <div\n ref=\"containerEl\"\n :class=\"[ns.b(), ns.e(layout)]\"\n :style=\"splitterStyles\"\n >\n <slot />\n <panels-sorter />\n <!-- Prevent iframe touch events from breaking -->\n <div v-if=\"movingIndex\" :class=\"[ns.e('mask'), ns.e(`mask-${layout}`)]\" />\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","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|
|
4
3
|
|
|
5
4
|
function useCurrent(watcherData) {
|
|
@@ -17,6 +16,7 @@ function useCurrent(watcherData) {
|
|
|
17
16
|
const setCurrentRowByKey = (key) => {
|
|
18
17
|
var _a;
|
|
19
18
|
const { data, rowKey } = watcherData;
|
|
19
|
+
const oldCurrentRow = currentRow.value;
|
|
20
20
|
let _currentRow = null;
|
|
21
21
|
if (rowKey.value) {
|
|
22
22
|
_currentRow = (_a = (unref(data) || []).find(
|
|
@@ -24,7 +24,7 @@ function useCurrent(watcherData) {
|
|
|
24
24
|
)) != null ? _a : null;
|
|
25
25
|
}
|
|
26
26
|
currentRow.value = _currentRow != null ? _currentRow : null;
|
|
27
|
-
instance.emit("current-change", currentRow.value,
|
|
27
|
+
instance.emit("current-change", currentRow.value, oldCurrentRow);
|
|
28
28
|
};
|
|
29
29
|
const updateCurrentRow = (_currentRow) => {
|
|
30
30
|
const oldCurrentRow = currentRow.value;
|
|
@@ -48,8 +48,6 @@ function useCurrent(watcherData) {
|
|
|
48
48
|
setCurrentRowByKey(currentRowKey);
|
|
49
49
|
} else {
|
|
50
50
|
currentRow.value = null;
|
|
51
|
-
}
|
|
52
|
-
if (isNull(currentRow.value)) {
|
|
53
51
|
instance.emit("current-change", null, oldCurrentRow);
|
|
54
52
|
}
|
|
55
53
|
} else if (_currentRowKey.value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"current.mjs","sources":["../../../../../../../packages/components/table/src/store/current.ts"],"sourcesContent":["import { getCurrentInstance, ref, unref } from 'vue'\nimport {
|
|
1
|
+
{"version":3,"file":"current.mjs","sources":["../../../../../../../packages/components/table/src/store/current.ts"],"sourcesContent":["import { getCurrentInstance, ref, unref } from 'vue'\nimport { getRowIdentity } from '../util'\n\nimport type { Ref } from 'vue'\nimport type { DefaultRow, Table } from '../table/defaults'\nimport type { WatcherPropsData } from '.'\n\nfunction useCurrent<T extends DefaultRow>(watcherData: WatcherPropsData<T>) {\n const instance = getCurrentInstance() as Table<T>\n const _currentRowKey: Ref<string | null> = ref(null)\n const currentRow: Ref<T | null> = ref(null)\n\n const setCurrentRowKey = (key: string) => {\n instance.store.assertRowKey()\n _currentRowKey.value = key\n setCurrentRowByKey(key)\n }\n\n const restoreCurrentRowKey = () => {\n _currentRowKey.value = null\n }\n\n const setCurrentRowByKey = (key: string) => {\n const { data, rowKey } = watcherData\n const oldCurrentRow = currentRow.value\n let _currentRow: T | null = null\n if (rowKey.value) {\n _currentRow =\n (unref(data) || []).find(\n (item) => getRowIdentity(item, rowKey.value) === key\n ) ?? null\n }\n currentRow.value = _currentRow ?? null\n instance.emit('current-change', currentRow.value, oldCurrentRow)\n }\n\n const updateCurrentRow = (_currentRow: T) => {\n const oldCurrentRow = currentRow.value\n if (_currentRow && _currentRow !== oldCurrentRow) {\n currentRow.value = _currentRow\n instance.emit('current-change', currentRow.value, oldCurrentRow)\n return\n }\n if (!_currentRow && oldCurrentRow) {\n currentRow.value = null\n instance.emit('current-change', null, oldCurrentRow)\n }\n }\n\n const updateCurrentRowData = () => {\n const rowKey = watcherData.rowKey.value\n // data 为 null 时,解构时的默认值会被忽略\n const data = watcherData.data.value || []\n const oldCurrentRow = currentRow.value\n // 当 currentRow 不在 data 中时尝试更新数据\n if (oldCurrentRow && !data.includes(oldCurrentRow)) {\n if (rowKey) {\n const currentRowKey = getRowIdentity(oldCurrentRow, rowKey)\n setCurrentRowByKey(currentRowKey)\n } else {\n currentRow.value = null\n instance.emit('current-change', null, oldCurrentRow)\n }\n } else if (_currentRowKey.value) {\n // 把初始时下设置的 rowKey 转化成 rowData\n setCurrentRowByKey(_currentRowKey.value)\n restoreCurrentRowKey()\n }\n }\n\n return {\n setCurrentRowKey,\n restoreCurrentRowKey,\n setCurrentRowByKey,\n updateCurrentRow,\n updateCurrentRowData,\n states: {\n _currentRowKey,\n currentRow,\n },\n }\n}\n\nexport default useCurrent\n"],"names":[],"mappings":";;;AAOA,SAAS,WAAiC,WAAkC,EAAA;AAC1E,EAAA,MAA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A,EAAO,OAAA;AAAA,IACL,gBAAA;AAAA,IACA,oBAAA;AAAA,IACA,kBAAA;AAAA,IACA,gBAAA;AAAA,IACA,oBAAA;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,cAAA;AAAA,MACA,UAAA;AAAA,KACF;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { StyleValue } from 'vue';
|
|
2
2
|
import type { TableV2RowCellRenderParam } from './row';
|
|
3
|
-
declare const ExpandIcon:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
declare const ExpandIcon: {
|
|
4
|
+
(props: TableV2RowCellRenderParam["expandIconProps"] & {
|
|
5
|
+
class?: string | string[];
|
|
6
|
+
style: StyleValue;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
size: number;
|
|
9
|
+
expanded: boolean;
|
|
10
|
+
expandable: boolean;
|
|
11
|
+
}): import("vue/jsx-runtime").JSX.Element;
|
|
12
|
+
inheritAttrs: boolean;
|
|
13
|
+
};
|
|
11
14
|
export default ExpandIcon;
|
|
12
15
|
export type ExpandIconInstance = ReturnType<typeof ExpandIcon>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand-icon.mjs","sources":["../../../../../../../packages/components/table-v2/src/components/expand-icon.tsx"],"sourcesContent":["import ElIcon from '@element-plus/components/icon'\nimport { ArrowRight } from '@element-plus/icons-vue'\n\nimport type { StyleValue } from 'vue'\nimport type { TableV2RowCellRenderParam } from './row'\n\nconst ExpandIcon = (\n props: TableV2RowCellRenderParam['expandIconProps'] & {\n class?: string | string[]\n style: StyleValue\n ariaLabel?: string\n size: number\n expanded: boolean\n expandable: boolean\n }\n) => {\n const { expanded, expandable, onExpand, style, size, ariaLabel } = props\n\n const expandIconProps = {\n onClick: expandable ? () => onExpand(!expanded) : undefined,\n ariaLabel,\n ariaExpanded: expanded,\n class: props.class,\n } as any\n\n return (\n <button {...expandIconProps} type=\"button\">\n <ElIcon size={size} style={style}>\n <ArrowRight />\n </ElIcon>\n </button>\n )\n}\n\nexport default ExpandIcon\n\nexport type ExpandIconInstance = ReturnType<typeof ExpandIcon>\n"],"names":["ExpandIcon","props","expanded","expandable","onExpand","style","size","ariaLabel","expandIconProps","onClick","undefined","ariaExpanded","class","_createVNode","_mergeProps","ElIcon","default","ArrowRight"],"mappings":";;;;AAMA,MAAMA,aACJC,CAQG,KAAA,KAAA;AACH,EAAM,MAAA;AAAA,IAAEC,QAAAA;AAAAA,IAAUC,UAAAA;AAAAA,IAAYC,QAAAA;AAAAA,IAAUC,KAAAA;AAAAA,IAAOC,IAAAA;AAAAA,IAAMC,SAAAA;AAAAA,GAAcN,GAAAA,KAAAA,CAAAA;AAEnE,EAAA,MAAMO,eAAkB,GAAA;AAAA,IACtBC,SAASN,UAAa,GAAA,MAAMC,QAAS,CAAA,CAACF,QAAQ,CAAIQ,GAAAA,KAAAA,CAAAA;AAAAA,IAClDH,SAAAA;AAAAA,IACAI,YAAcT,EAAAA,QAAAA;AAAAA,IACdU,OAAOX,KAAMW,CAAAA,KAAAA;AAAAA,GACf,CAAA;AAEA,EAAAC,OAAAA,WAAAA,CAAA,QAAAC,EAAAA,UAAAA,CACcN,eAAe,EAAA;AAAA,IAAA,MAAA,EAAA,QAAA;AAAA,GAAAK,CAAAA,EAAAA,CAAAA,WAAAA,CAAAE,MAAA,EAAA;AAAA,IAAA,MACXT,EAAAA,IAAAA;AAAAA,IAAI,OAASD,EAAAA,KAAAA;AAAAA,GAAK,EAAA;AAAA,IAAAW,SAAAA,MAAAH,CAAAA,YAAAI,UAAA,EAAA,IAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA,CAAA,CAAA,CAAA,CAAA;AAKtC,CAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"expand-icon.mjs","sources":["../../../../../../../packages/components/table-v2/src/components/expand-icon.tsx"],"sourcesContent":["import ElIcon from '@element-plus/components/icon'\nimport { ArrowRight } from '@element-plus/icons-vue'\n\nimport type { StyleValue } from 'vue'\nimport type { TableV2RowCellRenderParam } from './row'\n\nconst ExpandIcon = (\n props: TableV2RowCellRenderParam['expandIconProps'] & {\n class?: string | string[]\n style: StyleValue\n ariaLabel?: string\n size: number\n expanded: boolean\n expandable: boolean\n }\n) => {\n const { expanded, expandable, onExpand, style, size, ariaLabel } = props\n\n const expandIconProps = {\n onClick: expandable ? () => onExpand(!expanded) : undefined,\n ariaLabel,\n ariaExpanded: expanded,\n class: props.class,\n } as any\n\n return (\n <button {...expandIconProps} type=\"button\">\n <ElIcon size={size} style={style}>\n <ArrowRight />\n </ElIcon>\n </button>\n )\n}\n\nExpandIcon.inheritAttrs = false\n\nexport default ExpandIcon\n\nexport type ExpandIconInstance = ReturnType<typeof ExpandIcon>\n"],"names":["ExpandIcon","props","expanded","expandable","onExpand","style","size","ariaLabel","expandIconProps","onClick","undefined","ariaExpanded","class","_createVNode","_mergeProps","ElIcon","default","ArrowRight","inheritAttrs"],"mappings":";;;;AAMA,MAAMA,aACJC,CAQG,KAAA,KAAA;AACH,EAAM,MAAA;AAAA,IAAEC,QAAAA;AAAAA,IAAUC,UAAAA;AAAAA,IAAYC,QAAAA;AAAAA,IAAUC,KAAAA;AAAAA,IAAOC,IAAAA;AAAAA,IAAMC,SAAAA;AAAAA,GAAcN,GAAAA,KAAAA,CAAAA;AAEnE,EAAA,MAAMO,eAAkB,GAAA;AAAA,IACtBC,SAASN,UAAa,GAAA,MAAMC,QAAS,CAAA,CAACF,QAAQ,CAAIQ,GAAAA,KAAAA,CAAAA;AAAAA,IAClDH,SAAAA;AAAAA,IACAI,YAAcT,EAAAA,QAAAA;AAAAA,IACdU,OAAOX,KAAMW,CAAAA,KAAAA;AAAAA,GACf,CAAA;AAEA,EAAAC,OAAAA,WAAAA,CAAA,QAAAC,EAAAA,UAAAA,CACcN,eAAe,EAAA;AAAA,IAAA,MAAA,EAAA,QAAA;AAAA,GAAAK,CAAAA,EAAAA,CAAAA,WAAAA,CAAAE,MAAA,EAAA;AAAA,IAAA,MACXT,EAAAA,IAAAA;AAAAA,IAAI,OAASD,EAAAA,KAAAA;AAAAA,GAAK,EAAA;AAAA,IAAAW,SAAAA,MAAAH,CAAAA,YAAAI,UAAA,EAAA,IAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA,CAAA,CAAA,CAAA,CAAA;AAKtC,CAAA,CAAA;AAEAjB,UAAAA,CAAWkB,YAAe,GAAA,KAAA,CAAA;AAE1B,mBAAelB,UAAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Tag from './src/
|
|
2
|
-
export { tagEmits, tagProps } from './src/
|
|
1
|
+
import Tag from './src/tag.mjs';
|
|
2
|
+
export { tagEmits, tagProps } from './src/tag2.mjs';
|
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
4
4
|
|
|
5
5
|
const ElTag = withInstall(Tag);
|
|
@@ -1,31 +1,136 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, unref, renderSlot, withModifiers, createVNode, withCtx, createCommentVNode, createBlock, Transition } from 'vue';
|
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
3
|
+
import { Close } from '@element-plus/icons-vue';
|
|
4
|
+
import { tagProps, tagEmits } from './tag2.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
7
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
3
9
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
const _hoisted_1 = ["aria-label"];
|
|
11
|
+
const _hoisted_2 = ["aria-label"];
|
|
12
|
+
const _sfc_main = defineComponent({
|
|
13
|
+
...{
|
|
14
|
+
name: "ElTag"
|
|
9
15
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
__name: "tag",
|
|
17
|
+
props: tagProps,
|
|
18
|
+
emits: tagEmits,
|
|
19
|
+
setup(__props, { emit: __emit }) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const emit = __emit;
|
|
22
|
+
const tagSize = useFormSize();
|
|
23
|
+
const { t } = useLocale();
|
|
24
|
+
const ns = useNamespace("tag");
|
|
25
|
+
const containerKls = computed(() => {
|
|
26
|
+
const { type, hit, effect, closable, round } = props;
|
|
27
|
+
return [
|
|
28
|
+
ns.b(),
|
|
29
|
+
ns.is("closable", closable),
|
|
30
|
+
ns.m(type || "primary"),
|
|
31
|
+
ns.m(tagSize.value),
|
|
32
|
+
ns.m(effect),
|
|
33
|
+
ns.is("hit", hit),
|
|
34
|
+
ns.is("round", round)
|
|
35
|
+
];
|
|
36
|
+
});
|
|
37
|
+
const handleClose = (event) => {
|
|
38
|
+
emit("close", event);
|
|
39
|
+
};
|
|
40
|
+
const handleClick = (event) => {
|
|
41
|
+
emit("click", event);
|
|
42
|
+
};
|
|
43
|
+
const handleVNodeMounted = (vnode) => {
|
|
44
|
+
var _a, _b, _c;
|
|
45
|
+
if ((_c = (_b = (_a = vnode == null ? void 0 : vnode.component) == null ? void 0 : _a.subTree) == null ? void 0 : _b.component) == null ? void 0 : _c.bum) {
|
|
46
|
+
vnode.component.subTree.component.bum = null;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return (_ctx, _cache) => {
|
|
50
|
+
return _ctx.disableTransitions ? (openBlock(), createElementBlock(
|
|
51
|
+
"span",
|
|
52
|
+
{
|
|
53
|
+
key: 0,
|
|
54
|
+
class: normalizeClass(containerKls.value),
|
|
55
|
+
style: normalizeStyle({ backgroundColor: _ctx.color }),
|
|
56
|
+
onClick: handleClick
|
|
57
|
+
},
|
|
58
|
+
[
|
|
59
|
+
createElementVNode(
|
|
60
|
+
"span",
|
|
61
|
+
{
|
|
62
|
+
class: normalizeClass(unref(ns).e("content"))
|
|
63
|
+
},
|
|
64
|
+
[
|
|
65
|
+
renderSlot(_ctx.$slots, "default")
|
|
66
|
+
],
|
|
67
|
+
2
|
|
68
|
+
),
|
|
69
|
+
_ctx.closable ? (openBlock(), createElementBlock("button", {
|
|
70
|
+
key: 0,
|
|
71
|
+
"aria-label": unref(t)("el.tag.close"),
|
|
72
|
+
class: normalizeClass(unref(ns).e("close")),
|
|
73
|
+
type: "button",
|
|
74
|
+
onClick: withModifiers(handleClose, ["stop"])
|
|
75
|
+
}, [
|
|
76
|
+
createVNode(unref(ElIcon), null, {
|
|
77
|
+
default: withCtx(() => [
|
|
78
|
+
createVNode(unref(Close))
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
})
|
|
82
|
+
], 10, _hoisted_1)) : createCommentVNode("v-if", true)
|
|
83
|
+
],
|
|
84
|
+
6
|
|
85
|
+
)) : (openBlock(), createBlock(Transition, {
|
|
86
|
+
key: 1,
|
|
87
|
+
name: `${unref(ns).namespace.value}-zoom-in-center`,
|
|
88
|
+
appear: "",
|
|
89
|
+
onVnodeMounted: handleVNodeMounted
|
|
90
|
+
}, {
|
|
91
|
+
default: withCtx(() => [
|
|
92
|
+
createElementVNode(
|
|
93
|
+
"span",
|
|
94
|
+
{
|
|
95
|
+
class: normalizeClass(containerKls.value),
|
|
96
|
+
style: normalizeStyle({ backgroundColor: _ctx.color }),
|
|
97
|
+
onClick: handleClick
|
|
98
|
+
},
|
|
99
|
+
[
|
|
100
|
+
createElementVNode(
|
|
101
|
+
"span",
|
|
102
|
+
{
|
|
103
|
+
class: normalizeClass(unref(ns).e("content"))
|
|
104
|
+
},
|
|
105
|
+
[
|
|
106
|
+
renderSlot(_ctx.$slots, "default")
|
|
107
|
+
],
|
|
108
|
+
2
|
|
109
|
+
),
|
|
110
|
+
_ctx.closable ? (openBlock(), createElementBlock("button", {
|
|
111
|
+
key: 0,
|
|
112
|
+
"aria-label": unref(t)("el.tag.close"),
|
|
113
|
+
class: normalizeClass(unref(ns).e("close")),
|
|
114
|
+
type: "button",
|
|
115
|
+
onClick: withModifiers(handleClose, ["stop"])
|
|
116
|
+
}, [
|
|
117
|
+
createVNode(unref(ElIcon), null, {
|
|
118
|
+
default: withCtx(() => [
|
|
119
|
+
createVNode(unref(Close))
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
})
|
|
123
|
+
], 10, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
124
|
+
],
|
|
125
|
+
6
|
|
126
|
+
)
|
|
127
|
+
]),
|
|
128
|
+
_: 3
|
|
129
|
+
}, 8, ["name"]));
|
|
130
|
+
};
|
|
131
|
+
}
|
|
24
132
|
});
|
|
25
|
-
|
|
26
|
-
close: (evt) => evt instanceof MouseEvent,
|
|
27
|
-
click: (evt) => evt instanceof MouseEvent
|
|
28
|
-
};
|
|
133
|
+
var Tag = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);
|
|
29
134
|
|
|
30
|
-
export {
|
|
135
|
+
export { Tag as default };
|
|
31
136
|
//# sourceMappingURL=tag.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.mjs","sources":["../../../../../../packages/components/tag/src/tag.
|
|
1
|
+
{"version":3,"file":"tag.mjs","sources":["../../../../../../packages/components/tag/src/tag.vue"],"sourcesContent":["<template>\n <span\n v-if=\"disableTransitions\"\n :class=\"containerKls\"\n :style=\"{ backgroundColor: color }\"\n @click=\"handleClick\"\n >\n <span :class=\"ns.e('content')\">\n <slot />\n </span>\n <button\n v-if=\"closable\"\n :aria-label=\"t('el.tag.close')\"\n :class=\"ns.e('close')\"\n type=\"button\"\n @click.stop=\"handleClose\"\n >\n <el-icon>\n <Close />\n </el-icon>\n </button>\n </span>\n <transition\n v-else\n :name=\"`${ns.namespace.value}-zoom-in-center`\"\n appear\n @vue:mounted=\"handleVNodeMounted\"\n >\n <span\n :class=\"containerKls\"\n :style=\"{ backgroundColor: color }\"\n @click=\"handleClick\"\n >\n <span :class=\"ns.e('content')\">\n <slot />\n </span>\n <button\n v-if=\"closable\"\n :aria-label=\"t('el.tag.close')\"\n :class=\"ns.e('close')\"\n type=\"button\"\n @click.stop=\"handleClose\"\n >\n <el-icon>\n <Close />\n </el-icon>\n </button>\n </span>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport ElIcon from '@element-plus/components/icon'\nimport { Close } from '@element-plus/icons-vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport { tagEmits, tagProps } from './tag'\n\nimport type { VNode } from 'vue'\n\ndefineOptions({\n name: 'ElTag',\n})\nconst props = defineProps(tagProps)\nconst emit = defineEmits(tagEmits)\n\nconst tagSize = useFormSize()\nconst { t } = useLocale()\nconst ns = useNamespace('tag')\nconst containerKls = computed(() => {\n const { type, hit, effect, closable, round } = props\n return [\n ns.b(),\n ns.is('closable', closable),\n ns.m(type || 'primary'),\n ns.m(tagSize.value),\n ns.m(effect),\n ns.is('hit', hit),\n ns.is('round', round),\n ]\n})\n\n// methods\nconst handleClose = (event: MouseEvent) => {\n emit('close', event)\n}\n\nconst handleClick = (event: MouseEvent) => {\n emit('click', event)\n}\n\nconst handleVNodeMounted = (vnode: VNode) => {\n // @ts-ignore\n if (vnode?.component?.subTree?.component?.bum) {\n // @ts-ignore\n vnode.component.subTree.component.bum = null\n }\n}\n</script>\n"],"names":["disableTransitions","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","color","_createElementVNode","_unref","_renderSlot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AAAA,gBAExBC,WAEU,CAAAJ,KAAA,CAAA,MAAA,CAAA,EAAA,IAAA,EAAA;AAAA,kBAAA,OAAA,EAAAK,QADR,MAAS;AAAA,oBAATD,WAAA,CAASJ,KAAA,CAAA,KAAA,CAAA,CAAA;AAAA,mBAAA,CAAA;AAAA;;;;;;;;;;;;;;;;"}
|
|
@@ -1,136 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Close } from '@element-plus/icons-vue';
|
|
4
|
-
import { tagProps, tagEmits } from './tag.mjs';
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
7
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
2
|
+
import { componentSizes } from '../../../constants/size.mjs';
|
|
9
3
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
const tagProps = buildProps({
|
|
5
|
+
type: {
|
|
6
|
+
type: String,
|
|
7
|
+
values: ["primary", "success", "info", "warning", "danger"],
|
|
8
|
+
default: "primary"
|
|
15
9
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
ns.m(type || "primary"),
|
|
31
|
-
ns.m(tagSize.value),
|
|
32
|
-
ns.m(effect),
|
|
33
|
-
ns.is("hit", hit),
|
|
34
|
-
ns.is("round", round)
|
|
35
|
-
];
|
|
36
|
-
});
|
|
37
|
-
const handleClose = (event) => {
|
|
38
|
-
emit("close", event);
|
|
39
|
-
};
|
|
40
|
-
const handleClick = (event) => {
|
|
41
|
-
emit("click", event);
|
|
42
|
-
};
|
|
43
|
-
const handleVNodeMounted = (vnode) => {
|
|
44
|
-
var _a, _b, _c;
|
|
45
|
-
if ((_c = (_b = (_a = vnode == null ? void 0 : vnode.component) == null ? void 0 : _a.subTree) == null ? void 0 : _b.component) == null ? void 0 : _c.bum) {
|
|
46
|
-
vnode.component.subTree.component.bum = null;
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
return (_ctx, _cache) => {
|
|
50
|
-
return _ctx.disableTransitions ? (openBlock(), createElementBlock(
|
|
51
|
-
"span",
|
|
52
|
-
{
|
|
53
|
-
key: 0,
|
|
54
|
-
class: normalizeClass(containerKls.value),
|
|
55
|
-
style: normalizeStyle({ backgroundColor: _ctx.color }),
|
|
56
|
-
onClick: handleClick
|
|
57
|
-
},
|
|
58
|
-
[
|
|
59
|
-
createElementVNode(
|
|
60
|
-
"span",
|
|
61
|
-
{
|
|
62
|
-
class: normalizeClass(unref(ns).e("content"))
|
|
63
|
-
},
|
|
64
|
-
[
|
|
65
|
-
renderSlot(_ctx.$slots, "default")
|
|
66
|
-
],
|
|
67
|
-
2
|
|
68
|
-
),
|
|
69
|
-
_ctx.closable ? (openBlock(), createElementBlock("button", {
|
|
70
|
-
key: 0,
|
|
71
|
-
"aria-label": unref(t)("el.tag.close"),
|
|
72
|
-
class: normalizeClass(unref(ns).e("close")),
|
|
73
|
-
type: "button",
|
|
74
|
-
onClick: withModifiers(handleClose, ["stop"])
|
|
75
|
-
}, [
|
|
76
|
-
createVNode(unref(ElIcon), null, {
|
|
77
|
-
default: withCtx(() => [
|
|
78
|
-
createVNode(unref(Close))
|
|
79
|
-
]),
|
|
80
|
-
_: 1
|
|
81
|
-
})
|
|
82
|
-
], 10, _hoisted_1)) : createCommentVNode("v-if", true)
|
|
83
|
-
],
|
|
84
|
-
6
|
|
85
|
-
)) : (openBlock(), createBlock(Transition, {
|
|
86
|
-
key: 1,
|
|
87
|
-
name: `${unref(ns).namespace.value}-zoom-in-center`,
|
|
88
|
-
appear: "",
|
|
89
|
-
onVnodeMounted: handleVNodeMounted
|
|
90
|
-
}, {
|
|
91
|
-
default: withCtx(() => [
|
|
92
|
-
createElementVNode(
|
|
93
|
-
"span",
|
|
94
|
-
{
|
|
95
|
-
class: normalizeClass(containerKls.value),
|
|
96
|
-
style: normalizeStyle({ backgroundColor: _ctx.color }),
|
|
97
|
-
onClick: handleClick
|
|
98
|
-
},
|
|
99
|
-
[
|
|
100
|
-
createElementVNode(
|
|
101
|
-
"span",
|
|
102
|
-
{
|
|
103
|
-
class: normalizeClass(unref(ns).e("content"))
|
|
104
|
-
},
|
|
105
|
-
[
|
|
106
|
-
renderSlot(_ctx.$slots, "default")
|
|
107
|
-
],
|
|
108
|
-
2
|
|
109
|
-
),
|
|
110
|
-
_ctx.closable ? (openBlock(), createElementBlock("button", {
|
|
111
|
-
key: 0,
|
|
112
|
-
"aria-label": unref(t)("el.tag.close"),
|
|
113
|
-
class: normalizeClass(unref(ns).e("close")),
|
|
114
|
-
type: "button",
|
|
115
|
-
onClick: withModifiers(handleClose, ["stop"])
|
|
116
|
-
}, [
|
|
117
|
-
createVNode(unref(ElIcon), null, {
|
|
118
|
-
default: withCtx(() => [
|
|
119
|
-
createVNode(unref(Close))
|
|
120
|
-
]),
|
|
121
|
-
_: 1
|
|
122
|
-
})
|
|
123
|
-
], 10, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
124
|
-
],
|
|
125
|
-
6
|
|
126
|
-
)
|
|
127
|
-
]),
|
|
128
|
-
_: 3
|
|
129
|
-
}, 8, ["name"]));
|
|
130
|
-
};
|
|
131
|
-
}
|
|
10
|
+
closable: Boolean,
|
|
11
|
+
disableTransitions: Boolean,
|
|
12
|
+
hit: Boolean,
|
|
13
|
+
color: String,
|
|
14
|
+
size: {
|
|
15
|
+
type: String,
|
|
16
|
+
values: componentSizes
|
|
17
|
+
},
|
|
18
|
+
effect: {
|
|
19
|
+
type: String,
|
|
20
|
+
values: ["dark", "light", "plain"],
|
|
21
|
+
default: "light"
|
|
22
|
+
},
|
|
23
|
+
round: Boolean
|
|
132
24
|
});
|
|
133
|
-
|
|
25
|
+
const tagEmits = {
|
|
26
|
+
close: (evt) => evt instanceof MouseEvent,
|
|
27
|
+
click: (evt) => evt instanceof MouseEvent
|
|
28
|
+
};
|
|
134
29
|
|
|
135
|
-
export {
|
|
30
|
+
export { tagEmits, tagProps };
|
|
136
31
|
//# sourceMappingURL=tag2.mjs.map
|