@element-plus/nightly 0.0.20241128 → 0.0.20241129
Sign up to get free protection for your applications and to get access to all the features.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +907 -317
- package/dist/index.full.min.js +17 -17
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +14 -14
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +904 -318
- 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/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/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/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/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/component.mjs +2 -0
- package/es/component.mjs.map +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +118 -25
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +25 -118
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +36 -95
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +95 -36
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.mjs +87 -26
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +26 -87
- 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/index.d.ts +1 -0
- package/es/components/index.mjs +5 -3
- package/es/components/index.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +2 -1
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/input-tag/index.d.ts +6 -0
- package/es/components/input-tag/index.mjs +8 -0
- package/es/components/input-tag/index.mjs.map +1 -0
- package/es/components/input-tag/src/composables/index.d.ts +4 -0
- package/es/components/input-tag/src/composables/index.mjs +5 -0
- package/es/components/input-tag/src/composables/index.mjs.map +1 -0
- package/es/components/input-tag/src/composables/use-drag-tag.d.ts +15 -0
- package/es/components/input-tag/src/composables/use-drag-tag.mjs +92 -0
- package/es/components/input-tag/src/composables/use-drag-tag.mjs.map +1 -0
- package/es/components/input-tag/src/composables/use-hovering.d.ts +5 -0
- package/es/components/input-tag/src/composables/use-hovering.mjs +19 -0
- package/es/components/input-tag/src/composables/use-hovering.mjs.map +1 -0
- package/es/components/input-tag/src/composables/use-input-tag-dom.d.ts +58 -0
- package/es/components/input-tag/src/composables/use-input-tag-dom.mjs +57 -0
- package/es/components/input-tag/src/composables/use-input-tag-dom.mjs.map +1 -0
- package/es/components/input-tag/src/composables/use-input-tag.d.ts +33 -0
- package/es/components/input-tag/src/composables/use-input-tag.mjs +153 -0
- package/es/components/input-tag/src/composables/use-input-tag.mjs.map +1 -0
- package/es/components/input-tag/src/input-tag.d.ts +60 -0
- package/es/components/input-tag/src/input-tag.mjs +69 -0
- package/es/components/input-tag/src/input-tag.mjs.map +1 -0
- package/es/components/input-tag/src/input-tag.vue.d.ts +142 -0
- package/es/components/input-tag/src/input-tag2.mjs +219 -0
- package/es/components/input-tag/src/input-tag2.mjs.map +1 -0
- package/es/components/input-tag/src/instance.d.ts +2 -0
- package/es/components/input-tag/src/instance.mjs +2 -0
- package/es/components/input-tag/src/instance.mjs.map +1 -0
- package/es/components/input-tag/style/css.d.ts +3 -0
- package/es/components/input-tag/style/css.mjs +4 -0
- package/es/components/input-tag/style/css.mjs.map +1 -0
- package/es/components/input-tag/style/index.d.ts +3 -0
- package/es/components/input-tag/style/index.mjs +4 -0
- package/es/components/input-tag/style/index.mjs.map +1 -0
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +14 -96
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +96 -14
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/notification/src/notification.d.ts +12 -6
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +5 -8
- package/es/components/notification/src/notify.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker-range-trigger.mjs +1 -1
- package/es/components/time-picker/src/common/picker-range-trigger.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/panel-time-range.mjs +3 -0
- package/es/components/time-picker/src/time-picker-com/panel-time-range.mjs.map +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/index.mjs.map +1 -1
- package/es/hooks/use-calc-input-width/index.d.ts +7 -0
- package/es/hooks/use-calc-input-width/index.mjs +24 -0
- package/es/hooks/use-calc-input-width/index.mjs.map +1 -0
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +6 -3
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/component.js +98 -96
- package/lib/component.js.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +118 -26
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +26 -118
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +37 -94
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +94 -37
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.js +86 -26
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +26 -86
- 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/index.d.ts +1 -0
- package/lib/components/index.js +116 -111
- package/lib/components/index.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +2 -1
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/input-tag/index.d.ts +6 -0
- package/lib/components/input-tag/index.js +15 -0
- package/lib/components/input-tag/index.js.map +1 -0
- package/lib/components/input-tag/src/composables/index.d.ts +4 -0
- package/lib/components/input-tag/src/composables/index.js +16 -0
- package/lib/components/input-tag/src/composables/index.js.map +1 -0
- package/lib/components/input-tag/src/composables/use-drag-tag.d.ts +15 -0
- package/lib/components/input-tag/src/composables/use-drag-tag.js +96 -0
- package/lib/components/input-tag/src/composables/use-drag-tag.js.map +1 -0
- package/lib/components/input-tag/src/composables/use-hovering.d.ts +5 -0
- package/lib/components/input-tag/src/composables/use-hovering.js +23 -0
- package/lib/components/input-tag/src/composables/use-hovering.js.map +1 -0
- package/lib/components/input-tag/src/composables/use-input-tag-dom.d.ts +58 -0
- package/lib/components/input-tag/src/composables/use-input-tag-dom.js +61 -0
- package/lib/components/input-tag/src/composables/use-input-tag-dom.js.map +1 -0
- package/lib/components/input-tag/src/composables/use-input-tag.d.ts +33 -0
- package/lib/components/input-tag/src/composables/use-input-tag.js +157 -0
- package/lib/components/input-tag/src/composables/use-input-tag.js.map +1 -0
- package/lib/components/input-tag/src/input-tag.d.ts +60 -0
- package/lib/components/input-tag/src/input-tag.js +74 -0
- package/lib/components/input-tag/src/input-tag.js.map +1 -0
- package/lib/components/input-tag/src/input-tag.vue.d.ts +142 -0
- package/lib/components/input-tag/src/input-tag2.js +223 -0
- package/lib/components/input-tag/src/input-tag2.js.map +1 -0
- package/lib/components/input-tag/src/instance.d.ts +2 -0
- package/lib/components/input-tag/src/instance.js +3 -0
- package/lib/components/input-tag/src/instance.js.map +1 -0
- package/lib/components/input-tag/style/css.d.ts +3 -0
- package/lib/components/input-tag/style/css.js +7 -0
- package/lib/components/input-tag/style/css.js.map +1 -0
- package/lib/components/input-tag/style/index.d.ts +3 -0
- package/lib/components/input-tag/style/index.js +7 -0
- package/lib/components/input-tag/style/index.js.map +1 -0
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +15 -96
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +96 -15
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/notification/src/notification.d.ts +12 -6
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notify.js +4 -7
- package/lib/components/notification/src/notify.js.map +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.js +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.js +3 -0
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +96 -94
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-calc-input-width/index.d.ts +7 -0
- package/lib/hooks/use-calc-input-width/index.js +28 -0
- package/lib/hooks/use-calc-input-width/index.js.map +1 -0
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +222 -215
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/el-input-tag.css +1 -0
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +47 -0
- package/theme-chalk/src/form.scss +2 -1
- package/theme-chalk/src/index.scss +1 -0
- package/theme-chalk/src/input-tag.scss +215 -0
- package/web-types.json +1 -1
@@ -1,123 +1,30 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
6
|
-
import { getScrollContainer } from '../../../utils/dom/scroll.mjs';
|
7
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
8
|
-
import { throwError } from '../../../utils/error.mjs';
|
1
|
+
import { CHANGE_EVENT } from '../../../constants/event.mjs';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { isNumber, isBoolean } from '../../../utils/types.mjs';
|
9
4
|
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
width: rootWidth,
|
28
|
-
top: rootTop,
|
29
|
-
bottom: rootBottom,
|
30
|
-
update: updateRoot
|
31
|
-
} = useElementBounding(root, { windowScroll: false });
|
32
|
-
const targetRect = useElementBounding(target);
|
33
|
-
const fixed = ref(false);
|
34
|
-
const scrollTop = ref(0);
|
35
|
-
const transform = ref(0);
|
36
|
-
const rootStyle = computed(() => {
|
37
|
-
return {
|
38
|
-
height: fixed.value ? `${rootHeight.value}px` : "",
|
39
|
-
width: fixed.value ? `${rootWidth.value}px` : ""
|
40
|
-
};
|
41
|
-
});
|
42
|
-
const affixStyle = computed(() => {
|
43
|
-
if (!fixed.value)
|
44
|
-
return {};
|
45
|
-
const offset = props.offset ? addUnit(props.offset) : 0;
|
46
|
-
return {
|
47
|
-
height: `${rootHeight.value}px`,
|
48
|
-
width: `${rootWidth.value}px`,
|
49
|
-
top: props.position === "top" ? offset : "",
|
50
|
-
bottom: props.position === "bottom" ? offset : "",
|
51
|
-
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
52
|
-
zIndex: props.zIndex
|
53
|
-
};
|
54
|
-
});
|
55
|
-
const update = () => {
|
56
|
-
if (!scrollContainer.value)
|
57
|
-
return;
|
58
|
-
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
59
|
-
const { position, target: target2, offset } = props;
|
60
|
-
const rootHeightOffset = offset + rootHeight.value;
|
61
|
-
if (position === "top") {
|
62
|
-
if (target2) {
|
63
|
-
const difference = targetRect.bottom.value - rootHeightOffset;
|
64
|
-
fixed.value = offset > rootTop.value && targetRect.bottom.value > 0;
|
65
|
-
transform.value = difference < 0 ? difference : 0;
|
66
|
-
} else {
|
67
|
-
fixed.value = offset > rootTop.value;
|
68
|
-
}
|
69
|
-
} else if (target2) {
|
70
|
-
const difference = windowHeight.value - targetRect.top.value - rootHeightOffset;
|
71
|
-
fixed.value = windowHeight.value - offset < rootBottom.value && windowHeight.value > targetRect.top.value;
|
72
|
-
transform.value = difference < 0 ? -difference : 0;
|
73
|
-
} else {
|
74
|
-
fixed.value = windowHeight.value - offset < rootBottom.value;
|
75
|
-
}
|
76
|
-
};
|
77
|
-
const handleScroll = () => {
|
78
|
-
updateRoot();
|
79
|
-
emit("scroll", {
|
80
|
-
scrollTop: scrollTop.value,
|
81
|
-
fixed: fixed.value
|
82
|
-
});
|
83
|
-
};
|
84
|
-
watch(fixed, (val) => emit("change", val));
|
85
|
-
onMounted(() => {
|
86
|
-
var _a;
|
87
|
-
if (props.target) {
|
88
|
-
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
89
|
-
if (!target.value)
|
90
|
-
throwError(COMPONENT_NAME, `Target does not exist: ${props.target}`);
|
91
|
-
} else {
|
92
|
-
target.value = document.documentElement;
|
93
|
-
}
|
94
|
-
scrollContainer.value = getScrollContainer(root.value, true);
|
95
|
-
updateRoot();
|
96
|
-
});
|
97
|
-
useEventListener(scrollContainer, "scroll", handleScroll);
|
98
|
-
watchEffect(update);
|
99
|
-
expose({
|
100
|
-
update,
|
101
|
-
updateRoot
|
102
|
-
});
|
103
|
-
return (_ctx, _cache) => {
|
104
|
-
return openBlock(), createElementBlock("div", {
|
105
|
-
ref_key: "root",
|
106
|
-
ref: root,
|
107
|
-
class: normalizeClass(unref(ns).b()),
|
108
|
-
style: normalizeStyle(unref(rootStyle))
|
109
|
-
}, [
|
110
|
-
createElementVNode("div", {
|
111
|
-
class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
|
112
|
-
style: normalizeStyle(unref(affixStyle))
|
113
|
-
}, [
|
114
|
-
renderSlot(_ctx.$slots, "default")
|
115
|
-
], 6)
|
116
|
-
], 6);
|
117
|
-
};
|
5
|
+
const affixProps = buildProps({
|
6
|
+
zIndex: {
|
7
|
+
type: definePropType([Number, String]),
|
8
|
+
default: 100
|
9
|
+
},
|
10
|
+
target: {
|
11
|
+
type: String,
|
12
|
+
default: ""
|
13
|
+
},
|
14
|
+
offset: {
|
15
|
+
type: Number,
|
16
|
+
default: 0
|
17
|
+
},
|
18
|
+
position: {
|
19
|
+
type: String,
|
20
|
+
values: ["top", "bottom"],
|
21
|
+
default: "top"
|
118
22
|
}
|
119
23
|
});
|
120
|
-
|
24
|
+
const affixEmits = {
|
25
|
+
scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed),
|
26
|
+
[CHANGE_EVENT]: (fixed) => isBoolean(fixed)
|
27
|
+
};
|
121
28
|
|
122
|
-
export {
|
29
|
+
export { affixEmits, affixProps };
|
123
30
|
//# sourceMappingURL=affix2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.
|
1
|
+
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n /**\n * @description affix element zIndex value\n * */\n zIndex: {\n type: definePropType<ZIndexProperty>([Number, String]),\n default: 100,\n },\n /**\n * @description target container. (CSS selector)\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description offset distance\n * */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description position of affix\n * */\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix>\n"],"names":[],"mappings":";;;;AAOY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC;AAC3E,EAAE,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AAC7C;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Alert from './src/
|
2
|
-
export { alertEffects, alertEmits, alertProps } from './src/
|
1
|
+
import Alert from './src/alert2.mjs';
|
2
|
+
export { alertEffects, alertEmits, alertProps } from './src/alert.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElAlert = withInstall(Alert);
|
@@ -1,100 +1,41 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
-
import { TypeComponentsMap, TypeComponents } from '../../../utils/vue/icon.mjs';
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
1
|
+
import { TypeComponentsMap } from '../../../utils/vue/icon.mjs';
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { keysOf } from '../../../utils/objects.mjs';
|
7
4
|
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
}, {
|
38
|
-
default: withCtx(() => [
|
39
|
-
withDirectives(createElementVNode("div", {
|
40
|
-
class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.type), unref(ns).is("center", _ctx.center), unref(ns).is(_ctx.effect)]),
|
41
|
-
role: "alert"
|
42
|
-
}, [
|
43
|
-
_ctx.showIcon && unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
|
44
|
-
key: 0,
|
45
|
-
class: normalizeClass(unref(iconClass))
|
46
|
-
}, {
|
47
|
-
default: withCtx(() => [
|
48
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
|
49
|
-
]),
|
50
|
-
_: 1
|
51
|
-
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
52
|
-
createElementVNode("div", {
|
53
|
-
class: normalizeClass(unref(ns).e("content"))
|
54
|
-
}, [
|
55
|
-
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", {
|
56
|
-
key: 0,
|
57
|
-
class: normalizeClass([unref(ns).e("title"), unref(withDescription)])
|
58
|
-
}, [
|
59
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
60
|
-
createTextVNode(toDisplayString(_ctx.title), 1)
|
61
|
-
])
|
62
|
-
], 2)) : createCommentVNode("v-if", true),
|
63
|
-
_ctx.$slots.default || _ctx.description ? (openBlock(), createElementBlock("p", {
|
64
|
-
key: 1,
|
65
|
-
class: normalizeClass(unref(ns).e("description"))
|
66
|
-
}, [
|
67
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
68
|
-
createTextVNode(toDisplayString(_ctx.description), 1)
|
69
|
-
])
|
70
|
-
], 2)) : createCommentVNode("v-if", true),
|
71
|
-
_ctx.closable ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
72
|
-
_ctx.closeText ? (openBlock(), createElementBlock("div", {
|
73
|
-
key: 0,
|
74
|
-
class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")]),
|
75
|
-
onClick: close
|
76
|
-
}, toDisplayString(_ctx.closeText), 3)) : (openBlock(), createBlock(unref(ElIcon), {
|
77
|
-
key: 1,
|
78
|
-
class: normalizeClass(unref(ns).e("close-btn")),
|
79
|
-
onClick: close
|
80
|
-
}, {
|
81
|
-
default: withCtx(() => [
|
82
|
-
createVNode(unref(Close))
|
83
|
-
]),
|
84
|
-
_: 1
|
85
|
-
}, 8, ["class"]))
|
86
|
-
], 64)) : createCommentVNode("v-if", true)
|
87
|
-
], 2)
|
88
|
-
], 2), [
|
89
|
-
[vShow, visible.value]
|
90
|
-
])
|
91
|
-
]),
|
92
|
-
_: 3
|
93
|
-
}, 8, ["name"]);
|
94
|
-
};
|
5
|
+
const alertEffects = ["light", "dark"];
|
6
|
+
const alertProps = buildProps({
|
7
|
+
title: {
|
8
|
+
type: String,
|
9
|
+
default: ""
|
10
|
+
},
|
11
|
+
description: {
|
12
|
+
type: String,
|
13
|
+
default: ""
|
14
|
+
},
|
15
|
+
type: {
|
16
|
+
type: String,
|
17
|
+
values: keysOf(TypeComponentsMap),
|
18
|
+
default: "info"
|
19
|
+
},
|
20
|
+
closable: {
|
21
|
+
type: Boolean,
|
22
|
+
default: true
|
23
|
+
},
|
24
|
+
closeText: {
|
25
|
+
type: String,
|
26
|
+
default: ""
|
27
|
+
},
|
28
|
+
showIcon: Boolean,
|
29
|
+
center: Boolean,
|
30
|
+
effect: {
|
31
|
+
type: String,
|
32
|
+
values: alertEffects,
|
33
|
+
default: "light"
|
95
34
|
}
|
96
35
|
});
|
97
|
-
|
36
|
+
const alertEmits = {
|
37
|
+
close: (evt) => evt instanceof MouseEvent
|
38
|
+
};
|
98
39
|
|
99
|
-
export {
|
40
|
+
export { alertEffects, alertEmits, alertProps };
|
100
41
|
//# sourceMappingURL=alert.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"alert.mjs","sources":["../../../../../../packages/components/alert/src/alert.
|
1
|
+
{"version":3,"file":"alert.mjs","sources":["../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { TypeComponentsMap, buildProps, keysOf } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n /**\n * @description alert title.\n */\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n /**\n * @description alert type.\n */\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n /**\n * @description whether alert can be dismissed.\n */\n closable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description text for replacing x button\n */\n closeText: {\n type: String,\n default: '',\n },\n /**\n * @description whether show icon\n */\n showIcon: Boolean,\n /**\n * @description should content be placed in center.\n */\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n} as const)\nexport type AlertProps = ExtractPropTypes<typeof alertProps>\n\nexport const alertEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type AlertEmits = typeof alertEmits\n"],"names":[],"mappings":";;;;AACY,MAAC,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE;AAClC,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,MAAM,CAAC,iBAAiB,CAAC;AACrC,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,YAAY;AACxB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;"}
|
@@ -1,41 +1,100 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
1
|
+
import { defineComponent, useSlots, ref, computed, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, resolveDynamicComponent, createCommentVNode, createElementBlock, renderSlot, createTextVNode, toDisplayString, Fragment, createVNode, vShow } from 'vue';
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
3
|
+
import { alertProps, alertEmits } from './alert.mjs';
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
+
import { TypeComponentsMap, TypeComponents } from '../../../utils/vue/icon.mjs';
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
4
7
|
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
8
|
+
const __default__ = defineComponent({
|
9
|
+
name: "ElAlert"
|
10
|
+
});
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
12
|
+
...__default__,
|
13
|
+
props: alertProps,
|
14
|
+
emits: alertEmits,
|
15
|
+
setup(__props, { emit }) {
|
16
|
+
const props = __props;
|
17
|
+
const { Close } = TypeComponents;
|
18
|
+
const slots = useSlots();
|
19
|
+
const ns = useNamespace("alert");
|
20
|
+
const visible = ref(true);
|
21
|
+
const iconComponent = computed(() => TypeComponentsMap[props.type]);
|
22
|
+
const iconClass = computed(() => [
|
23
|
+
ns.e("icon"),
|
24
|
+
{ [ns.is("big")]: !!props.description || !!slots.default }
|
25
|
+
]);
|
26
|
+
const withDescription = computed(() => {
|
27
|
+
return { "with-description": props.description || slots.default };
|
28
|
+
});
|
29
|
+
const close = (evt) => {
|
30
|
+
visible.value = false;
|
31
|
+
emit("close", evt);
|
32
|
+
};
|
33
|
+
return (_ctx, _cache) => {
|
34
|
+
return openBlock(), createBlock(Transition, {
|
35
|
+
name: unref(ns).b("fade"),
|
36
|
+
persisted: ""
|
37
|
+
}, {
|
38
|
+
default: withCtx(() => [
|
39
|
+
withDirectives(createElementVNode("div", {
|
40
|
+
class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.type), unref(ns).is("center", _ctx.center), unref(ns).is(_ctx.effect)]),
|
41
|
+
role: "alert"
|
42
|
+
}, [
|
43
|
+
_ctx.showIcon && unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
|
44
|
+
key: 0,
|
45
|
+
class: normalizeClass(unref(iconClass))
|
46
|
+
}, {
|
47
|
+
default: withCtx(() => [
|
48
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
|
49
|
+
]),
|
50
|
+
_: 1
|
51
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
52
|
+
createElementVNode("div", {
|
53
|
+
class: normalizeClass(unref(ns).e("content"))
|
54
|
+
}, [
|
55
|
+
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", {
|
56
|
+
key: 0,
|
57
|
+
class: normalizeClass([unref(ns).e("title"), unref(withDescription)])
|
58
|
+
}, [
|
59
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
60
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
61
|
+
])
|
62
|
+
], 2)) : createCommentVNode("v-if", true),
|
63
|
+
_ctx.$slots.default || _ctx.description ? (openBlock(), createElementBlock("p", {
|
64
|
+
key: 1,
|
65
|
+
class: normalizeClass(unref(ns).e("description"))
|
66
|
+
}, [
|
67
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
68
|
+
createTextVNode(toDisplayString(_ctx.description), 1)
|
69
|
+
])
|
70
|
+
], 2)) : createCommentVNode("v-if", true),
|
71
|
+
_ctx.closable ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
72
|
+
_ctx.closeText ? (openBlock(), createElementBlock("div", {
|
73
|
+
key: 0,
|
74
|
+
class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")]),
|
75
|
+
onClick: close
|
76
|
+
}, toDisplayString(_ctx.closeText), 3)) : (openBlock(), createBlock(unref(ElIcon), {
|
77
|
+
key: 1,
|
78
|
+
class: normalizeClass(unref(ns).e("close-btn")),
|
79
|
+
onClick: close
|
80
|
+
}, {
|
81
|
+
default: withCtx(() => [
|
82
|
+
createVNode(unref(Close))
|
83
|
+
]),
|
84
|
+
_: 1
|
85
|
+
}, 8, ["class"]))
|
86
|
+
], 64)) : createCommentVNode("v-if", true)
|
87
|
+
], 2)
|
88
|
+
], 2), [
|
89
|
+
[vShow, visible.value]
|
90
|
+
])
|
91
|
+
]),
|
92
|
+
_: 3
|
93
|
+
}, 8, ["name"]);
|
94
|
+
};
|
34
95
|
}
|
35
96
|
});
|
36
|
-
|
37
|
-
close: (evt) => evt instanceof MouseEvent
|
38
|
-
};
|
97
|
+
var Alert = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "alert.vue"]]);
|
39
98
|
|
40
|
-
export {
|
99
|
+
export { Alert as default };
|
41
100
|
//# sourceMappingURL=alert2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"alert2.mjs","sources":["../../../../../../packages/components/alert/src/alert.
|
1
|
+
{"version":3,"file":"alert2.mjs","sources":["../../../../../../packages/components/alert/src/alert.vue"],"sourcesContent":["<template>\n <transition :name=\"ns.b('fade')\">\n <div\n v-show=\"visible\"\n :class=\"[ns.b(), ns.m(type), ns.is('center', center), ns.is(effect)]\"\n role=\"alert\"\n >\n <el-icon v-if=\"showIcon && iconComponent\" :class=\"iconClass\">\n <component :is=\"iconComponent\" />\n </el-icon>\n\n <div :class=\"ns.e('content')\">\n <span\n v-if=\"title || $slots.title\"\n :class=\"[ns.e('title'), withDescription]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </span>\n <p v-if=\"$slots.default || description\" :class=\"ns.e('description')\">\n <slot>\n {{ description }}\n </slot>\n </p>\n <template v-if=\"closable\">\n <div\n v-if=\"closeText\"\n :class=\"[ns.e('close-btn'), ns.is('customed')]\"\n @click=\"close\"\n >\n {{ closeText }}\n </div>\n <el-icon v-else :class=\"ns.e('close-btn')\" @click=\"close\">\n <Close />\n </el-icon>\n </template>\n </div>\n </div>\n </transition>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref, useSlots } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { alertEmits, alertProps } from './alert'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElAlert',\n})\n\nconst props = defineProps(alertProps)\nconst emit = defineEmits(alertEmits)\nconst slots = useSlots()\n\nconst ns = useNamespace('alert')\n\nconst visible = ref(true)\n\nconst iconComponent = computed(() => TypeComponentsMap[props.type])\n\nconst iconClass = computed(() => [\n ns.e('icon'),\n { [ns.is('big')]: !!props.description || !!slots.default },\n])\n\nconst withDescription = computed(() => {\n return { 'with-description': props.description || slots.default }\n})\n\nconst close = (evt: MouseEvent) => {\n visible.value = false\n emit('close', evt)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;mCAgDc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAJA,IAAM,MAAA,EAAE,OAAU,GAAA,cAAA,CAAA;AAQlB,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAE/B,IAAM,MAAA,OAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AAExB,IAAA,MAAM,gBAAgB,QAAS,CAAA,MAAM,iBAAkB,CAAA,KAAA,CAAM,IAAI,CAAC,CAAA,CAAA;AAElE,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAAA,MAC/B,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAE,CAAC,EAAG,CAAA,EAAA,CAAG,KAAK,CAAC,GAAG,CAAC,CAAC,KAAM,CAAA,WAAA,IAAe,CAAC,CAAC,MAAM,OAAQ,EAAA;AAAA,KAC1D,CAAA,CAAA;AAED,IAAM,MAAA,eAAA,GAAkB,SAAS,MAAM;AACrC,MAAA,OAAO,EAAE,kBAAA,EAAoB,KAAM,CAAA,WAAA,IAAe,MAAM,OAAQ,EAAA,CAAA;AAAA,KACjE,CAAA,CAAA;AAED,IAAM,MAAA,KAAA,GAAQ,CAAC,GAAoB,KAAA;AACjC,MAAA,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAChB,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AAAA,KACnB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|