@element-plus/nightly 0.0.20250309 → 0.0.20250311
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.full.js +6 -6
- package/dist/index.full.min.js +9 -9
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +9 -9
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +6 -6
- 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/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 +91 -36
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +36 -91
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +38 -14
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +14 -38
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +64 -43
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +43 -64
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/index.mjs +7 -7
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +24 -49
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +49 -24
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/select/index.mjs +1 -1
- package/es/components/select/src/select.mjs +113 -429
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select2.mjs +429 -113
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/select/src/useSelect.mjs +1 -1
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +132 -54
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +54 -131
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +14 -72
- package/es/components/tooltip/src/trigger.mjs.map +1 -1
- package/es/components/tooltip/src/trigger2.mjs +72 -14
- package/es/components/tooltip/src/trigger2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/arrow.mjs +37 -21
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +21 -37
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
- package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
- package/es/components/tooltip-v2/src/trigger.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +7 -7
- 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 +90 -37
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +37 -90
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +38 -15
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +15 -38
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +64 -43
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +43 -64
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/index.js +7 -7
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +25 -49
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +49 -25
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/select/index.js +1 -1
- package/lib/components/select/src/select.js +113 -429
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select2.js +429 -113
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/select/src/useSelect.js +1 -1
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +17 -22
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +22 -17
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +137 -54
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +54 -136
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +14 -72
- package/lib/components/tooltip/src/trigger.js.map +1 -1
- package/lib/components/tooltip/src/trigger2.js +72 -14
- package/lib/components/tooltip/src/trigger2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/arrow.js +37 -22
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +22 -37
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +2 -2
- package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
- package/lib/components/tooltip-v2/src/trigger.js +89 -12
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +12 -89
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +7 -7
- 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/web-types.json +1 -1
|
@@ -2,46 +2,99 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
7
|
+
var alert = require('./alert2.js');
|
|
8
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
5
9
|
var icon = require('../../../utils/vue/icon.js');
|
|
6
|
-
var
|
|
7
|
-
var objects = require('../../../utils/objects.js');
|
|
10
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
8
11
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
12
|
+
const __default__ = vue.defineComponent({
|
|
13
|
+
name: "ElAlert"
|
|
14
|
+
});
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
16
|
+
...__default__,
|
|
17
|
+
props: alert.alertProps,
|
|
18
|
+
emits: alert.alertEmits,
|
|
19
|
+
setup(__props, { emit }) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const { Close } = icon.TypeComponents;
|
|
22
|
+
const slots = vue.useSlots();
|
|
23
|
+
const ns = index.useNamespace("alert");
|
|
24
|
+
const visible = vue.ref(true);
|
|
25
|
+
const iconComponent = vue.computed(() => icon.TypeComponentsMap[props.type]);
|
|
26
|
+
const hasDesc = vue.computed(() => !!(props.description || slots.default));
|
|
27
|
+
const close = (evt) => {
|
|
28
|
+
visible.value = false;
|
|
29
|
+
emit("close", evt);
|
|
30
|
+
};
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
33
|
+
name: vue.unref(ns).b("fade"),
|
|
34
|
+
persisted: ""
|
|
35
|
+
}, {
|
|
36
|
+
default: vue.withCtx(() => [
|
|
37
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
38
|
+
class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.type), vue.unref(ns).is("center", _ctx.center), vue.unref(ns).is(_ctx.effect)]),
|
|
39
|
+
role: "alert"
|
|
40
|
+
}, [
|
|
41
|
+
_ctx.showIcon && (_ctx.$slots.icon || vue.unref(iconComponent)) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: vue.normalizeClass([vue.unref(ns).e("icon"), { [vue.unref(ns).is("big")]: vue.unref(hasDesc) }])
|
|
44
|
+
}, {
|
|
45
|
+
default: vue.withCtx(() => [
|
|
46
|
+
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
47
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
48
|
+
])
|
|
49
|
+
]),
|
|
50
|
+
_: 3
|
|
51
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
52
|
+
vue.createElementVNode("div", {
|
|
53
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
54
|
+
}, [
|
|
55
|
+
_ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: vue.normalizeClass([vue.unref(ns).e("title"), { "with-description": vue.unref(hasDesc) }])
|
|
58
|
+
}, [
|
|
59
|
+
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
60
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
61
|
+
])
|
|
62
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
63
|
+
vue.unref(hasDesc) ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
64
|
+
key: 1,
|
|
65
|
+
class: vue.normalizeClass(vue.unref(ns).e("description"))
|
|
66
|
+
}, [
|
|
67
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
68
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
|
|
69
|
+
])
|
|
70
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
71
|
+
_ctx.closable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
72
|
+
_ctx.closeText ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
73
|
+
key: 0,
|
|
74
|
+
class: vue.normalizeClass([vue.unref(ns).e("close-btn"), vue.unref(ns).is("customed")]),
|
|
75
|
+
onClick: close
|
|
76
|
+
}, vue.toDisplayString(_ctx.closeText), 3)) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
77
|
+
key: 1,
|
|
78
|
+
class: vue.normalizeClass(vue.unref(ns).e("close-btn")),
|
|
79
|
+
onClick: close
|
|
80
|
+
}, {
|
|
81
|
+
default: vue.withCtx(() => [
|
|
82
|
+
vue.createVNode(vue.unref(Close))
|
|
83
|
+
]),
|
|
84
|
+
_: 1
|
|
85
|
+
}, 8, ["class"]))
|
|
86
|
+
], 64)) : vue.createCommentVNode("v-if", true)
|
|
87
|
+
], 2)
|
|
88
|
+
], 2), [
|
|
89
|
+
[vue.vShow, visible.value]
|
|
90
|
+
])
|
|
91
|
+
]),
|
|
92
|
+
_: 3
|
|
93
|
+
}, 8, ["name"]);
|
|
94
|
+
};
|
|
38
95
|
}
|
|
39
96
|
});
|
|
40
|
-
|
|
41
|
-
close: (evt) => evt instanceof MouseEvent
|
|
42
|
-
};
|
|
97
|
+
var Alert = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "alert.vue"]]);
|
|
43
98
|
|
|
44
|
-
exports
|
|
45
|
-
exports.alertEmits = alertEmits;
|
|
46
|
-
exports.alertProps = alertProps;
|
|
99
|
+
exports["default"] = Alert;
|
|
47
100
|
//# sourceMappingURL=alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sources":["../../../../../../packages/components/alert/src/alert.
|
|
1
|
+
{"version":3,"file":"alert.js","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\n v-if=\"showIcon && ($slots.icon || iconComponent)\"\n :class=\"[ns.e('icon'), { [ns.is('big')]: hasDesc }]\"\n >\n <slot name=\"icon\">\n <component :is=\"iconComponent\" />\n </slot>\n </el-icon>\n\n <div :class=\"ns.e('content')\">\n <span\n v-if=\"title || $slots.title\"\n :class=\"[ns.e('title'), { 'with-description': hasDesc }]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </span>\n <p v-if=\"hasDesc\" :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\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 hasDesc = computed(() => !!(props.description || slots.default))\n\nconst close = (evt: MouseEvent) => {\n visible.value = false\n emit('close', evt)\n}\n</script>\n"],"names":["TypeComponents","useSlots","useNamespace","ref","computed","TypeComponentsMap"],"mappings":";;;;;;;;;;;uCAsDc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAJA,IAAM,MAAA,EAAE,OAAU,GAAAA,mBAAA,CAAA;AAQlB,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,EAAA,GAAKC,mBAAa,OAAO,CAAA,CAAA;AAE/B,IAAM,MAAA,OAAA,GAAUC,QAAI,IAAI,CAAA,CAAA;AAExB,IAAA,MAAM,gBAAgBC,YAAS,CAAA,MAAMC,sBAAkB,CAAA,KAAA,CAAM,IAAI,CAAC,CAAA,CAAA;AAElE,IAAM,MAAA,OAAA,GAAUD,aAAS,MAAM,CAAC,EAAE,KAAM,CAAA,WAAA,IAAe,MAAM,OAAQ,CAAA,CAAA,CAAA;AAErE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,99 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var index$1 = require('../../icon/index.js');
|
|
7
|
-
var alert = require('./alert.js');
|
|
8
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
9
5
|
var icon = require('../../../utils/vue/icon.js');
|
|
10
|
-
var
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
7
|
+
var objects = require('../../../utils/objects.js');
|
|
11
8
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
_ctx.showIcon && (_ctx.$slots.icon || vue.unref(iconComponent)) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: vue.normalizeClass([vue.unref(ns).e("icon"), { [vue.unref(ns).is("big")]: vue.unref(hasDesc) }])
|
|
44
|
-
}, {
|
|
45
|
-
default: vue.withCtx(() => [
|
|
46
|
-
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
47
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
48
|
-
])
|
|
49
|
-
]),
|
|
50
|
-
_: 3
|
|
51
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
52
|
-
vue.createElementVNode("div", {
|
|
53
|
-
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
54
|
-
}, [
|
|
55
|
-
_ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
56
|
-
key: 0,
|
|
57
|
-
class: vue.normalizeClass([vue.unref(ns).e("title"), { "with-description": vue.unref(hasDesc) }])
|
|
58
|
-
}, [
|
|
59
|
-
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
60
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
61
|
-
])
|
|
62
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
63
|
-
vue.unref(hasDesc) ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
64
|
-
key: 1,
|
|
65
|
-
class: vue.normalizeClass(vue.unref(ns).e("description"))
|
|
66
|
-
}, [
|
|
67
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
68
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
|
|
69
|
-
])
|
|
70
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
71
|
-
_ctx.closable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
72
|
-
_ctx.closeText ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
73
|
-
key: 0,
|
|
74
|
-
class: vue.normalizeClass([vue.unref(ns).e("close-btn"), vue.unref(ns).is("customed")]),
|
|
75
|
-
onClick: close
|
|
76
|
-
}, vue.toDisplayString(_ctx.closeText), 3)) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
77
|
-
key: 1,
|
|
78
|
-
class: vue.normalizeClass(vue.unref(ns).e("close-btn")),
|
|
79
|
-
onClick: close
|
|
80
|
-
}, {
|
|
81
|
-
default: vue.withCtx(() => [
|
|
82
|
-
vue.createVNode(vue.unref(Close))
|
|
83
|
-
]),
|
|
84
|
-
_: 1
|
|
85
|
-
}, 8, ["class"]))
|
|
86
|
-
], 64)) : vue.createCommentVNode("v-if", true)
|
|
87
|
-
], 2)
|
|
88
|
-
], 2), [
|
|
89
|
-
[vue.vShow, visible.value]
|
|
90
|
-
])
|
|
91
|
-
]),
|
|
92
|
-
_: 3
|
|
93
|
-
}, 8, ["name"]);
|
|
94
|
-
};
|
|
9
|
+
const alertEffects = ["light", "dark"];
|
|
10
|
+
const alertProps = runtime.buildProps({
|
|
11
|
+
title: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: ""
|
|
14
|
+
},
|
|
15
|
+
description: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
type: {
|
|
20
|
+
type: String,
|
|
21
|
+
values: objects.keysOf(icon.TypeComponentsMap),
|
|
22
|
+
default: "info"
|
|
23
|
+
},
|
|
24
|
+
closable: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: true
|
|
27
|
+
},
|
|
28
|
+
closeText: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
showIcon: Boolean,
|
|
33
|
+
center: Boolean,
|
|
34
|
+
effect: {
|
|
35
|
+
type: String,
|
|
36
|
+
values: alertEffects,
|
|
37
|
+
default: "light"
|
|
95
38
|
}
|
|
96
39
|
});
|
|
97
|
-
|
|
40
|
+
const alertEmits = {
|
|
41
|
+
close: (evt) => evt instanceof MouseEvent
|
|
42
|
+
};
|
|
98
43
|
|
|
99
|
-
exports
|
|
44
|
+
exports.alertEffects = alertEffects;
|
|
45
|
+
exports.alertEmits = alertEmits;
|
|
46
|
+
exports.alertProps = alertProps;
|
|
100
47
|
//# sourceMappingURL=alert2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert2.js","sources":["../../../../../../packages/components/alert/src/alert.
|
|
1
|
+
{"version":3,"file":"alert2.js","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":["buildProps","keysOf","TypeComponentsMap"],"mappings":";;;;;;;;AACY,MAAC,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE;AAClC,MAAC,UAAU,GAAGA,kBAAU,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,EAAEC,cAAM,CAACC,sBAAiB,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;;;;;;"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var checkTag$1 = require('./src/check-
|
|
6
|
-
var checkTag = require('./src/check-
|
|
5
|
+
var checkTag$1 = require('./src/check-tag.js');
|
|
6
|
+
var checkTag = require('./src/check-tag2.js');
|
|
7
7
|
var install = require('../../utils/vue/install.js');
|
|
8
8
|
|
|
9
9
|
const ElCheckTag = install.withInstall(checkTag$1["default"]);
|
|
@@ -2,24 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var checkTag = require('./check-tag2.js');
|
|
7
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
8
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
7
9
|
var event = require('../../../constants/event.js');
|
|
8
10
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const __default__ = vue.defineComponent({
|
|
12
|
+
name: "ElCheckTag"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: checkTag.checkTagProps,
|
|
17
|
+
emits: checkTag.checkTagEmits,
|
|
18
|
+
setup(__props, { emit }) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const ns = index.useNamespace("check-tag");
|
|
21
|
+
const isDisabled = vue.computed(() => props.disabled);
|
|
22
|
+
const containerKls = vue.computed(() => [
|
|
23
|
+
ns.b(),
|
|
24
|
+
ns.is("checked", props.checked),
|
|
25
|
+
ns.is("disabled", isDisabled.value),
|
|
26
|
+
ns.m(props.type || "primary")
|
|
27
|
+
]);
|
|
28
|
+
const handleChange = () => {
|
|
29
|
+
if (isDisabled.value)
|
|
30
|
+
return;
|
|
31
|
+
const checked = !props.checked;
|
|
32
|
+
emit(event.CHANGE_EVENT, checked);
|
|
33
|
+
emit("update:checked", checked);
|
|
34
|
+
};
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
37
|
+
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
38
|
+
onClick: handleChange
|
|
39
|
+
}, [
|
|
40
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
41
|
+
], 2);
|
|
42
|
+
};
|
|
16
43
|
}
|
|
17
44
|
});
|
|
18
|
-
|
|
19
|
-
"update:checked": (value) => types.isBoolean(value),
|
|
20
|
-
[event.CHANGE_EVENT]: (value) => types.isBoolean(value)
|
|
21
|
-
};
|
|
45
|
+
var CheckTag = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "check-tag.vue"]]);
|
|
22
46
|
|
|
23
|
-
exports
|
|
24
|
-
exports.checkTagProps = checkTagProps;
|
|
47
|
+
exports["default"] = CheckTag;
|
|
25
48
|
//# sourceMappingURL=check-tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-tag.js","sources":["../../../../../../packages/components/check-tag/src/check-tag.
|
|
1
|
+
{"version":3,"file":"check-tag.js","sources":["../../../../../../packages/components/check-tag/src/check-tag.vue"],"sourcesContent":["<template>\n <span :class=\"containerKls\" @click=\"handleChange\">\n <slot />\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport { checkTagEmits, checkTagProps } from './check-tag'\n\ndefineOptions({\n name: 'ElCheckTag',\n})\nconst props = defineProps(checkTagProps)\nconst emit = defineEmits(checkTagEmits)\n\nconst ns = useNamespace('check-tag')\nconst isDisabled = computed(() => props.disabled)\nconst containerKls = computed(() => [\n ns.b(),\n ns.is('checked', props.checked),\n ns.is('disabled', isDisabled.value),\n ns.m(props.type || 'primary'),\n])\n\nconst handleChange = () => {\n if (isDisabled.value) return\n\n const checked = !props.checked\n emit(CHANGE_EVENT, checked)\n emit('update:checked', checked)\n}\n</script>\n"],"names":["useNamespace","computed","CHANGE_EVENT"],"mappings":";;;;;;;;;;uCAYc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,WAAW,CAAA,CAAA;AACnC,IAAA,MAAM,UAAa,GAAAC,YAAA,CAAS,MAAM,KAAA,CAAM,QAAQ,CAAA,CAAA;AAChD,IAAM,MAAA,YAAA,GAAeA,aAAS,MAAM;AAAA,MAClC,GAAG,CAAE,EAAA;AAAA,MACL,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,KAAA,CAAM,OAAO,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,MAClC,EAAG,CAAA,CAAA,CAAE,KAAM,CAAA,IAAA,IAAQ,SAAS,CAAA;AAAA,KAC7B,CAAA,CAAA;AAED,IAAA,MAAM,eAAe,MAAM;AACzB,MAAA,IAAI,WAAW,KAAO;AAEtB,QAAM,OAAA;AACN,MAAA,sBAA0B,CAAA,OAAA,CAAA;AAC1B,MAAA,IAAA,CAAKC,2BAAyB,CAAA,CAAA;AAAA,MAChC,IAAA,CAAA,gBAAA,EAAA,OAAA,CAAA,CAAA;;;;;;;;;;;;;;;;"}
|
|
@@ -2,47 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
8
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
6
|
+
var types = require('../../../utils/types.js');
|
|
9
7
|
var event = require('../../../constants/event.js');
|
|
10
8
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
setup(__props, { emit }) {
|
|
19
|
-
const props = __props;
|
|
20
|
-
const ns = index.useNamespace("check-tag");
|
|
21
|
-
const isDisabled = vue.computed(() => props.disabled);
|
|
22
|
-
const containerKls = vue.computed(() => [
|
|
23
|
-
ns.b(),
|
|
24
|
-
ns.is("checked", props.checked),
|
|
25
|
-
ns.is("disabled", isDisabled.value),
|
|
26
|
-
ns.m(props.type || "primary")
|
|
27
|
-
]);
|
|
28
|
-
const handleChange = () => {
|
|
29
|
-
if (isDisabled.value)
|
|
30
|
-
return;
|
|
31
|
-
const checked = !props.checked;
|
|
32
|
-
emit(event.CHANGE_EVENT, checked);
|
|
33
|
-
emit("update:checked", checked);
|
|
34
|
-
};
|
|
35
|
-
return (_ctx, _cache) => {
|
|
36
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
37
|
-
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
38
|
-
onClick: handleChange
|
|
39
|
-
}, [
|
|
40
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
41
|
-
], 2);
|
|
42
|
-
};
|
|
9
|
+
const checkTagProps = runtime.buildProps({
|
|
10
|
+
checked: Boolean,
|
|
11
|
+
disabled: Boolean,
|
|
12
|
+
type: {
|
|
13
|
+
type: String,
|
|
14
|
+
values: ["primary", "success", "info", "warning", "danger"],
|
|
15
|
+
default: "primary"
|
|
43
16
|
}
|
|
44
17
|
});
|
|
45
|
-
|
|
18
|
+
const checkTagEmits = {
|
|
19
|
+
"update:checked": (value) => types.isBoolean(value),
|
|
20
|
+
[event.CHANGE_EVENT]: (value) => types.isBoolean(value)
|
|
21
|
+
};
|
|
46
22
|
|
|
47
|
-
exports
|
|
23
|
+
exports.checkTagEmits = checkTagEmits;
|
|
24
|
+
exports.checkTagProps = checkTagProps;
|
|
48
25
|
//# sourceMappingURL=check-tag2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-tag2.js","sources":["../../../../../../packages/components/check-tag/src/check-tag.
|
|
1
|
+
{"version":3,"file":"check-tag2.js","sources":["../../../../../../packages/components/check-tag/src/check-tag.ts"],"sourcesContent":["import { buildProps, isBoolean } from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\n\nimport type CheckTag from './check-tag.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const checkTagProps = buildProps({\n /**\n * @description is checked\n */\n checked: Boolean,\n /**\n * @description whether the check-tag is disabled\n */\n disabled: Boolean,\n /**\n * @description type of Tag\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger'],\n default: 'primary',\n },\n} as const)\nexport type CheckTagProps = ExtractPropTypes<typeof checkTagProps>\n\nexport const checkTagEmits = {\n 'update:checked': (value: boolean) => isBoolean(value),\n [CHANGE_EVENT]: (value: boolean) => isBoolean(value),\n}\nexport type CheckTagEmits = typeof checkTagEmits\n\nexport type CheckTagInstance = InstanceType<typeof CheckTag>\n"],"names":["buildProps","isBoolean","CHANGE_EVENT"],"mappings":";;;;;;;;AAEY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC/D,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,gBAAgB,EAAE,CAAC,KAAK,KAAKC,eAAS,CAAC,KAAK,CAAC;AAC/C,EAAE,CAACC,kBAAY,GAAG,CAAC,KAAK,KAAKD,eAAS,CAAC,KAAK,CAAC;AAC7C;;;;;"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var col$1 = require('./src/
|
|
6
|
-
var col = require('./src/
|
|
5
|
+
var col$1 = require('./src/col.js');
|
|
6
|
+
var col = require('./src/col2.js');
|
|
7
7
|
var install = require('../../utils/vue/install.js');
|
|
8
8
|
|
|
9
9
|
const ElCol = install.withInstall(col$1["default"]);
|
|
@@ -2,51 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var col = require('./col2.js');
|
|
7
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
8
|
+
var constants = require('../../row/src/constants.js');
|
|
9
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
10
|
+
var types = require('../../../utils/types.js');
|
|
11
|
+
var shared = require('@vue/shared');
|
|
7
12
|
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
13
|
+
const __default__ = vue.defineComponent({
|
|
14
|
+
name: "ElCol"
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: col.colProps,
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const { gutter } = vue.inject(constants.rowContextKey, { gutter: vue.computed(() => 0) });
|
|
22
|
+
const ns = index.useNamespace("col");
|
|
23
|
+
const style = vue.computed(() => {
|
|
24
|
+
const styles = {};
|
|
25
|
+
if (gutter.value) {
|
|
26
|
+
styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`;
|
|
27
|
+
}
|
|
28
|
+
return styles;
|
|
29
|
+
});
|
|
30
|
+
const colKls = vue.computed(() => {
|
|
31
|
+
const classes = [];
|
|
32
|
+
const pos = ["span", "offset", "pull", "push"];
|
|
33
|
+
pos.forEach((prop) => {
|
|
34
|
+
const size = props[prop];
|
|
35
|
+
if (types.isNumber(size)) {
|
|
36
|
+
if (prop === "span")
|
|
37
|
+
classes.push(ns.b(`${props[prop]}`));
|
|
38
|
+
else if (size > 0)
|
|
39
|
+
classes.push(ns.b(`${prop}-${props[prop]}`));
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const sizes = ["xs", "sm", "md", "lg", "xl"];
|
|
43
|
+
sizes.forEach((size) => {
|
|
44
|
+
if (types.isNumber(props[size])) {
|
|
45
|
+
classes.push(ns.b(`${size}-${props[size]}`));
|
|
46
|
+
} else if (shared.isObject(props[size])) {
|
|
47
|
+
Object.entries(props[size]).forEach(([prop, sizeProp]) => {
|
|
48
|
+
classes.push(prop !== "span" ? ns.b(`${size}-${prop}-${sizeProp}`) : ns.b(`${size}-${sizeProp}`));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
if (gutter.value) {
|
|
53
|
+
classes.push(ns.is("guttered"));
|
|
54
|
+
}
|
|
55
|
+
return [ns.b(), classes];
|
|
56
|
+
});
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
|
|
59
|
+
class: vue.normalizeClass(vue.unref(colKls)),
|
|
60
|
+
style: vue.normalizeStyle(vue.unref(style))
|
|
61
|
+
}, {
|
|
62
|
+
default: vue.withCtx(() => [
|
|
63
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
64
|
+
]),
|
|
65
|
+
_: 3
|
|
66
|
+
}, 8, ["class", "style"]);
|
|
67
|
+
};
|
|
48
68
|
}
|
|
49
69
|
});
|
|
70
|
+
var Col = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "col.vue"]]);
|
|
50
71
|
|
|
51
|
-
exports
|
|
72
|
+
exports["default"] = Col;
|
|
52
73
|
//# sourceMappingURL=col.js.map
|