@element-plus/nightly 0.0.20240211 → 0.0.20240213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +36 -96
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +96 -36
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +67 -32
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +32 -67
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +56 -11
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +11 -56
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +43 -21
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +21 -43
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-group.mjs +28 -72
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +72 -28
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +43 -66
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +66 -43
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/index.mjs +8 -8
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +4 -35
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +35 -4
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +7 -75
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +75 -7
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/index.mjs +8 -8
- 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 +37 -95
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +95 -37
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +67 -33
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +33 -67
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +56 -11
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +11 -56
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +43 -21
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +21 -43
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-group.js +29 -72
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +72 -29
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +43 -66
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +66 -43
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/index.js +8 -8
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +4 -35
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +35 -4
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +7 -75
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +75 -7
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/index.js +8 -8
- 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,16 +1,61 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, getCurrentInstance, inject, ref, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createBlock, withCtx, resolveDynamicComponent, toDisplayString } from 'vue';
|
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { breadcrumbKey } from './constants.mjs';
|
|
5
|
+
import { breadcrumbItemProps } from './breadcrumb-item2.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
3
8
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const __default__ = defineComponent({
|
|
10
|
+
name: "ElBreadcrumbItem"
|
|
11
|
+
});
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: breadcrumbItemProps,
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const instance = getCurrentInstance();
|
|
18
|
+
const breadcrumbContext = inject(breadcrumbKey, void 0);
|
|
19
|
+
const ns = useNamespace("breadcrumb");
|
|
20
|
+
const router = instance.appContext.config.globalProperties.$router;
|
|
21
|
+
const link = ref();
|
|
22
|
+
const onClick = () => {
|
|
23
|
+
if (!props.to || !router)
|
|
24
|
+
return;
|
|
25
|
+
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
26
|
+
};
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
return openBlock(), createElementBlock("span", {
|
|
30
|
+
class: normalizeClass(unref(ns).e("item"))
|
|
31
|
+
}, [
|
|
32
|
+
createElementVNode("span", {
|
|
33
|
+
ref_key: "link",
|
|
34
|
+
ref: link,
|
|
35
|
+
class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
|
|
36
|
+
role: "link",
|
|
37
|
+
onClick
|
|
38
|
+
}, [
|
|
39
|
+
renderSlot(_ctx.$slots, "default")
|
|
40
|
+
], 2),
|
|
41
|
+
((_a = unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: normalizeClass(unref(ns).e("separator"))
|
|
44
|
+
}, {
|
|
45
|
+
default: withCtx(() => [
|
|
46
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon)))
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
}, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
50
|
+
key: 1,
|
|
51
|
+
class: normalizeClass(unref(ns).e("separator")),
|
|
52
|
+
role: "presentation"
|
|
53
|
+
}, toDisplayString((_b = unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3))
|
|
54
|
+
], 2);
|
|
55
|
+
};
|
|
12
56
|
}
|
|
13
57
|
});
|
|
58
|
+
var BreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "breadcrumb-item.vue"]]);
|
|
14
59
|
|
|
15
|
-
export {
|
|
60
|
+
export { BreadcrumbItem as default };
|
|
16
61
|
//# sourceMappingURL=breadcrumb-item.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('item')\">\n <span\n ref=\"link\"\n :class=\"[ns.e('inner'), ns.is('link', !!to)]\"\n role=\"link\"\n @click=\"onClick\"\n >\n <slot />\n </span>\n <el-icon v-if=\"breadcrumbContext?.separatorIcon\" :class=\"ns.e('separator')\">\n <component :is=\"breadcrumbContext.separatorIcon\" />\n </el-icon>\n <span v-else :class=\"ns.e('separator')\" role=\"presentation\">\n {{ breadcrumbContext?.separator }}\n </span>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { getCurrentInstance, inject, ref } from 'vue'\nimport ElIcon from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { breadcrumbKey } from './constants'\nimport { breadcrumbItemProps } from './breadcrumb-item'\n\nimport type { Router } from 'vue-router'\n\ndefineOptions({\n name: 'ElBreadcrumbItem',\n})\n\nconst props = defineProps(breadcrumbItemProps)\n\nconst instance = getCurrentInstance()!\nconst breadcrumbContext = inject(breadcrumbKey, undefined)\nconst ns = useNamespace('breadcrumb')\n\nconst router = instance.appContext.config.globalProperties.$router as Router\n\nconst link = ref<HTMLSpanElement>()\n\nconst onClick = () => {\n if (!props.to || !router) return\n props.replace ? router.replace(props.to) : router.push(props.to)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;mCA4Bc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAM,MAAA,iBAAA,GAAoB,MAAO,CAAA,aAAA,EAAe,KAAS,CAAA,CAAA,CAAA;AACzD,IAAM,MAAA,EAAA,GAAK,aAAa,YAAY,CAAA,CAAA;AAEpC,IAAA,MAAM,MAAS,GAAA,QAAA,CAAS,UAAW,CAAA,MAAA,CAAO,gBAAiB,CAAA,OAAA,CAAA;AAE3D,IAAA,MAAM,OAAO,GAAqB,EAAA,CAAA;AAElC,IAAA,MAAM,UAAU,MAAM;AACpB,MAAI,IAAA,CAAC,KAAM,CAAA,EAAA,IAAM,CAAC,MAAA;AAAQ,QAAA,OAAA;AAC1B,MAAM,KAAA,CAAA,OAAA,GAAU,OAAO,OAAQ,CAAA,KAAA,CAAM,EAAE,CAAI,GAAA,MAAA,CAAO,IAAK,CAAA,KAAA,CAAM,EAAE,CAAA,CAAA;AAAA,KACjE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,61 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
|
-
import { breadcrumbKey } from './constants.mjs';
|
|
5
|
-
import { breadcrumbItemProps } from './breadcrumb-item.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
8
3
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const instance = getCurrentInstance();
|
|
18
|
-
const breadcrumbContext = inject(breadcrumbKey, void 0);
|
|
19
|
-
const ns = useNamespace("breadcrumb");
|
|
20
|
-
const router = instance.appContext.config.globalProperties.$router;
|
|
21
|
-
const link = ref();
|
|
22
|
-
const onClick = () => {
|
|
23
|
-
if (!props.to || !router)
|
|
24
|
-
return;
|
|
25
|
-
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
26
|
-
};
|
|
27
|
-
return (_ctx, _cache) => {
|
|
28
|
-
var _a, _b;
|
|
29
|
-
return openBlock(), createElementBlock("span", {
|
|
30
|
-
class: normalizeClass(unref(ns).e("item"))
|
|
31
|
-
}, [
|
|
32
|
-
createElementVNode("span", {
|
|
33
|
-
ref_key: "link",
|
|
34
|
-
ref: link,
|
|
35
|
-
class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
|
|
36
|
-
role: "link",
|
|
37
|
-
onClick
|
|
38
|
-
}, [
|
|
39
|
-
renderSlot(_ctx.$slots, "default")
|
|
40
|
-
], 2),
|
|
41
|
-
((_a = unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: normalizeClass(unref(ns).e("separator"))
|
|
44
|
-
}, {
|
|
45
|
-
default: withCtx(() => [
|
|
46
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon)))
|
|
47
|
-
]),
|
|
48
|
-
_: 1
|
|
49
|
-
}, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
50
|
-
key: 1,
|
|
51
|
-
class: normalizeClass(unref(ns).e("separator")),
|
|
52
|
-
role: "presentation"
|
|
53
|
-
}, toDisplayString((_b = unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3))
|
|
54
|
-
], 2);
|
|
55
|
-
};
|
|
4
|
+
const breadcrumbItemProps = buildProps({
|
|
5
|
+
to: {
|
|
6
|
+
type: definePropType([String, Object]),
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
replace: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
56
12
|
}
|
|
57
13
|
});
|
|
58
|
-
var BreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "breadcrumb-item.vue"]]);
|
|
59
14
|
|
|
60
|
-
export {
|
|
15
|
+
export { breadcrumbItemProps };
|
|
61
16
|
//# sourceMappingURL=breadcrumb-item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item2.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item2.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nexport const breadcrumbItemProps = buildProps({\n /**\n * @description target route of the link, same as `to` of `vue-router`\n */\n to: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n default: '',\n },\n /**\n * @description if `true`, the navigation will not leave a history record\n */\n replace: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type BreadcrumbItemProps = ExtractPropTypes<typeof breadcrumbItemProps>\n"],"names":[],"mappings":";;;AACY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Card from './src/
|
|
3
|
-
export { cardProps } from './src/
|
|
2
|
+
import Card from './src/card.mjs';
|
|
3
|
+
export { cardProps } from './src/card2.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElCard = withInstall(Card);
|
|
@@ -1,26 +1,48 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle } from 'vue';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
3
|
+
import { cardProps } from './card2.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
3
6
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
const __default__ = defineComponent({
|
|
8
|
+
name: "ElCard"
|
|
9
|
+
});
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
+
...__default__,
|
|
12
|
+
props: cardProps,
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const ns = useNamespace("card");
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return openBlock(), createElementBlock("div", {
|
|
17
|
+
class: normalizeClass([unref(ns).b(), unref(ns).is(`${_ctx.shadow}-shadow`)])
|
|
18
|
+
}, [
|
|
19
|
+
_ctx.$slots.header || _ctx.header ? (openBlock(), createElementBlock("div", {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: normalizeClass(unref(ns).e("header"))
|
|
22
|
+
}, [
|
|
23
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
24
|
+
createTextVNode(toDisplayString(_ctx.header), 1)
|
|
25
|
+
])
|
|
26
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
27
|
+
createElementVNode("div", {
|
|
28
|
+
class: normalizeClass([unref(ns).e("body"), _ctx.bodyClass]),
|
|
29
|
+
style: normalizeStyle(_ctx.bodyStyle)
|
|
30
|
+
}, [
|
|
31
|
+
renderSlot(_ctx.$slots, "default")
|
|
32
|
+
], 6),
|
|
33
|
+
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", {
|
|
34
|
+
key: 1,
|
|
35
|
+
class: normalizeClass(unref(ns).e("footer"))
|
|
36
|
+
}, [
|
|
37
|
+
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
38
|
+
createTextVNode(toDisplayString(_ctx.footer), 1)
|
|
39
|
+
])
|
|
40
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
41
|
+
], 2);
|
|
42
|
+
};
|
|
22
43
|
}
|
|
23
44
|
});
|
|
45
|
+
var Card = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "card.vue"]]);
|
|
24
46
|
|
|
25
|
-
export {
|
|
47
|
+
export { Card as default };
|
|
26
48
|
//# sourceMappingURL=card.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.mjs","sources":["../../../../../../packages/components/card/src/card.
|
|
1
|
+
{"version":3,"file":"card.mjs","sources":["../../../../../../packages/components/card/src/card.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.is(`${shadow}-shadow`)]\">\n <div v-if=\"$slots.header || header\" :class=\"ns.e('header')\">\n <slot name=\"header\">{{ header }}</slot>\n </div>\n <div :class=\"[ns.e('body'), bodyClass]\" :style=\"bodyStyle\">\n <slot />\n </div>\n <div v-if=\"$slots.footer || footer\" :class=\"ns.e('footer')\">\n <slot name=\"footer\">{{ footer }}</slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { cardProps } from './card'\n\ndefineOptions({\n name: 'ElCard',\n})\n\ndefineProps(cardProps)\n\nconst ns = useNamespace('card')\n</script>\n"],"names":[],"mappings":";;;;;;mCAiBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,48 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '../../../
|
|
3
|
-
import { cardProps } from './card.mjs';
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
6
3
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
])
|
|
26
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
27
|
-
createElementVNode("div", {
|
|
28
|
-
class: normalizeClass([unref(ns).e("body"), _ctx.bodyClass]),
|
|
29
|
-
style: normalizeStyle(_ctx.bodyStyle)
|
|
30
|
-
}, [
|
|
31
|
-
renderSlot(_ctx.$slots, "default")
|
|
32
|
-
], 6),
|
|
33
|
-
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", {
|
|
34
|
-
key: 1,
|
|
35
|
-
class: normalizeClass(unref(ns).e("footer"))
|
|
36
|
-
}, [
|
|
37
|
-
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
38
|
-
createTextVNode(toDisplayString(_ctx.footer), 1)
|
|
39
|
-
])
|
|
40
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
41
|
-
], 2);
|
|
42
|
-
};
|
|
4
|
+
const cardProps = buildProps({
|
|
5
|
+
header: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
footer: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
bodyStyle: {
|
|
14
|
+
type: definePropType([String, Object, Array]),
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
bodyClass: String,
|
|
18
|
+
shadow: {
|
|
19
|
+
type: String,
|
|
20
|
+
values: ["always", "hover", "never"],
|
|
21
|
+
default: "always"
|
|
43
22
|
}
|
|
44
23
|
});
|
|
45
|
-
var Card = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "card.vue"]]);
|
|
46
24
|
|
|
47
|
-
export {
|
|
25
|
+
export { cardProps };
|
|
48
26
|
//# sourceMappingURL=card2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card2.mjs","sources":["../../../../../../packages/components/card/src/card.
|
|
1
|
+
{"version":3,"file":"card2.mjs","sources":["../../../../../../packages/components/card/src/card.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport const cardProps = buildProps({\n /**\n * @description title of the card. Also accepts a DOM passed by `slot#header`\n */\n header: {\n type: String,\n default: '',\n },\n footer: {\n type: String,\n default: '',\n },\n /**\n * @description CSS style of card body\n */\n bodyStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n default: '',\n },\n /**\n * @description custom class name of card body\n */\n bodyClass: String,\n /**\n * @description when to show card shadows\n */\n shadow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'always',\n },\n} as const)\nexport type CardProps = ExtractPropTypes<typeof cardProps>\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;AACxC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import Checkbox from './src/checkbox2.mjs';
|
|
3
3
|
import CheckboxButton from './src/checkbox-button.mjs';
|
|
4
|
-
import CheckboxGroup from './src/checkbox-
|
|
5
|
-
export { checkboxGroupEmits, checkboxGroupProps } from './src/checkbox-
|
|
4
|
+
import CheckboxGroup from './src/checkbox-group2.mjs';
|
|
5
|
+
export { checkboxGroupEmits, checkboxGroupProps } from './src/checkbox-group.mjs';
|
|
6
6
|
export { checkboxEmits, checkboxProps } from './src/checkbox.mjs';
|
|
7
7
|
export { checkboxGroupContextKey } from './src/constants.mjs';
|
|
8
8
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
@@ -1,80 +1,36 @@
|
|
|
1
|
-
import { defineComponent, nextTick, computed, provide, toRefs, watch, openBlock, createBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, renderSlot } from 'vue';
|
|
2
|
-
import { pick } from 'lodash-unified';
|
|
3
1
|
import '../../../constants/index.mjs';
|
|
4
|
-
import '../../../utils/index.mjs';
|
|
5
2
|
import '../../../hooks/index.mjs';
|
|
6
|
-
import '
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
11
|
-
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
|
3
|
+
import '../../../utils/index.mjs';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
12
6
|
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
13
|
-
import {
|
|
7
|
+
import { isArray } from '@vue/shared';
|
|
14
8
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const modelValue = computed({
|
|
35
|
-
get() {
|
|
36
|
-
return props.modelValue;
|
|
37
|
-
},
|
|
38
|
-
set(val) {
|
|
39
|
-
changeEvent(val);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
provide(checkboxGroupContextKey, {
|
|
43
|
-
...pick(toRefs(props), [
|
|
44
|
-
"size",
|
|
45
|
-
"min",
|
|
46
|
-
"max",
|
|
47
|
-
"disabled",
|
|
48
|
-
"validateEvent",
|
|
49
|
-
"fill",
|
|
50
|
-
"textColor"
|
|
51
|
-
]),
|
|
52
|
-
modelValue,
|
|
53
|
-
changeEvent
|
|
54
|
-
});
|
|
55
|
-
watch(() => props.modelValue, () => {
|
|
56
|
-
if (props.validateEvent) {
|
|
57
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
return (_ctx, _cache) => {
|
|
61
|
-
var _a;
|
|
62
|
-
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
63
|
-
id: unref(groupId),
|
|
64
|
-
class: normalizeClass(unref(ns).b("group")),
|
|
65
|
-
role: "group",
|
|
66
|
-
"aria-label": !unref(isLabeledByFormItem) ? _ctx.label || "checkbox-group" : void 0,
|
|
67
|
-
"aria-labelledby": unref(isLabeledByFormItem) ? (_a = unref(formItem)) == null ? void 0 : _a.labelId : void 0
|
|
68
|
-
}, {
|
|
69
|
-
default: withCtx(() => [
|
|
70
|
-
renderSlot(_ctx.$slots, "default")
|
|
71
|
-
]),
|
|
72
|
-
_: 3
|
|
73
|
-
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
|
74
|
-
};
|
|
9
|
+
const checkboxGroupProps = buildProps({
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: definePropType(Array),
|
|
12
|
+
default: () => []
|
|
13
|
+
},
|
|
14
|
+
disabled: Boolean,
|
|
15
|
+
min: Number,
|
|
16
|
+
max: Number,
|
|
17
|
+
size: useSizeProp,
|
|
18
|
+
label: String,
|
|
19
|
+
fill: String,
|
|
20
|
+
textColor: String,
|
|
21
|
+
tag: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "div"
|
|
24
|
+
},
|
|
25
|
+
validateEvent: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
75
28
|
}
|
|
76
29
|
});
|
|
77
|
-
|
|
30
|
+
const checkboxGroupEmits = {
|
|
31
|
+
[UPDATE_MODEL_EVENT]: (val) => isArray(val),
|
|
32
|
+
change: (val) => isArray(val)
|
|
33
|
+
};
|
|
78
34
|
|
|
79
|
-
export {
|
|
35
|
+
export { checkboxGroupEmits, checkboxGroupProps };
|
|
80
36
|
//# sourceMappingURL=checkbox-group.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox-group.
|
|
1
|
+
{"version":3,"file":"checkbox-group.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox-group.ts"],"sourcesContent":["import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, isArray } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type checkboxGroup from './checkbox-group.vue'\nimport type { CheckboxValueType } from './checkbox'\n\nexport type CheckboxGroupValueType = Exclude<CheckboxValueType, boolean>[]\n\nexport const checkboxGroupProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<CheckboxGroupValueType>(Array),\n default: () => [],\n },\n /**\n * @description whether the nesting checkboxes are disabled\n */\n disabled: Boolean,\n /**\n * @description minimum number of checkbox checked\n */\n min: Number,\n /**\n * @description maximum number of checkbox checked\n */\n max: Number,\n /**\n * @description size of checkbox\n */\n size: useSizeProp,\n /**\n * @description label for screen reader\n */\n label: String,\n /**\n * @description border and background color when button is active\n */\n fill: String,\n /**\n * @description font color when button is active\n */\n textColor: String,\n /**\n * @description element tag of the checkbox group\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport const checkboxGroupEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxGroupValueType) => isArray(val),\n change: (val: CheckboxValueType[]) => isArray(val),\n}\n\nexport type CheckboxGroupProps = ExtractPropTypes<typeof checkboxGroupProps>\nexport type CheckboxGroupEmits = typeof checkboxGroupEmits\nexport type CheckboxGroupInstance = InstanceType<typeof checkboxGroup>\n"],"names":[],"mappings":";;;;;;;;AAGY,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,GAAG,EAAE,MAAM;AACb,EAAE,GAAG,EAAE,MAAM;AACb,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC;AAC7C,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC;AAC/B;;;;"}
|
|
@@ -1,36 +1,80 @@
|
|
|
1
|
+
import { defineComponent, nextTick, computed, provide, toRefs, watch, openBlock, createBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, renderSlot } from 'vue';
|
|
2
|
+
import { pick } from 'lodash-unified';
|
|
1
3
|
import '../../../constants/index.mjs';
|
|
2
|
-
import '../../../hooks/index.mjs';
|
|
3
4
|
import '../../../utils/index.mjs';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
5
|
+
import '../../../hooks/index.mjs';
|
|
6
|
+
import '../../form/index.mjs';
|
|
7
|
+
import { checkboxGroupProps, checkboxGroupEmits } from './checkbox-group.mjs';
|
|
8
|
+
import { checkboxGroupContextKey } from './constants.mjs';
|
|
9
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
11
|
+
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
|
6
12
|
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
7
|
-
import {
|
|
13
|
+
import { debugWarn } from '../../../utils/error.mjs';
|
|
8
14
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
const __default__ = defineComponent({
|
|
16
|
+
name: "ElCheckboxGroup"
|
|
17
|
+
});
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
|
+
...__default__,
|
|
20
|
+
props: checkboxGroupProps,
|
|
21
|
+
emits: checkboxGroupEmits,
|
|
22
|
+
setup(__props, { emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const ns = useNamespace("checkbox");
|
|
25
|
+
const { formItem } = useFormItem();
|
|
26
|
+
const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
|
|
27
|
+
formItemContext: formItem
|
|
28
|
+
});
|
|
29
|
+
const changeEvent = async (value) => {
|
|
30
|
+
emit(UPDATE_MODEL_EVENT, value);
|
|
31
|
+
await nextTick();
|
|
32
|
+
emit("change", value);
|
|
33
|
+
};
|
|
34
|
+
const modelValue = computed({
|
|
35
|
+
get() {
|
|
36
|
+
return props.modelValue;
|
|
37
|
+
},
|
|
38
|
+
set(val) {
|
|
39
|
+
changeEvent(val);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
provide(checkboxGroupContextKey, {
|
|
43
|
+
...pick(toRefs(props), [
|
|
44
|
+
"size",
|
|
45
|
+
"min",
|
|
46
|
+
"max",
|
|
47
|
+
"disabled",
|
|
48
|
+
"validateEvent",
|
|
49
|
+
"fill",
|
|
50
|
+
"textColor"
|
|
51
|
+
]),
|
|
52
|
+
modelValue,
|
|
53
|
+
changeEvent
|
|
54
|
+
});
|
|
55
|
+
watch(() => props.modelValue, () => {
|
|
56
|
+
if (props.validateEvent) {
|
|
57
|
+
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return (_ctx, _cache) => {
|
|
61
|
+
var _a;
|
|
62
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
63
|
+
id: unref(groupId),
|
|
64
|
+
class: normalizeClass(unref(ns).b("group")),
|
|
65
|
+
role: "group",
|
|
66
|
+
"aria-label": !unref(isLabeledByFormItem) ? _ctx.label || "checkbox-group" : void 0,
|
|
67
|
+
"aria-labelledby": unref(isLabeledByFormItem) ? (_a = unref(formItem)) == null ? void 0 : _a.labelId : void 0
|
|
68
|
+
}, {
|
|
69
|
+
default: withCtx(() => [
|
|
70
|
+
renderSlot(_ctx.$slots, "default")
|
|
71
|
+
]),
|
|
72
|
+
_: 3
|
|
73
|
+
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
|
74
|
+
};
|
|
28
75
|
}
|
|
29
76
|
});
|
|
30
|
-
|
|
31
|
-
[UPDATE_MODEL_EVENT]: (val) => isArray(val),
|
|
32
|
-
change: (val) => isArray(val)
|
|
33
|
-
};
|
|
77
|
+
var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "checkbox-group.vue"]]);
|
|
34
78
|
|
|
35
|
-
export {
|
|
79
|
+
export { CheckboxGroup as default };
|
|
36
80
|
//# sourceMappingURL=checkbox-group2.mjs.map
|