@element-plus/nightly 0.0.20220618 → 0.0.20220621
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 +500 -469
- package/dist/index.full.min.js +13 -13
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +19 -19
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +501 -471
- 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.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/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/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/autocomplete/index.d.ts +6 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +6 -1
- package/es/components/autocomplete/src/autocomplete4.mjs +37 -11
- package/es/components/autocomplete/src/autocomplete4.mjs.map +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/message/index.mjs +1 -1
- package/es/components/message/index2.mjs +1 -1
- package/es/components/message/src/message-method.d.ts +0 -2
- package/es/components/message/src/message-method.mjs +1 -1
- package/es/components/message/src/message-method2.mjs +90 -85
- package/es/components/message/src/message-method2.mjs.map +1 -1
- package/es/components/message/src/message.d.ts +35 -10
- package/es/components/message/src/message.mjs +1 -1
- package/es/components/message/src/message.vue.d.ts +157 -4
- package/es/components/message/src/message3.mjs +33 -14
- package/es/components/message/src/message3.mjs.map +1 -1
- package/es/components/message/src/message4.mjs +87 -105
- package/es/components/message/src/message4.mjs.map +1 -1
- package/es/components/message-box/src/index2.mjs +1 -1
- package/es/components/message-box/src/index2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip4.mjs +2 -1
- package/es/components/tooltip/src/tooltip4.mjs.map +1 -1
- package/es/components/transfer/style/css.d.ts +1 -1
- package/es/components/transfer/style/css2.mjs +1 -1
- package/es/components/transfer/style/index.d.ts +1 -1
- package/es/components/transfer/style/index2.mjs +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/index2.mjs +2 -2
- package/es/components/upload/src/upload-content3.mjs +1 -1
- package/es/components/upload/src/upload-content4.mjs +1 -1
- package/es/components/upload/src/upload-list3.mjs +1 -1
- package/es/components/upload/src/upload.mjs +1 -1
- package/es/components/upload/src/upload3.mjs +121 -106
- package/es/components/upload/src/upload3.mjs.map +1 -1
- package/es/components/upload/src/upload4.mjs +106 -121
- package/es/components/upload/src/upload4.mjs.map +1 -1
- package/es/components/upload/src/use-handlers2.mjs +1 -1
- package/es/index.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version2.mjs +1 -1
- package/es/version2.mjs.map +1 -1
- package/lib/components/autocomplete/index.d.ts +6 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +6 -1
- package/lib/components/autocomplete/src/autocomplete4.js +47 -21
- package/lib/components/autocomplete/src/autocomplete4.js.map +1 -1
- package/lib/components/index.js +2 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/message/index.js +1 -0
- package/lib/components/message/index.js.map +1 -1
- package/lib/components/message/index2.js +1 -0
- package/lib/components/message/index2.js.map +1 -1
- package/lib/components/message/src/message-method.d.ts +0 -2
- package/lib/components/message/src/message-method.js +0 -1
- package/lib/components/message/src/message-method.js.map +1 -1
- package/lib/components/message/src/message-method2.js +89 -85
- package/lib/components/message/src/message-method2.js.map +1 -1
- package/lib/components/message/src/message.d.ts +35 -10
- package/lib/components/message/src/message.js +1 -0
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +157 -4
- package/lib/components/message/src/message3.js +33 -13
- package/lib/components/message/src/message3.js.map +1 -1
- package/lib/components/message/src/message4.js +90 -108
- package/lib/components/message/src/message4.js.map +1 -1
- package/lib/components/message-box/src/index2.js +1 -1
- package/lib/components/message-box/src/index2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip4.js +1 -0
- package/lib/components/tooltip/src/tooltip4.js.map +1 -1
- package/lib/components/transfer/style/css.d.ts +1 -1
- package/lib/components/transfer/style/css2.js +1 -1
- package/lib/components/transfer/style/index.d.ts +1 -1
- package/lib/components/transfer/style/index2.js +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/index2.js +2 -2
- package/lib/components/upload/src/upload-content3.js +1 -1
- package/lib/components/upload/src/upload-content4.js +1 -1
- package/lib/components/upload/src/upload-list3.js +1 -1
- package/lib/components/upload/src/upload.js +1 -1
- package/lib/components/upload/src/upload3.js +121 -109
- package/lib/components/upload/src/upload3.js.map +1 -1
- package/lib/components/upload/src/upload4.js +109 -121
- package/lib/components/upload/src/upload4.js.map +1 -1
- package/lib/components/upload/src/use-handlers2.js +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version2.js +1 -1
- package/lib/version2.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -36,6 +36,46 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
36
36
|
readonly grouping: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
37
37
|
readonly repeatNum: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
|
|
38
38
|
}, {
|
|
39
|
+
Close: import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
40
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
readonly customClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
42
|
+
readonly center: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
43
|
+
readonly dangerouslyUseHTMLString: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
44
|
+
readonly duration: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 3000, boolean>;
|
|
45
|
+
readonly icon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "", boolean>;
|
|
46
|
+
readonly id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
47
|
+
readonly message: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}> | (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
}>)) & {}) | (() => string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}> | (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}>)) | ((new (...args: any[]) => (string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
}> | (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
58
|
+
[key: string]: any;
|
|
59
|
+
}>)) & {}) | (() => string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
}> | (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
}>)))[], unknown, unknown, "", boolean>;
|
|
64
|
+
readonly onClose: {
|
|
65
|
+
readonly type: import("vue").PropType<() => void>;
|
|
66
|
+
readonly required: false;
|
|
67
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
68
|
+
__epPropKey: true;
|
|
69
|
+
};
|
|
70
|
+
readonly showClose: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
71
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "success" | "warning" | "info" | "error", unknown, "info", boolean>;
|
|
72
|
+
readonly offset: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 20, boolean>;
|
|
73
|
+
readonly zIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
74
|
+
readonly grouping: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
75
|
+
readonly repeatNum: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
|
|
76
|
+
}>> & {
|
|
77
|
+
onDestroy?: (() => any) | undefined;
|
|
78
|
+
}>>;
|
|
39
79
|
ns: {
|
|
40
80
|
namespace: import("vue").ComputedRef<string>;
|
|
41
81
|
b: (blockSuffix?: string) => string;
|
|
@@ -54,16 +94,129 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
94
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
55
95
|
cssVarBlockName: (name: string) => string;
|
|
56
96
|
};
|
|
97
|
+
visible: import("vue").Ref<boolean>;
|
|
98
|
+
badgeType: import("vue").Ref<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown>>;
|
|
99
|
+
stopTimer: undefined;
|
|
57
100
|
typeClass: import("vue").ComputedRef<{
|
|
58
101
|
[x: string]: import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
59
102
|
}>;
|
|
60
103
|
iconComponent: import("vue").ComputedRef<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
61
104
|
customStyle: import("vue").ComputedRef<CSSProperties>;
|
|
62
|
-
visible: import("vue").Ref<boolean>;
|
|
63
|
-
badgeType: import("vue").Ref<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown>>;
|
|
64
|
-
close: () => void;
|
|
65
|
-
clearTimer: () => void;
|
|
66
105
|
startTimer: () => void;
|
|
106
|
+
clearTimer: () => void;
|
|
107
|
+
close: () => void;
|
|
108
|
+
keydown: ({ code }: KeyboardEvent) => void;
|
|
109
|
+
ElBadge: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
110
|
+
readonly value: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
111
|
+
readonly max: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 99, boolean>;
|
|
112
|
+
readonly isDot: BooleanConstructor;
|
|
113
|
+
readonly hidden: BooleanConstructor;
|
|
114
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown, "danger", boolean>;
|
|
115
|
+
}, {
|
|
116
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
117
|
+
readonly value: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
118
|
+
readonly max: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 99, boolean>;
|
|
119
|
+
readonly isDot: BooleanConstructor;
|
|
120
|
+
readonly hidden: BooleanConstructor;
|
|
121
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown, "danger", boolean>;
|
|
122
|
+
}>> & {
|
|
123
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
124
|
+
}>>;
|
|
125
|
+
ns: {
|
|
126
|
+
namespace: import("vue").ComputedRef<string>;
|
|
127
|
+
b: (blockSuffix?: string) => string;
|
|
128
|
+
e: (element?: string | undefined) => string;
|
|
129
|
+
m: (modifier?: string | undefined) => string;
|
|
130
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
131
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
132
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
133
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
134
|
+
is: {
|
|
135
|
+
(name: string, state: boolean | undefined): string;
|
|
136
|
+
(name: string): string;
|
|
137
|
+
};
|
|
138
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
139
|
+
cssVarName: (name: string) => string;
|
|
140
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
141
|
+
cssVarBlockName: (name: string) => string;
|
|
142
|
+
};
|
|
143
|
+
content: import("vue").ComputedRef<string>;
|
|
144
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
145
|
+
readonly value: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
146
|
+
readonly max: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 99, boolean>;
|
|
147
|
+
readonly isDot: BooleanConstructor;
|
|
148
|
+
readonly hidden: BooleanConstructor;
|
|
149
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown, "danger", boolean>;
|
|
150
|
+
}>>, {
|
|
151
|
+
readonly type: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown>;
|
|
152
|
+
readonly max: number;
|
|
153
|
+
readonly value: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
154
|
+
readonly hidden: boolean;
|
|
155
|
+
readonly isDot: boolean;
|
|
156
|
+
}>> & Record<string, any>;
|
|
157
|
+
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
158
|
+
readonly size: {
|
|
159
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
160
|
+
readonly required: false;
|
|
161
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
162
|
+
__epPropKey: true;
|
|
163
|
+
};
|
|
164
|
+
readonly color: {
|
|
165
|
+
readonly type: import("vue").PropType<string>;
|
|
166
|
+
readonly required: false;
|
|
167
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
168
|
+
__epPropKey: true;
|
|
169
|
+
};
|
|
170
|
+
}, {
|
|
171
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
172
|
+
readonly size: {
|
|
173
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
174
|
+
readonly required: false;
|
|
175
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
176
|
+
__epPropKey: true;
|
|
177
|
+
};
|
|
178
|
+
readonly color: {
|
|
179
|
+
readonly type: import("vue").PropType<string>;
|
|
180
|
+
readonly required: false;
|
|
181
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
182
|
+
__epPropKey: true;
|
|
183
|
+
};
|
|
184
|
+
}>> & {
|
|
185
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
186
|
+
}>>;
|
|
187
|
+
ns: {
|
|
188
|
+
namespace: import("vue").ComputedRef<string>;
|
|
189
|
+
b: (blockSuffix?: string) => string;
|
|
190
|
+
e: (element?: string | undefined) => string;
|
|
191
|
+
m: (modifier?: string | undefined) => string;
|
|
192
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
193
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
194
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
195
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
196
|
+
is: {
|
|
197
|
+
(name: string, state: boolean | undefined): string;
|
|
198
|
+
(name: string): string;
|
|
199
|
+
};
|
|
200
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
201
|
+
cssVarName: (name: string) => string;
|
|
202
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
203
|
+
cssVarBlockName: (name: string) => string;
|
|
204
|
+
};
|
|
205
|
+
style: import("vue").ComputedRef<CSSProperties>;
|
|
206
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
207
|
+
readonly size: {
|
|
208
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
209
|
+
readonly required: false;
|
|
210
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
211
|
+
__epPropKey: true;
|
|
212
|
+
};
|
|
213
|
+
readonly color: {
|
|
214
|
+
readonly type: import("vue").PropType<string>;
|
|
215
|
+
readonly required: false;
|
|
216
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
217
|
+
__epPropKey: true;
|
|
218
|
+
};
|
|
219
|
+
}>>, {}>> & Record<string, any>;
|
|
67
220
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
68
221
|
destroy: () => boolean;
|
|
69
222
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,32 +1,51 @@
|
|
|
1
|
+
import { isClient } from '@vueuse/core';
|
|
1
2
|
import '../../../utils/index2.mjs';
|
|
3
|
+
import { mutable } from '../../../utils/typescript2.mjs';
|
|
2
4
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime2.mjs';
|
|
3
5
|
import { iconPropType } from '../../../utils/vue/icon2.mjs';
|
|
4
6
|
|
|
5
7
|
const messageTypes = ["success", "info", "warning", "error"];
|
|
8
|
+
const messageDefaults = mutable({
|
|
9
|
+
customClass: "",
|
|
10
|
+
center: false,
|
|
11
|
+
dangerouslyUseHTMLString: false,
|
|
12
|
+
duration: 3e3,
|
|
13
|
+
icon: "",
|
|
14
|
+
id: "",
|
|
15
|
+
message: "",
|
|
16
|
+
onClose: void 0,
|
|
17
|
+
showClose: false,
|
|
18
|
+
type: "info",
|
|
19
|
+
offset: 20,
|
|
20
|
+
zIndex: 0,
|
|
21
|
+
grouping: false,
|
|
22
|
+
repeatNum: 1,
|
|
23
|
+
appendTo: isClient ? document.body : void 0
|
|
24
|
+
});
|
|
6
25
|
const messageProps = buildProps({
|
|
7
26
|
customClass: {
|
|
8
27
|
type: String,
|
|
9
|
-
default:
|
|
28
|
+
default: messageDefaults.customClass
|
|
10
29
|
},
|
|
11
30
|
center: {
|
|
12
31
|
type: Boolean,
|
|
13
|
-
default:
|
|
32
|
+
default: messageDefaults.center
|
|
14
33
|
},
|
|
15
34
|
dangerouslyUseHTMLString: {
|
|
16
35
|
type: Boolean,
|
|
17
|
-
default:
|
|
36
|
+
default: messageDefaults.dangerouslyUseHTMLString
|
|
18
37
|
},
|
|
19
38
|
duration: {
|
|
20
39
|
type: Number,
|
|
21
|
-
default:
|
|
40
|
+
default: messageDefaults.duration
|
|
22
41
|
},
|
|
23
42
|
icon: {
|
|
24
43
|
type: iconPropType,
|
|
25
|
-
default:
|
|
44
|
+
default: messageDefaults.icon
|
|
26
45
|
},
|
|
27
46
|
id: {
|
|
28
47
|
type: String,
|
|
29
|
-
default:
|
|
48
|
+
default: messageDefaults.id
|
|
30
49
|
},
|
|
31
50
|
message: {
|
|
32
51
|
type: definePropType([
|
|
@@ -34,7 +53,7 @@ const messageProps = buildProps({
|
|
|
34
53
|
Object,
|
|
35
54
|
Function
|
|
36
55
|
]),
|
|
37
|
-
default:
|
|
56
|
+
default: messageDefaults.message
|
|
38
57
|
},
|
|
39
58
|
onClose: {
|
|
40
59
|
type: definePropType(Function),
|
|
@@ -42,33 +61,33 @@ const messageProps = buildProps({
|
|
|
42
61
|
},
|
|
43
62
|
showClose: {
|
|
44
63
|
type: Boolean,
|
|
45
|
-
default:
|
|
64
|
+
default: messageDefaults.showClose
|
|
46
65
|
},
|
|
47
66
|
type: {
|
|
48
67
|
type: String,
|
|
49
68
|
values: messageTypes,
|
|
50
|
-
default:
|
|
69
|
+
default: messageDefaults.type
|
|
51
70
|
},
|
|
52
71
|
offset: {
|
|
53
72
|
type: Number,
|
|
54
|
-
default:
|
|
73
|
+
default: messageDefaults.offset
|
|
55
74
|
},
|
|
56
75
|
zIndex: {
|
|
57
76
|
type: Number,
|
|
58
|
-
default:
|
|
77
|
+
default: messageDefaults.zIndex
|
|
59
78
|
},
|
|
60
79
|
grouping: {
|
|
61
80
|
type: Boolean,
|
|
62
|
-
default:
|
|
81
|
+
default: messageDefaults.grouping
|
|
63
82
|
},
|
|
64
83
|
repeatNum: {
|
|
65
84
|
type: Number,
|
|
66
|
-
default:
|
|
85
|
+
default: messageDefaults.repeatNum
|
|
67
86
|
}
|
|
68
87
|
});
|
|
69
88
|
const messageEmits = {
|
|
70
89
|
destroy: () => true
|
|
71
90
|
};
|
|
72
91
|
|
|
73
|
-
export { messageEmits, messageProps, messageTypes };
|
|
92
|
+
export { messageDefaults, messageEmits, messageProps, messageTypes };
|
|
74
93
|
//# sourceMappingURL=message3.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message3.mjs","sources":["../../../../../../packages/components/message/src/message.ts"],"sourcesContent":["import { buildProps
|
|
1
|
+
{"version":3,"file":"message3.mjs","sources":["../../../../../../packages/components/message/src/message.ts"],"sourcesContent":["import { isClient } from '@vueuse/core'\nimport {\n buildProps,\n definePropType,\n iconPropType,\n mutable,\n} from '@element-plus/utils'\nimport type { AppContext, ExtractPropTypes, VNode } from 'vue'\nimport type { Mutable } from '@element-plus/utils'\nimport type MessageConstructor from './message.vue'\n\nexport const messageTypes = ['success', 'info', 'warning', 'error'] as const\n\nexport interface MessageConfigContext {\n max?: number\n}\n\nexport const messageDefaults = mutable({\n customClass: '',\n center: false,\n dangerouslyUseHTMLString: false,\n duration: 3000,\n icon: '',\n id: '',\n message: '',\n onClose: undefined,\n showClose: false,\n type: 'info',\n offset: 20,\n zIndex: 0,\n grouping: false,\n repeatNum: 1,\n appendTo: isClient ? document.body : (undefined as never),\n} as const)\n\nexport const messageProps = buildProps({\n customClass: {\n type: String,\n default: messageDefaults.customClass,\n },\n center: {\n type: Boolean,\n default: messageDefaults.center,\n },\n dangerouslyUseHTMLString: {\n type: Boolean,\n default: messageDefaults.dangerouslyUseHTMLString,\n },\n duration: {\n type: Number,\n default: messageDefaults.duration,\n },\n icon: {\n type: iconPropType,\n default: messageDefaults.icon,\n },\n id: {\n type: String,\n default: messageDefaults.id,\n },\n message: {\n type: definePropType<string | VNode | (() => VNode)>([\n String,\n Object,\n Function,\n ]),\n default: messageDefaults.message,\n },\n onClose: {\n type: definePropType<() => void>(Function),\n required: false,\n },\n showClose: {\n type: Boolean,\n default: messageDefaults.showClose,\n },\n type: {\n type: String,\n values: messageTypes,\n default: messageDefaults.type,\n },\n offset: {\n type: Number,\n default: messageDefaults.offset,\n },\n zIndex: {\n type: Number,\n default: messageDefaults.zIndex,\n },\n grouping: {\n type: Boolean,\n default: messageDefaults.grouping,\n },\n repeatNum: {\n type: Number,\n default: messageDefaults.repeatNum,\n },\n} as const)\nexport type MessageProps = ExtractPropTypes<typeof messageProps>\n\nexport const messageEmits = {\n destroy: () => true,\n}\nexport type MessageEmits = typeof messageEmits\n\nexport type MessageInstance = InstanceType<typeof MessageConstructor>\n\nexport type MessageOptions = Partial<\n Mutable<\n Omit<MessageProps, 'id'> & {\n appendTo?: HTMLElement | string\n }\n >\n>\nexport type MessageParams = MessageOptions | MessageOptions['message']\nexport type MessageParamsNormalized = Omit<MessageProps, 'id'> & {\n appendTo: HTMLElement\n}\nexport type MessageOptionsWithType = Omit<MessageOptions, 'type'>\nexport type MessageParamsWithType =\n | MessageOptionsWithType\n | MessageOptions['message']\n\nexport interface MessageHandler {\n close: () => void\n}\n\nexport type MessageFn = {\n (options?: MessageParams, appContext?: null | AppContext): MessageHandler\n closeAll(): void\n}\nexport type MessageTypedFn = (\n options?: MessageParamsWithType,\n appContext?: null | AppContext\n) => MessageHandler\n\nexport interface Message extends MessageFn {\n success: MessageTypedFn\n warning: MessageTypedFn\n info: MessageTypedFn\n error: MessageTypedFn\n}\n\nexport type MessageQueueItem = {\n vnode: VNode\n handler: MessageHandler\n vm: MessageInstance\n}\n\nexport type MessageQueue = MessageQueueItem[]\n"],"names":[],"mappings":";;;;;;AAOY,MAAC,YAAY,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE;AACxD,MAAC,eAAe,GAAG,OAAO,CAAC;AACvC,EAAE,WAAW,EAAE,EAAE;AACjB,EAAE,MAAM,EAAE,KAAK;AACf,EAAE,wBAAwB,EAAE,KAAK;AACjC,EAAE,QAAQ,EAAE,GAAG;AACf,EAAE,IAAI,EAAE,EAAE;AACV,EAAE,EAAE,EAAE,EAAE;AACR,EAAE,OAAO,EAAE,EAAE;AACb,EAAE,OAAO,EAAE,KAAK,CAAC;AACjB,EAAE,SAAS,EAAE,KAAK;AAClB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,MAAM,EAAE,EAAE;AACZ,EAAE,MAAM,EAAE,CAAC;AACX,EAAE,QAAQ,EAAE,KAAK;AACjB,EAAE,SAAS,EAAE,CAAC;AACd,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;AAC7C,CAAC,EAAE;AACS,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,WAAW;AACxC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,eAAe,CAAC,MAAM;AACnC,GAAG;AACH,EAAE,wBAAwB,EAAE;AAC5B,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,eAAe,CAAC,wBAAwB;AACrD,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,QAAQ;AACrC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,eAAe,CAAC,IAAI;AACjC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,EAAE;AAC/B,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,CAAC,OAAO;AACpC,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,QAAQ,EAAE,KAAK;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,eAAe,CAAC,SAAS;AACtC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,YAAY;AACxB,IAAI,OAAO,EAAE,eAAe,CAAC,IAAI;AACjC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,MAAM;AACnC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,MAAM;AACnC,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,eAAe,CAAC,QAAQ;AACrC,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,SAAS;AACtC,GAAG;AACH,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,OAAO,EAAE,MAAM,IAAI;AACrB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, onMounted, watch,
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, watch, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode, resolveDynamicComponent, renderSlot, createElementBlock, toDisplayString, Fragment, withModifiers, createVNode, vShow } from 'vue';
|
|
2
2
|
import { useTimeoutFn, useEventListener } from '@vueuse/core';
|
|
3
3
|
import '../../../utils/index2.mjs';
|
|
4
4
|
import '../../../constants/index2.mjs';
|
|
@@ -11,16 +11,18 @@ import { TypeComponents, TypeComponentsMap } from '../../../utils/vue/icon2.mjs'
|
|
|
11
11
|
import { useNamespace } from '../../../hooks/use-namespace/index2.mjs';
|
|
12
12
|
import { EVENT_CODE } from '../../../constants/aria2.mjs';
|
|
13
13
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
const _hoisted_1 = ["id"];
|
|
15
|
+
const _hoisted_2 = ["innerHTML"];
|
|
16
|
+
const __default__ = {
|
|
17
|
+
name: "ElMessage"
|
|
18
|
+
};
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
+
...__default__,
|
|
21
21
|
props: messageProps,
|
|
22
22
|
emits: messageEmits,
|
|
23
|
-
setup(
|
|
23
|
+
setup(__props, { expose }) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const { Close } = TypeComponents;
|
|
24
26
|
const ns = useNamespace("message");
|
|
25
27
|
const visible = ref(false);
|
|
26
28
|
const badgeType = ref(props.type ? props.type === "error" ? "danger" : props.type : "info");
|
|
@@ -29,21 +31,17 @@ const _sfc_main = defineComponent({
|
|
|
29
31
|
const type = props.type;
|
|
30
32
|
return { [ns.bm("icon", type)]: type && TypeComponentsMap[type] };
|
|
31
33
|
});
|
|
32
|
-
const iconComponent = computed(() =>
|
|
33
|
-
return props.icon || TypeComponentsMap[props.type] || "";
|
|
34
|
-
});
|
|
34
|
+
const iconComponent = computed(() => props.icon || TypeComponentsMap[props.type] || "");
|
|
35
35
|
const customStyle = computed(() => ({
|
|
36
36
|
top: `${props.offset}px`,
|
|
37
37
|
zIndex: props.zIndex
|
|
38
38
|
}));
|
|
39
39
|
function startTimer() {
|
|
40
|
-
if (props.duration
|
|
41
|
-
;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, props.duration));
|
|
46
|
-
}
|
|
40
|
+
if (props.duration === 0)
|
|
41
|
+
return;
|
|
42
|
+
({ stop: stopTimer } = useTimeoutFn(() => {
|
|
43
|
+
close();
|
|
44
|
+
}, props.duration));
|
|
47
45
|
}
|
|
48
46
|
function clearTimer() {
|
|
49
47
|
stopTimer == null ? void 0 : stopTimer();
|
|
@@ -53,11 +51,7 @@ const _sfc_main = defineComponent({
|
|
|
53
51
|
}
|
|
54
52
|
function keydown({ code }) {
|
|
55
53
|
if (code === EVENT_CODE.esc) {
|
|
56
|
-
|
|
57
|
-
close();
|
|
58
|
-
}
|
|
59
|
-
} else {
|
|
60
|
-
startTimer();
|
|
54
|
+
close();
|
|
61
55
|
}
|
|
62
56
|
}
|
|
63
57
|
onMounted(() => {
|
|
@@ -69,91 +63,79 @@ const _sfc_main = defineComponent({
|
|
|
69
63
|
startTimer();
|
|
70
64
|
});
|
|
71
65
|
useEventListener(document, "keydown", keydown);
|
|
72
|
-
|
|
73
|
-
ns,
|
|
74
|
-
typeClass,
|
|
75
|
-
iconComponent,
|
|
76
|
-
customStyle,
|
|
66
|
+
expose({
|
|
77
67
|
visible,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
close
|
|
69
|
+
});
|
|
70
|
+
return (_ctx, _cache) => {
|
|
71
|
+
return openBlock(), createBlock(Transition, {
|
|
72
|
+
name: unref(ns).b("fade"),
|
|
73
|
+
onBeforeLeave: _ctx.onClose,
|
|
74
|
+
onAfterLeave: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("destroy")),
|
|
75
|
+
persisted: ""
|
|
76
|
+
}, {
|
|
77
|
+
default: withCtx(() => [
|
|
78
|
+
withDirectives(createElementVNode("div", {
|
|
79
|
+
id: _ctx.id,
|
|
80
|
+
class: normalizeClass([
|
|
81
|
+
unref(ns).b(),
|
|
82
|
+
{ [unref(ns).m(_ctx.type)]: _ctx.type && !_ctx.icon },
|
|
83
|
+
unref(ns).is("center", _ctx.center),
|
|
84
|
+
unref(ns).is("closable", _ctx.showClose),
|
|
85
|
+
_ctx.customClass
|
|
86
|
+
]),
|
|
87
|
+
style: normalizeStyle(unref(customStyle)),
|
|
88
|
+
role: "alert",
|
|
89
|
+
onMouseenter: clearTimer,
|
|
90
|
+
onMouseleave: startTimer
|
|
91
|
+
}, [
|
|
92
|
+
_ctx.repeatNum > 1 ? (openBlock(), createBlock(unref(ElBadge), {
|
|
93
|
+
key: 0,
|
|
94
|
+
value: _ctx.repeatNum,
|
|
95
|
+
type: badgeType.value,
|
|
96
|
+
class: normalizeClass(unref(ns).e("badge"))
|
|
97
|
+
}, null, 8, ["value", "type", "class"])) : createCommentVNode("v-if", true),
|
|
98
|
+
unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
|
|
99
|
+
key: 1,
|
|
100
|
+
class: normalizeClass([unref(ns).e("icon"), unref(typeClass)])
|
|
101
|
+
}, {
|
|
102
|
+
default: withCtx(() => [
|
|
103
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
|
107
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
108
|
+
!_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", {
|
|
109
|
+
key: 0,
|
|
110
|
+
class: normalizeClass(unref(ns).e("content"))
|
|
111
|
+
}, toDisplayString(_ctx.message), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
112
|
+
createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
|
113
|
+
createElementVNode("p", {
|
|
114
|
+
class: normalizeClass(unref(ns).e("content")),
|
|
115
|
+
innerHTML: _ctx.message
|
|
116
|
+
}, null, 10, _hoisted_2)
|
|
117
|
+
], 2112))
|
|
118
|
+
]),
|
|
119
|
+
_ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), {
|
|
120
|
+
key: 2,
|
|
121
|
+
class: normalizeClass(unref(ns).e("closeBtn")),
|
|
122
|
+
onClick: withModifiers(close, ["stop"])
|
|
123
|
+
}, {
|
|
124
|
+
default: withCtx(() => [
|
|
125
|
+
createVNode(unref(Close))
|
|
126
|
+
]),
|
|
127
|
+
_: 1
|
|
128
|
+
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
|
|
129
|
+
], 46, _hoisted_1), [
|
|
130
|
+
[vShow, visible.value]
|
|
131
|
+
])
|
|
132
|
+
]),
|
|
133
|
+
_: 3
|
|
134
|
+
}, 8, ["name", "onBeforeLeave"]);
|
|
82
135
|
};
|
|
83
136
|
}
|
|
84
137
|
});
|
|
85
|
-
|
|
86
|
-
const _hoisted_2 = ["innerHTML"];
|
|
87
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
88
|
-
const _component_el_badge = resolveComponent("el-badge");
|
|
89
|
-
const _component_el_icon = resolveComponent("el-icon");
|
|
90
|
-
const _component_close = resolveComponent("close");
|
|
91
|
-
return openBlock(), createBlock(Transition, {
|
|
92
|
-
name: _ctx.ns.b("fade"),
|
|
93
|
-
onBeforeLeave: _ctx.onClose,
|
|
94
|
-
onAfterLeave: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("destroy")),
|
|
95
|
-
persisted: ""
|
|
96
|
-
}, {
|
|
97
|
-
default: withCtx(() => [
|
|
98
|
-
withDirectives(createElementVNode("div", {
|
|
99
|
-
id: _ctx.id,
|
|
100
|
-
class: normalizeClass([
|
|
101
|
-
_ctx.ns.b(),
|
|
102
|
-
{ [_ctx.ns.m(_ctx.type)]: _ctx.type && !_ctx.icon },
|
|
103
|
-
_ctx.ns.is("center", _ctx.center),
|
|
104
|
-
_ctx.ns.is("closable", _ctx.showClose),
|
|
105
|
-
_ctx.customClass
|
|
106
|
-
]),
|
|
107
|
-
style: normalizeStyle(_ctx.customStyle),
|
|
108
|
-
role: "alert",
|
|
109
|
-
onMouseenter: _cache[0] || (_cache[0] = (...args) => _ctx.clearTimer && _ctx.clearTimer(...args)),
|
|
110
|
-
onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.startTimer && _ctx.startTimer(...args))
|
|
111
|
-
}, [
|
|
112
|
-
_ctx.repeatNum > 1 ? (openBlock(), createBlock(_component_el_badge, {
|
|
113
|
-
key: 0,
|
|
114
|
-
value: _ctx.repeatNum,
|
|
115
|
-
type: _ctx.badgeType,
|
|
116
|
-
class: normalizeClass(_ctx.ns.e("badge"))
|
|
117
|
-
}, null, 8, ["value", "type", "class"])) : createCommentVNode("v-if", true),
|
|
118
|
-
_ctx.iconComponent ? (openBlock(), createBlock(_component_el_icon, {
|
|
119
|
-
key: 1,
|
|
120
|
-
class: normalizeClass([_ctx.ns.e("icon"), _ctx.typeClass])
|
|
121
|
-
}, {
|
|
122
|
-
default: withCtx(() => [
|
|
123
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
|
|
124
|
-
]),
|
|
125
|
-
_: 1
|
|
126
|
-
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
|
127
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
128
|
-
!_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", {
|
|
129
|
-
key: 0,
|
|
130
|
-
class: normalizeClass(_ctx.ns.e("content"))
|
|
131
|
-
}, toDisplayString(_ctx.message), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
132
|
-
createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
|
133
|
-
createElementVNode("p", {
|
|
134
|
-
class: normalizeClass(_ctx.ns.e("content")),
|
|
135
|
-
innerHTML: _ctx.message
|
|
136
|
-
}, null, 10, _hoisted_2)
|
|
137
|
-
], 2112))
|
|
138
|
-
]),
|
|
139
|
-
_ctx.showClose ? (openBlock(), createBlock(_component_el_icon, {
|
|
140
|
-
key: 2,
|
|
141
|
-
class: normalizeClass(_ctx.ns.e("closeBtn")),
|
|
142
|
-
onClick: withModifiers(_ctx.close, ["stop"])
|
|
143
|
-
}, {
|
|
144
|
-
default: withCtx(() => [
|
|
145
|
-
createVNode(_component_close)
|
|
146
|
-
]),
|
|
147
|
-
_: 1
|
|
148
|
-
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
|
|
149
|
-
], 46, _hoisted_1), [
|
|
150
|
-
[vShow, _ctx.visible]
|
|
151
|
-
])
|
|
152
|
-
]),
|
|
153
|
-
_: 3
|
|
154
|
-
}, 8, ["name", "onBeforeLeave"]);
|
|
155
|
-
}
|
|
156
|
-
var MessageConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);
|
|
138
|
+
var MessageConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);
|
|
157
139
|
|
|
158
140
|
export { MessageConstructor as default };
|
|
159
141
|
//# sourceMappingURL=message4.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message4.mjs","sources":["../../../../../../packages/components/message/src/message.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n :class=\"[\n ns.b(),\n { [ns.m(type)]: type && !icon },\n ns.is('center', center),\n ns.is('closable', showClose),\n customClass,\n ]\"\n :style=\"customStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n >\n <el-badge\n v-if=\"repeatNum > 1\"\n :value=\"repeatNum\"\n :type=\"badgeType\"\n :class=\"ns.e('badge')\"\n />\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\" :class=\"ns.e('content')\">\n {{ message }}\n </p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else :class=\"ns.e('content')\" v-html=\"message\" />\n </slot>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <
|
|
1
|
+
{"version":3,"file":"message4.mjs","sources":["../../../../../../packages/components/message/src/message.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n :class=\"[\n ns.b(),\n { [ns.m(type)]: type && !icon },\n ns.is('center', center),\n ns.is('closable', showClose),\n customClass,\n ]\"\n :style=\"customStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n >\n <el-badge\n v-if=\"repeatNum > 1\"\n :value=\"repeatNum\"\n :type=\"badgeType\"\n :class=\"ns.e('badge')\"\n />\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\" :class=\"ns.e('content')\">\n {{ message }}\n </p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else :class=\"ns.e('content')\" v-html=\"message\" />\n </slot>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, watch } from 'vue'\nimport { useEventListener, useTimeoutFn } from '@vueuse/core'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport ElBadge from '@element-plus/components/badge'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { messageEmits, messageProps } from './message'\nimport type { BadgeProps } from '@element-plus/components/badge'\nimport type { CSSProperties } from 'vue'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElMessage',\n})\n\nconst props = defineProps(messageProps)\ndefineEmits(messageEmits)\n\nconst ns = useNamespace('message')\nconst visible = ref(false)\nconst badgeType = ref<BadgeProps['type']>(\n props.type ? (props.type === 'error' ? 'danger' : props.type) : 'info'\n)\nlet stopTimer: (() => void) | undefined = undefined\n\nconst typeClass = computed(() => {\n const type = props.type\n return { [ns.bm('icon', type)]: type && TypeComponentsMap[type] }\n})\n\nconst iconComponent = computed(\n () => props.icon || TypeComponentsMap[props.type] || ''\n)\n\nconst customStyle = computed<CSSProperties>(() => ({\n top: `${props.offset}px`,\n zIndex: props.zIndex,\n}))\n\nfunction startTimer() {\n if (props.duration === 0) return\n ;({ stop: stopTimer } = useTimeoutFn(() => {\n close()\n }, props.duration))\n}\n\nfunction clearTimer() {\n stopTimer?.()\n}\n\nfunction close() {\n visible.value = false\n}\n\nfunction keydown({ code }: KeyboardEvent) {\n if (code === EVENT_CODE.esc) {\n // press esc to close the message\n close()\n }\n}\n\nonMounted(() => {\n startTimer()\n visible.value = true\n})\n\nwatch(\n () => props.repeatNum,\n () => {\n clearTimer()\n startTimer()\n }\n)\n\nuseEventListener(document, 'keydown', keydown)\n\ndefineExpose({\n visible,\n close,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwDA,IAAA,MAAA,EAAA,KAAA,EAAA,GAAA,cAAA,CAAA;AASA,IAAA,MAAA,EAAA,GAAA,aAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,OAAA,GAAA,IAAA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,SAAA,GAAA,GACA,CAAA,KAAA,CAAA,IAAA,GAAA,KAAA,CAAA,SAAA,OAAA,GAAA,QAAA,GAAA,KAAA,CAAA,IAAA,GAAA,MACA,CAAA,CAAA;AACA,IAAA,IAAA,SAAA,GAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAA,SAAA,GAAA,SAAA,MAAA;AACA,MAAA,MAAA,OAAA,KAAA,CAAA,IAAA,CAAA;AACA,MAAA,OAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,QAAA,IAAA,CAAA,GAAA,IAAA,IAAA,iBAAA,CAAA,IAAA,CAAA,EAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAEA,IAAA,MAAA,aAAA,GAAA,SACA,MAAA,KAAA,CAAA,QAAA,iBAAA,CAAA,KAAA,CAAA,SAAA,EACA,CAAA,CAAA;AAEA,IAAA,MAAA,WAAA,GAAA,SAAA,OAAA;AAAA,MACA,GAAA,EAAA,GAAA,KAAA,CAAA,MAAA,CAAA,EAAA,CAAA;AAAA,MACA,QAAA,KAAA,CAAA,MAAA;AAAA,KACA,CAAA,CAAA,CAAA;AAEA,IAAA,SAAA,UAAA,GAAA;AACA,MAAA,IAAA,MAAA,QAAA,KAAA,CAAA;AAAA,QAAA,OAAA;AACA,MAAA,CAAA,EAAA,IAAA,EAAA,SAAA,EAAA,GAAA,aAAA,MAAA;AACA,QAAA,KAAA,EAAA,CAAA;AAAA,OACA,EAAA,MAAA,QAAA,CAAA,EAAA;AAAA,KACA;AAEA,IAAA,SAAA,UAAA,GAAA;AACA,MAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,EAAA,CAAA;AAAA,KACA;AAEA,IAAA,SAAA,KAAA,GAAA;AACA,MAAA,OAAA,CAAA,KAAA,GAAA,KAAA,CAAA;AAAA,KACA;AAEA,IAAA,SAAA,OAAA,CAAA,EAAA,IAAA,EAAA,EAAA;AACA,MAAA,IAAA,IAAA,KAAA,WAAA,GAAA,EAAA;AAEA,QAAA,KAAA,EAAA,CAAA;AAAA,OACA;AAAA,KACA;AAEA,IAAA,SAAA,CAAA,MAAA;AACA,MAAA,UAAA,EAAA,CAAA;AACA,MAAA,OAAA,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAEA,IACA,KAAA,CAAA,MAAA,KAAA,CAAA,SAAA,EACA,MAAA;AACA,MAAA,UAAA,EAAA,CAAA;AACA,MAAA,UAAA,EAAA,CAAA;AAAA,KAEA,CAAA,CAAA;AAEA,IAAA,gBAAA,CAAA,QAAA,EAAA,WAAA,OAAA,CAAA,CAAA;AAEA,IAAA,MAAA,CAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -145,7 +145,7 @@ const _sfc_main = defineComponent({
|
|
|
145
145
|
watch(() => visible.value, (val) => {
|
|
146
146
|
var _a, _b;
|
|
147
147
|
if (val) {
|
|
148
|
-
if (props.boxType
|
|
148
|
+
if (props.boxType !== "prompt") {
|
|
149
149
|
focusStartRef.value = (_b = (_a = confirmRef.value) == null ? void 0 : _a.$el) != null ? _b : rootRef.value;
|
|
150
150
|
}
|
|
151
151
|
state.zIndex = nextZIndex();
|