@element-plus/nightly 0.0.20250823 → 0.0.20250824
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 +4 -6
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +3 -3
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +4 -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/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/breadcrumb/src/breadcrumb-item.vue.d.ts +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/cascader-panel/src/node2.mjs +2 -4
- package/es/components/cascader-panel/src/node2.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/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +79 -21
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +21 -79
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/descriptions/index.mjs +2 -2
- package/es/components/descriptions/src/description.mjs +26 -127
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +127 -26
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +27 -202
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +202 -27
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/form/src/types.d.ts +1 -62
- package/es/components/index.mjs +13 -13
- package/es/components/input-tag/src/input-tag.mjs +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +33 -4
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +4 -33
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +73 -140
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +140 -73
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/popper/src/trigger2.mjs +1 -1
- package/es/components/select/src/select.mjs +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 +48 -18
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +18 -48
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +99 -27
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +27 -99
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/transfer/index.mjs +2 -2
- package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +1 -1
- package/es/components/transfer/src/transfer.mjs +68 -164
- package/es/components/transfer/src/transfer.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +164 -68
- package/es/components/transfer/src/transfer2.mjs.map +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-locale/index.d.ts +5 -2
- package/es/hooks/use-locale/index.mjs.map +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.d.ts +436 -256
- package/es/index.mjs +13 -13
- package/es/utils/typescript.d.ts +61 -0
- package/es/utils/typescript.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/lib/components/breadcrumb/src/breadcrumb-item.vue.d.ts +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/cascader-panel/src/node2.js +2 -4
- package/lib/components/cascader-panel/src/node2.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/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +79 -22
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +22 -79
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/descriptions/index.js +2 -2
- package/lib/components/descriptions/src/description.js +26 -127
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +127 -26
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +28 -202
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +202 -28
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/form/src/types.d.ts +1 -62
- package/lib/components/index.js +18 -18
- package/lib/components/input-tag/src/input-tag.js +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +33 -4
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +4 -33
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +74 -139
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +139 -74
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/popper/src/trigger2.js +1 -1
- package/lib/components/select/src/select.js +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 +48 -18
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +18 -48
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +99 -28
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +28 -99
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/transfer/index.js +2 -2
- package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +1 -1
- package/lib/components/transfer/src/transfer.js +72 -164
- package/lib/components/transfer/src/transfer.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +164 -72
- package/lib/components/transfer/src/transfer2.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-locale/index.d.ts +5 -2
- package/lib/hooks/use-locale/index.js.map +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.d.ts +436 -256
- package/lib/index.js +18 -18
- package/lib/utils/typescript.d.ts +61 -0
- package/lib/utils/typescript.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/web-types.json +1 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { SetupContext, UnwrapRef } from 'vue';
|
2
2
|
import type { RuleItem, ValidateError, ValidateFieldsError } from 'async-validator';
|
3
3
|
import type { ComponentSize } from '@element-plus/nightly/es/constants';
|
4
|
-
import type { Arrayable } from '@element-plus/nightly/es/utils';
|
4
|
+
import type { Arrayable, FieldPath } from '@element-plus/nightly/es/utils';
|
5
5
|
import type { MaybeRef } from '@vueuse/core';
|
6
6
|
import type { FormItemProp, FormItemProps, FormItemValidateState } from './form-item';
|
7
7
|
import type { FormEmits, FormProps } from './form';
|
@@ -10,66 +10,6 @@ export type FormLabelWidthContext = ReturnType<typeof useFormLabelWidth>;
|
|
10
10
|
export interface FormItemRule extends RuleItem {
|
11
11
|
trigger?: Arrayable<string>;
|
12
12
|
}
|
13
|
-
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
14
|
-
type BrowserNativeObject = Date | FileList | File | Blob | RegExp;
|
15
|
-
/**
|
16
|
-
* Check whether it is tuple
|
17
|
-
*
|
18
|
-
* 检查是否为元组
|
19
|
-
*
|
20
|
-
* @example
|
21
|
-
* IsTuple<[1, 2, 3]> => true
|
22
|
-
* IsTuple<Array[number]> => false
|
23
|
-
*/
|
24
|
-
type IsTuple<T extends ReadonlyArray<any>> = number extends T['length'] ? false : true;
|
25
|
-
/**
|
26
|
-
* Array method key
|
27
|
-
*
|
28
|
-
* 数组方法键
|
29
|
-
*/
|
30
|
-
type ArrayMethodKey = keyof any[];
|
31
|
-
/**
|
32
|
-
* Tuple index key
|
33
|
-
*
|
34
|
-
* 元组下标键
|
35
|
-
*
|
36
|
-
* @example
|
37
|
-
* TupleKey<[1, 2, 3]> => '0' | '1' | '2'
|
38
|
-
*/
|
39
|
-
type TupleKey<T extends ReadonlyArray<any>> = Exclude<keyof T, ArrayMethodKey>;
|
40
|
-
/**
|
41
|
-
* Array index key
|
42
|
-
*
|
43
|
-
* 数组下标键
|
44
|
-
*/
|
45
|
-
type ArrayKey = number;
|
46
|
-
/**
|
47
|
-
* Helper type for recursively constructing paths through a type
|
48
|
-
*
|
49
|
-
* 用于通过一个类型递归构建路径的辅助类型
|
50
|
-
*/
|
51
|
-
type PathImpl<K extends string | number, V> = V extends Primitive | BrowserNativeObject ? `${K}` : `${K}` | `${K}.${Path<V>}`;
|
52
|
-
/**
|
53
|
-
* Type which collects all paths through a type
|
54
|
-
*
|
55
|
-
* 通过一个类型收集所有路径的类型
|
56
|
-
*
|
57
|
-
* @see {@link FieldPath}
|
58
|
-
*/
|
59
|
-
type Path<T> = T extends ReadonlyArray<infer V> ? IsTuple<T> extends true ? {
|
60
|
-
[K in TupleKey<T>]-?: PathImpl<Exclude<K, symbol>, T[K]>;
|
61
|
-
}[TupleKey<T>] : PathImpl<ArrayKey, V> : {
|
62
|
-
[K in keyof T]-?: PathImpl<Exclude<K, symbol>, T[K]>;
|
63
|
-
}[keyof T];
|
64
|
-
/**
|
65
|
-
* Type which collects all paths through a type
|
66
|
-
*
|
67
|
-
* 通过一个类型收集所有路径的类型
|
68
|
-
*
|
69
|
-
* @example
|
70
|
-
* FieldPath<{ 1: number; a: number; b: string; c: { d: number; e: string }; f: [{ value: string }]; g: { value: string }[]; h: Date; i: FileList; j: File; k: Blob; l: RegExp }> => '1' | 'a' | 'b' | 'c' | 'f' | 'g' | 'c.d' | 'c.e' | 'f.0' | 'f.0.value' | 'g.number' | 'g.number.value' | 'h' | 'i' | 'j' | 'k' | 'l'
|
71
|
-
*/
|
72
|
-
type FieldPath<T> = T extends object ? Path<T> : never;
|
73
13
|
export type FormRules<T extends MaybeRef<Record<string, any> | string> = string> = Partial<Record<UnwrapRef<T> extends string ? UnwrapRef<T> : FieldPath<UnwrapRef<T>>, Arrayable<FormItemRule>>>;
|
74
14
|
export type FormValidationResult = Promise<boolean>;
|
75
15
|
export type FormValidateCallback = (isValid: boolean, invalidFields?: ValidateFieldsError) => Promise<void> | void;
|
@@ -103,4 +43,3 @@ export interface FormItemContext extends FormItemProps {
|
|
103
43
|
resetField(): void;
|
104
44
|
clearValidate(): void;
|
105
45
|
}
|
106
|
-
export {};
|
package/es/components/index.mjs
CHANGED
@@ -83,10 +83,6 @@ export { ElMessage } from './message/index.mjs';
|
|
83
83
|
export { ElMessageBox } from './message-box/index.mjs';
|
84
84
|
export { ElNotification } from './notification/index.mjs';
|
85
85
|
export { ElPopover, ElPopoverDirective } from './popover/index.mjs';
|
86
|
-
export { default as FixedSizeGrid } from './virtual-list/src/components/fixed-size-grid.mjs';
|
87
|
-
export { default as DynamicSizeGrid } from './virtual-list/src/components/dynamic-size-grid.mjs';
|
88
|
-
export { default as ElLoadingDirective, default as vLoading } from './loading/src/directive.mjs';
|
89
|
-
export { default as ElLoadingService } from './loading/src/service.mjs';
|
90
86
|
export { affixEmits, affixProps } from './affix/src/affix.mjs';
|
91
87
|
export { alertEffects, alertEmits, alertProps } from './alert/src/alert.mjs';
|
92
88
|
export { autocompleteEmits, autocompleteProps } from './autocomplete/src/autocomplete.mjs';
|
@@ -106,7 +102,7 @@ export { CAROUSEL_ITEM_NAME, carouselContextKey } from './carousel/src/constants
|
|
106
102
|
export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
|
107
103
|
export { CASCADER_PANEL_INJECTION_KEY } from './cascader-panel/src/types.mjs';
|
108
104
|
export { CommonProps, DefaultProps, cascaderPanelEmits, cascaderPanelProps, useCascaderConfig } from './cascader-panel/src/config.mjs';
|
109
|
-
export { checkTagEmits, checkTagProps } from './check-tag/src/check-
|
105
|
+
export { checkTagEmits, checkTagProps } from './check-tag/src/check-tag2.mjs';
|
110
106
|
export { checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group.mjs';
|
111
107
|
export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox.mjs';
|
112
108
|
export { checkboxGroupContextKey } from './checkbox/src/constants.mjs';
|
@@ -120,17 +116,17 @@ export { messageConfig } from './config-provider/src/config-provider.mjs';
|
|
120
116
|
export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
|
121
117
|
export { configProviderContextKey } from './config-provider/src/constants.mjs';
|
122
118
|
export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from './config-provider/src/hooks/use-global-config.mjs';
|
123
|
-
export { countdownEmits, countdownProps } from './countdown/src/
|
119
|
+
export { countdownEmits, countdownProps } from './countdown/src/countdown2.mjs';
|
124
120
|
export { datePickerProps } from './date-picker/src/props.mjs';
|
125
121
|
export { ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY } from './date-picker-panel/src/constants.mjs';
|
126
122
|
export { datePickerPanelProps } from './date-picker-panel/src/props/date-picker-panel.mjs';
|
127
|
-
export { descriptionProps } from './descriptions/src/
|
123
|
+
export { descriptionProps } from './descriptions/src/description.mjs';
|
128
124
|
export { descriptionItemProps } from './descriptions/src/description-item.mjs';
|
129
125
|
export { useDialog } from './dialog/src/use-dialog.mjs';
|
130
126
|
export { dialogContextKey, dialogEmits, dialogProps } from './dialog/src/dialog.mjs';
|
131
127
|
export { DEFAULT_DIALOG_TRANSITION, dialogInjectionKey } from './dialog/src/constants.mjs';
|
132
128
|
export { dividerProps } from './divider/src/divider.mjs';
|
133
|
-
export { drawerEmits, drawerProps } from './drawer/src/
|
129
|
+
export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
|
134
130
|
export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown.mjs';
|
135
131
|
export { DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY } from './dropdown/src/tokens.mjs';
|
136
132
|
export { emptyProps } from './empty/src/empty.mjs';
|
@@ -148,7 +144,7 @@ export { inputTagEmits, inputTagProps } from './input-tag/src/input-tag.mjs';
|
|
148
144
|
export { linkEmits, linkProps } from './link/src/link.mjs';
|
149
145
|
export { menuEmits, menuProps } from './menu/src/menu.mjs';
|
150
146
|
export { menuItemEmits, menuItemProps } from './menu/src/menu-item.mjs';
|
151
|
-
export { menuItemGroupProps } from './menu/src/menu-item-
|
147
|
+
export { menuItemGroupProps } from './menu/src/menu-item-group2.mjs';
|
152
148
|
export { subMenuProps } from './menu/src/sub-menu.mjs';
|
153
149
|
export { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './menu/src/tokens.mjs';
|
154
150
|
export { overlayEmits, overlayProps } from './overlay/src/overlay.mjs';
|
@@ -180,7 +176,7 @@ export { scrollbarContextKey } from './scrollbar/src/constants.mjs';
|
|
180
176
|
export { selectGroupKey, selectKey } from './select/src/token.mjs';
|
181
177
|
export { selectEmits, selectProps } from './select/src/select.mjs';
|
182
178
|
export { selectV2InjectionKey } from './select-v2/src/token.mjs';
|
183
|
-
export { skeletonProps } from './skeleton/src/
|
179
|
+
export { skeletonProps } from './skeleton/src/skeleton2.mjs';
|
184
180
|
export { skeletonItemProps } from './skeleton/src/skeleton-item.mjs';
|
185
181
|
export { sliderEmits, sliderProps } from './slider/src/slider.mjs';
|
186
182
|
export { sliderContextKey } from './slider/src/constants.mjs';
|
@@ -203,7 +199,7 @@ export { tabBarProps } from './tabs/src/tab-bar.mjs';
|
|
203
199
|
export { tabNavEmits, tabNavProps } from './tabs/src/tab-nav.mjs';
|
204
200
|
export { tabPaneProps } from './tabs/src/tab-pane.mjs';
|
205
201
|
export { tabsRootContextKey } from './tabs/src/constants.mjs';
|
206
|
-
export { tagEmits, tagProps } from './tag/src/
|
202
|
+
export { tagEmits, tagProps } from './tag/src/tag2.mjs';
|
207
203
|
export { textProps } from './text/src/text.mjs';
|
208
204
|
export { buildTimeList, dateEquals, dayOrDaysToDate, extractDateFormat, extractTimeFormat, formatter, makeList, parseDate, rangeArr, valueEquals } from './time-picker/src/utils.mjs';
|
209
205
|
export { DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, PICKER_BASE_INJECTION_KEY, PICKER_POPPER_OPTIONS_INJECTION_KEY, ROOT_COMMON_PICKER_INJECTION_KEY, timeUnits } from './time-picker/src/constants.mjs';
|
@@ -217,7 +213,7 @@ export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useToo
|
|
217
213
|
export { useTooltipTriggerProps } from './tooltip/src/trigger2.mjs';
|
218
214
|
export { useTooltipContentProps } from './tooltip/src/content.mjs';
|
219
215
|
export { TOOLTIP_INJECTION_KEY } from './tooltip/src/constants.mjs';
|
220
|
-
export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/
|
216
|
+
export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/transfer.mjs';
|
221
217
|
export { NODE_INSTANCE_INJECTION_KEY, ROOT_TREE_INJECTION_KEY, TREE_NODE_MAP_INJECTION_KEY } from './tree/src/tokens.mjs';
|
222
218
|
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './upload/src/upload.mjs';
|
223
219
|
export { uploadContentProps } from './upload/src/upload-content.mjs';
|
@@ -226,6 +222,8 @@ export { uploadDraggerEmits, uploadDraggerProps } from './upload/src/upload-drag
|
|
226
222
|
export { uploadContextKey } from './upload/src/constants.mjs';
|
227
223
|
export { default as FixedSizeList } from './virtual-list/src/components/fixed-size-list.mjs';
|
228
224
|
export { default as DynamicSizeList } from './virtual-list/src/components/dynamic-size-list.mjs';
|
225
|
+
export { default as FixedSizeGrid } from './virtual-list/src/components/fixed-size-grid.mjs';
|
226
|
+
export { default as DynamicSizeGrid } from './virtual-list/src/components/dynamic-size-grid.mjs';
|
229
227
|
export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './virtual-list/src/props.mjs';
|
230
228
|
export { watermarkProps } from './watermark/src/watermark.mjs';
|
231
229
|
export { tourEmits, tourProps } from './tour/src/tour.mjs';
|
@@ -236,7 +234,9 @@ export { defaultProps, segmentedEmits, segmentedProps } from './segmented/src/se
|
|
236
234
|
export { mentionEmits, mentionProps } from './mention/src/mention.mjs';
|
237
235
|
export { splitterProps } from './splitter/src/splitter.mjs';
|
238
236
|
export { splitterPanelProps } from './splitter/src/split-panel.mjs';
|
237
|
+
export { default as ElLoadingDirective, default as vLoading } from './loading/src/directive.mjs';
|
238
|
+
export { default as ElLoadingService } from './loading/src/service.mjs';
|
239
239
|
export { MESSAGE_DEFAULT_PLACEMENT, messageDefaults, messageEmits, messagePlacement, messageProps, messageTypes } from './message/src/message.mjs';
|
240
|
-
export { notificationEmits, notificationProps, notificationTypes } from './notification/src/
|
240
|
+
export { notificationEmits, notificationProps, notificationTypes } from './notification/src/notification.mjs';
|
241
241
|
export { popoverEmits, popoverProps } from './popover/src/popover.mjs';
|
242
242
|
//# sourceMappingURL=index.mjs.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { tagProps } from '../../tag/src/
|
1
|
+
import { tagProps } from '../../tag/src/tag2.mjs';
|
2
2
|
import { CircleClose } from '@element-plus/icons-vue';
|
3
3
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
4
4
|
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import Menu from './src/menu.mjs';
|
2
2
|
export { menuEmits, menuProps } from './src/menu.mjs';
|
3
3
|
import MenuItem from './src/menu-item2.mjs';
|
4
|
-
import MenuItemGroup from './src/menu-item-
|
4
|
+
import MenuItemGroup from './src/menu-item-group.mjs';
|
5
5
|
import SubMenu from './src/sub-menu.mjs';
|
6
6
|
export { subMenuProps } from './src/sub-menu.mjs';
|
7
7
|
export { menuItemEmits, menuItemProps } from './src/menu-item.mjs';
|
8
|
-
export { menuItemGroupProps } from './src/menu-item-
|
8
|
+
export { menuItemGroupProps } from './src/menu-item-group2.mjs';
|
9
9
|
export { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './src/tokens.mjs';
|
10
10
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
11
11
|
|
@@ -1,6 +1,35 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, Fragment, createTextVNode, toDisplayString, renderSlot } from 'vue';
|
2
|
+
import { menuItemGroupProps } from './menu-item-group2.mjs';
|
3
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
4
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
4
5
|
|
5
|
-
|
6
|
+
const __default__ = defineComponent({
|
7
|
+
name: "ElMenuItemGroup"
|
8
|
+
});
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
10
|
+
...__default__,
|
11
|
+
props: menuItemGroupProps,
|
12
|
+
setup(__props) {
|
13
|
+
const ns = useNamespace("menu-item-group");
|
14
|
+
return (_ctx, _cache) => {
|
15
|
+
return openBlock(), createElementBlock("li", {
|
16
|
+
class: normalizeClass(unref(ns).b())
|
17
|
+
}, [
|
18
|
+
createElementVNode("div", {
|
19
|
+
class: normalizeClass(unref(ns).e("title"))
|
20
|
+
}, [
|
21
|
+
!_ctx.$slots.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
22
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
23
|
+
], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 })
|
24
|
+
], 2),
|
25
|
+
createElementVNode("ul", null, [
|
26
|
+
renderSlot(_ctx.$slots, "default")
|
27
|
+
])
|
28
|
+
], 2);
|
29
|
+
};
|
30
|
+
}
|
31
|
+
});
|
32
|
+
var MenuItemGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "menu-item-group.vue"]]);
|
33
|
+
|
34
|
+
export { MenuItemGroup as default };
|
6
35
|
//# sourceMappingURL=menu-item-group.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"menu-item-group.mjs","sources":["../../../../../../packages/components/menu/src/menu-item-group.
|
1
|
+
{"version":3,"file":"menu-item-group.mjs","sources":["../../../../../../packages/components/menu/src/menu-item-group.vue"],"sourcesContent":["<template>\n <li :class=\"ns.b()\">\n <div :class=\"ns.e('title')\">\n <template v-if=\"!$slots.title\">{{ title }}</template>\n <slot v-else name=\"title\" />\n </div>\n <ul>\n <slot />\n </ul>\n </li>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { menuItemGroupProps } from './menu-item-group'\n\ndefineOptions({\n name: 'ElMenuItemGroup',\n})\ndefineProps(menuItemGroupProps)\nconst ns = useNamespace('menu-item-group')\n</script>\n"],"names":[],"mappings":";;;;;mCAgBc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;AAEA,IAAM,MAAA,EAAA,GAAK,aAAa,iBAAiB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,35 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
1
|
+
const menuItemGroupProps = {
|
2
|
+
title: String
|
3
|
+
};
|
5
4
|
|
6
|
-
|
7
|
-
name: "ElMenuItemGroup"
|
8
|
-
});
|
9
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
10
|
-
...__default__,
|
11
|
-
props: menuItemGroupProps,
|
12
|
-
setup(__props) {
|
13
|
-
const ns = useNamespace("menu-item-group");
|
14
|
-
return (_ctx, _cache) => {
|
15
|
-
return openBlock(), createElementBlock("li", {
|
16
|
-
class: normalizeClass(unref(ns).b())
|
17
|
-
}, [
|
18
|
-
createElementVNode("div", {
|
19
|
-
class: normalizeClass(unref(ns).e("title"))
|
20
|
-
}, [
|
21
|
-
!_ctx.$slots.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
22
|
-
createTextVNode(toDisplayString(_ctx.title), 1)
|
23
|
-
], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 })
|
24
|
-
], 2),
|
25
|
-
createElementVNode("ul", null, [
|
26
|
-
renderSlot(_ctx.$slots, "default")
|
27
|
-
])
|
28
|
-
], 2);
|
29
|
-
};
|
30
|
-
}
|
31
|
-
});
|
32
|
-
var MenuItemGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "menu-item-group.vue"]]);
|
33
|
-
|
34
|
-
export { MenuItemGroup as default };
|
5
|
+
export { menuItemGroupProps };
|
35
6
|
//# sourceMappingURL=menu-item-group2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"menu-item-group2.mjs","sources":["../../../../../../packages/components/menu/src/menu-item-group.
|
1
|
+
{"version":3,"file":"menu-item-group2.mjs","sources":["../../../../../../packages/components/menu/src/menu-item-group.ts"],"sourcesContent":["import type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const menuItemGroupProps = {\n /**\n * @description group title\n */\n title: String,\n} as const\nexport type MenuItemGroupProps = ExtractPropTypes<typeof menuItemGroupProps>\nexport type MenuItemGroupPropsPublic = __ExtractPublicPropTypes<\n typeof menuItemGroupProps\n>\n"],"names":[],"mappings":"AAAY,MAAC,kBAAkB,GAAG;AAClC,EAAE,KAAK,EAAE,MAAM;AACf;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import notify from './src/notify.mjs';
|
2
|
-
export { notificationEmits, notificationProps, notificationTypes } from './src/
|
2
|
+
export { notificationEmits, notificationProps, notificationTypes } from './src/notification.mjs';
|
3
3
|
import { withInstallFunction } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElNotification = withInstallFunction(notify, "$notify");
|
@@ -1,145 +1,78 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { notificationProps, notificationEmits } from './notification2.mjs';
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
-
import { useGlobalComponentSettings } from '../../config-provider/src/hooks/use-global-config.mjs';
|
7
|
-
import { TypeComponentsMap } from '../../../utils/vue/icon.mjs';
|
8
|
-
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
1
|
+
import { Close } from '@element-plus/icons-vue';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
9
4
|
|
10
|
-
const
|
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
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
return (_ctx, _cache) => {
|
77
|
-
return openBlock(), createBlock(Transition, {
|
78
|
-
name: unref(ns).b("fade"),
|
79
|
-
onBeforeLeave: _ctx.onClose,
|
80
|
-
onAfterLeave: ($event) => _ctx.$emit("destroy"),
|
81
|
-
persisted: ""
|
82
|
-
}, {
|
83
|
-
default: withCtx(() => [
|
84
|
-
withDirectives(createElementVNode("div", {
|
85
|
-
id: _ctx.id,
|
86
|
-
class: normalizeClass([unref(ns).b(), _ctx.customClass, unref(horizontalClass)]),
|
87
|
-
style: normalizeStyle(unref(positionStyle)),
|
88
|
-
role: "alert",
|
89
|
-
onMouseenter: clearTimer,
|
90
|
-
onMouseleave: startTimer,
|
91
|
-
onClick: _ctx.onClick
|
92
|
-
}, [
|
93
|
-
unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
|
94
|
-
key: 0,
|
95
|
-
class: normalizeClass([unref(ns).e("icon"), unref(typeClass)])
|
96
|
-
}, {
|
97
|
-
default: withCtx(() => [
|
98
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
|
99
|
-
]),
|
100
|
-
_: 1
|
101
|
-
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
102
|
-
createElementVNode("div", {
|
103
|
-
class: normalizeClass(unref(ns).e("group"))
|
104
|
-
}, [
|
105
|
-
createElementVNode("h2", {
|
106
|
-
class: normalizeClass(unref(ns).e("title")),
|
107
|
-
textContent: toDisplayString(_ctx.title)
|
108
|
-
}, null, 10, ["textContent"]),
|
109
|
-
withDirectives(createElementVNode("div", {
|
110
|
-
class: normalizeClass(unref(ns).e("content")),
|
111
|
-
style: normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
|
112
|
-
}, [
|
113
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
114
|
-
!_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", { key: 0 }, toDisplayString(_ctx.message), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
115
|
-
createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
116
|
-
createElementVNode("p", { innerHTML: _ctx.message }, null, 8, ["innerHTML"])
|
117
|
-
], 2112))
|
118
|
-
])
|
119
|
-
], 6), [
|
120
|
-
[vShow, _ctx.message]
|
121
|
-
]),
|
122
|
-
_ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), {
|
123
|
-
key: 0,
|
124
|
-
class: normalizeClass(unref(ns).e("closeBtn")),
|
125
|
-
onClick: withModifiers(close, ["stop"])
|
126
|
-
}, {
|
127
|
-
default: withCtx(() => [
|
128
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon)))
|
129
|
-
]),
|
130
|
-
_: 1
|
131
|
-
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
|
132
|
-
], 2)
|
133
|
-
], 46, ["id", "onClick"]), [
|
134
|
-
[vShow, visible.value]
|
135
|
-
])
|
136
|
-
]),
|
137
|
-
_: 3
|
138
|
-
}, 8, ["name", "onBeforeLeave", "onAfterLeave"]);
|
139
|
-
};
|
5
|
+
const notificationTypes = [
|
6
|
+
"primary",
|
7
|
+
"success",
|
8
|
+
"info",
|
9
|
+
"warning",
|
10
|
+
"error"
|
11
|
+
];
|
12
|
+
const notificationProps = buildProps({
|
13
|
+
customClass: {
|
14
|
+
type: String,
|
15
|
+
default: ""
|
16
|
+
},
|
17
|
+
dangerouslyUseHTMLString: Boolean,
|
18
|
+
duration: {
|
19
|
+
type: Number,
|
20
|
+
default: 4500
|
21
|
+
},
|
22
|
+
icon: {
|
23
|
+
type: iconPropType
|
24
|
+
},
|
25
|
+
id: {
|
26
|
+
type: String,
|
27
|
+
default: ""
|
28
|
+
},
|
29
|
+
message: {
|
30
|
+
type: definePropType([
|
31
|
+
String,
|
32
|
+
Object,
|
33
|
+
Function
|
34
|
+
]),
|
35
|
+
default: ""
|
36
|
+
},
|
37
|
+
offset: {
|
38
|
+
type: Number,
|
39
|
+
default: 0
|
40
|
+
},
|
41
|
+
onClick: {
|
42
|
+
type: definePropType(Function),
|
43
|
+
default: () => void 0
|
44
|
+
},
|
45
|
+
onClose: {
|
46
|
+
type: definePropType(Function),
|
47
|
+
required: true
|
48
|
+
},
|
49
|
+
position: {
|
50
|
+
type: String,
|
51
|
+
values: ["top-right", "top-left", "bottom-right", "bottom-left"],
|
52
|
+
default: "top-right"
|
53
|
+
},
|
54
|
+
showClose: {
|
55
|
+
type: Boolean,
|
56
|
+
default: true
|
57
|
+
},
|
58
|
+
title: {
|
59
|
+
type: String,
|
60
|
+
default: ""
|
61
|
+
},
|
62
|
+
type: {
|
63
|
+
type: String,
|
64
|
+
values: [...notificationTypes, ""],
|
65
|
+
default: ""
|
66
|
+
},
|
67
|
+
zIndex: Number,
|
68
|
+
closeIcon: {
|
69
|
+
type: iconPropType,
|
70
|
+
default: Close
|
140
71
|
}
|
141
72
|
});
|
142
|
-
|
73
|
+
const notificationEmits = {
|
74
|
+
destroy: () => true
|
75
|
+
};
|
143
76
|
|
144
|
-
export {
|
77
|
+
export { notificationEmits, notificationProps, notificationTypes };
|
145
78
|
//# sourceMappingURL=notification.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"notification.mjs","sources":["../../../../../../packages/components/notification/src/notification.
|
1
|
+
{"version":3,"file":"notification.mjs","sources":["../../../../../../packages/components/notification/src/notification.ts"],"sourcesContent":["import { Close } from '@element-plus/icons-vue'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\n\nimport type {\n AppContext,\n ExtractPropTypes,\n VNode,\n __ExtractPublicPropTypes,\n} from 'vue'\nimport type Notification from './notification.vue'\n\nexport const notificationTypes = [\n 'primary',\n 'success',\n 'info',\n 'warning',\n 'error',\n] as const\n\nexport const notificationProps = buildProps({\n /**\n * @description custom class name for Notification\n */\n customClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether `message` is treated as HTML string\n */\n dangerouslyUseHTMLString: Boolean,\n /**\n * @description duration before close. It will not automatically close if set 0\n */\n duration: {\n type: Number,\n default: 4500,\n },\n /**\n * @description custom icon component. It will be overridden by `type`\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description notification dom id\n */\n id: {\n type: String,\n default: '',\n },\n /**\n * @description description text\n */\n message: {\n type: definePropType<string | VNode | (() => VNode)>([\n String,\n Object,\n Function,\n ]),\n default: '',\n },\n /**\n * @description offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description callback function when notification clicked\n */\n onClick: {\n type: definePropType<() => void>(Function),\n default: () => undefined,\n },\n /**\n * @description callback function when closed\n */\n onClose: {\n type: definePropType<() => void>(Function),\n required: true,\n },\n /**\n * @description custom position\n */\n position: {\n type: String,\n values: ['top-right', 'top-left', 'bottom-right', 'bottom-left'],\n default: 'top-right',\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description notification type\n */\n type: {\n type: String,\n values: [...notificationTypes, ''],\n default: '',\n },\n /**\n * @description initial zIndex\n */\n zIndex: Number,\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n default: Close,\n },\n} as const)\nexport type NotificationProps = ExtractPropTypes<typeof notificationProps>\nexport type NotificationPropsPublic = __ExtractPublicPropTypes<\n typeof notificationProps\n>\n\nexport const notificationEmits = {\n destroy: () => true,\n}\nexport type NotificationEmits = typeof notificationEmits\n\nexport type NotificationInstance = InstanceType<typeof Notification> & unknown\n\nexport type NotificationOptions = Omit<NotificationProps, 'id' | 'onClose'> & {\n /**\n * @description set the root element for the notification, default to `document.body`\n */\n appendTo?: HTMLElement | string\n /**\n * @description callback function when closed\n */\n onClose?(vm: VNode): void\n}\nexport type NotificationOptionsTyped = Omit<NotificationOptions, 'type'>\n\nexport interface NotificationHandle {\n close: () => void\n}\n\nexport type NotificationParams = Partial<NotificationOptions> | string | VNode\nexport type NotificationParamsTyped =\n | Partial<NotificationOptionsTyped>\n | string\n | VNode\n\nexport interface NotifyFn {\n (\n options?: NotificationParams,\n appContext?: null | AppContext\n ): NotificationHandle\n closeAll(): void\n updateOffsets(position?: NotificationOptions['position']): void\n _context: AppContext | null\n}\n\nexport type NotifyTypedFn = (\n options?: NotificationParamsTyped,\n appContext?: null | AppContext\n) => NotificationHandle\n\nexport interface Notify extends NotifyFn {\n primary: NotifyTypedFn\n success: NotifyTypedFn\n warning: NotifyTypedFn\n error: NotifyTypedFn\n info: NotifyTypedFn\n}\n\nexport interface NotificationQueueItem {\n vm: VNode\n}\n\nexport type NotificationQueue = NotificationQueueItem[]\n"],"names":[],"mappings":";;;;AAEY,MAAC,iBAAiB,GAAG;AACjC,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,SAAS;AACX,EAAE,OAAO;AACT,EAAE;AACU,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,wBAAwB,EAAE,OAAO;AACnC,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC;AACzB,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,MAAM,QAAQ;AACd,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,MAAM,KAAK,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,CAAC;AACpE,IAAI,OAAO,EAAE,WAAW;AACxB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,GAAG,iBAAiB,EAAE,EAAE,CAAC;AACtC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,OAAO,EAAE,MAAM,IAAI;AACrB;;;;"}
|