@element-plus/nightly 0.0.20220130 → 0.0.20220203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +336 -228
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +337 -230
- 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/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/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/cascader/index.d.ts +44 -0
- package/es/components/cascader/src/index.mjs +1 -7
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/cascader/src/index.vue.d.ts +22 -0
- package/es/components/dialog/index.d.ts +4 -0
- package/es/components/dialog/src/dialog.d.ts +1 -0
- package/es/components/dialog/src/dialog.mjs +4 -0
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +4 -0
- package/es/components/dialog/src/dialog2.mjs +12 -3
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/drawer/index.d.ts +3 -0
- package/es/components/drawer/src/drawer.d.ts +1 -0
- package/es/components/drawer/src/drawer.vue.d.ts +3 -0
- package/es/components/message-box/src/index.mjs +133 -113
- package/es/components/message-box/src/index.mjs.map +1 -1
- package/es/components/message-box/src/index.vue.d.ts +14 -4
- package/es/components/message-box/src/message-box.type.d.ts +2 -0
- package/es/components/popover/index.d.ts +4 -0
- package/es/components/popover/src/index.mjs +14 -4
- package/es/components/popover/src/index.mjs.map +1 -1
- package/es/components/popover/src/index.vue.d.ts +2 -0
- package/es/components/scrollbar/index.d.ts +11 -0
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +11 -0
- package/es/components/scrollbar/src/scrollbar2.mjs +13 -10
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb.vue.d.ts +11 -0
- package/es/components/scrollbar/src/thumb2.mjs +11 -5
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/skeleton/index.d.ts +37 -2
- package/es/components/skeleton/src/skeleton-item.vue.d.ts +13 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +10 -2
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.vue.d.ts +11 -0
- package/es/components/skeleton/src/skeleton2.mjs +11 -8
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/index.mjs.map +1 -1
- package/es/hooks/use-draggable/index.d.ts +2 -0
- package/es/hooks/use-draggable/index.mjs +65 -0
- package/es/hooks/use-draggable/index.mjs.map +1 -0
- package/es/index.mjs +1 -0
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/cascader/index.d.ts +44 -0
- package/lib/components/cascader/src/index.js +1 -7
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/cascader/src/index.vue.d.ts +22 -0
- package/lib/components/dialog/index.d.ts +4 -0
- package/lib/components/dialog/src/dialog.d.ts +1 -0
- package/lib/components/dialog/src/dialog.js +4 -0
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +4 -0
- package/lib/components/dialog/src/dialog2.js +11 -2
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/drawer/index.d.ts +3 -0
- package/lib/components/drawer/src/drawer.d.ts +1 -0
- package/lib/components/drawer/src/drawer.vue.d.ts +3 -0
- package/lib/components/message-box/src/index.js +140 -120
- package/lib/components/message-box/src/index.js.map +1 -1
- package/lib/components/message-box/src/index.vue.d.ts +14 -4
- package/lib/components/message-box/src/message-box.type.d.ts +2 -0
- package/lib/components/popover/index.d.ts +4 -0
- package/lib/components/popover/src/index.js +14 -4
- package/lib/components/popover/src/index.js.map +1 -1
- package/lib/components/popover/src/index.vue.d.ts +2 -0
- package/lib/components/scrollbar/index.d.ts +11 -0
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +11 -0
- package/lib/components/scrollbar/src/scrollbar2.js +12 -9
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/scrollbar/src/thumb.vue.d.ts +11 -0
- package/lib/components/scrollbar/src/thumb2.js +11 -5
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/skeleton/index.d.ts +37 -2
- package/lib/components/skeleton/src/skeleton-item.vue.d.ts +13 -1
- package/lib/components/skeleton/src/skeleton-item2.js +10 -2
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.vue.d.ts +11 -0
- package/lib/components/skeleton/src/skeleton2.js +12 -9
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +60 -58
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-draggable/index.d.ts +2 -0
- package/lib/hooks/use-draggable/index.js +69 -0
- package/lib/hooks/use-draggable/index.js.map +1 -0
- package/lib/index.js +60 -58
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-dialog.css +1 -1
- package/theme-chalk/el-message-box.css +1 -1
- package/theme-chalk/el-popper.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/dialog.scss +7 -0
- package/theme-chalk/src/message-box.scss +26 -15
- package/theme-chalk/src/popper.scss +6 -6
- package/web-types.json +1 -1
|
@@ -1505,6 +1505,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1505
1505
|
scrollLeft: number;
|
|
1506
1506
|
}) => any) | undefined;
|
|
1507
1507
|
}, {
|
|
1508
|
+
ns: {
|
|
1509
|
+
namespace: ComputedRef<string>;
|
|
1510
|
+
b: (blockSuffix?: string) => string;
|
|
1511
|
+
e: (element?: string | undefined) => string;
|
|
1512
|
+
m: (modifier?: string | undefined) => string;
|
|
1513
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
1514
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
1515
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
1516
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
1517
|
+
is: (name: string, state?: boolean) => string;
|
|
1518
|
+
};
|
|
1508
1519
|
scrollbar$: Ref<HTMLDivElement | undefined>;
|
|
1509
1520
|
wrap$: Ref<HTMLDivElement | undefined>;
|
|
1510
1521
|
resize$: Ref<HTMLElement | undefined>;
|
|
@@ -1575,6 +1586,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1575
1586
|
scrollLeft: number;
|
|
1576
1587
|
}) => any) | undefined;
|
|
1577
1588
|
} & import("vue").ShallowUnwrapRef<{
|
|
1589
|
+
ns: {
|
|
1590
|
+
namespace: ComputedRef<string>;
|
|
1591
|
+
b: (blockSuffix?: string) => string;
|
|
1592
|
+
e: (element?: string | undefined) => string;
|
|
1593
|
+
m: (modifier?: string | undefined) => string;
|
|
1594
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
1595
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
1596
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
1597
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
1598
|
+
is: (name: string, state?: boolean) => string;
|
|
1599
|
+
};
|
|
1578
1600
|
scrollbar$: Ref<HTMLDivElement | undefined>;
|
|
1579
1601
|
wrap$: Ref<HTMLDivElement | undefined>;
|
|
1580
1602
|
resize$: Ref<HTMLElement | undefined>;
|
|
@@ -8,6 +8,7 @@ export declare const ElDialog: import("../../utils/types").SFCWithInstall<import
|
|
|
8
8
|
readonly closeOnClickModal: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
9
9
|
readonly closeOnPressEscape: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
10
10
|
readonly fullscreen: import("../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
11
|
+
readonly draggable: import("../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
11
12
|
readonly lockScroll: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
12
13
|
readonly modal: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
13
14
|
readonly showClose: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
@@ -33,6 +34,7 @@ export declare const ElDialog: import("../../utils/types").SFCWithInstall<import
|
|
|
33
34
|
visible: import("vue").Ref<boolean>;
|
|
34
35
|
zIndex: import("vue").Ref<number>;
|
|
35
36
|
dialogRef: import("vue").Ref<HTMLElement | undefined>;
|
|
37
|
+
headerRef: import("vue").Ref<HTMLElement | undefined>;
|
|
36
38
|
overlayEvent: {
|
|
37
39
|
onClick: (e: MouseEvent) => void;
|
|
38
40
|
onMousedown: (e: MouseEvent) => void;
|
|
@@ -54,6 +56,7 @@ export declare const ElDialog: import("../../utils/types").SFCWithInstall<import
|
|
|
54
56
|
readonly closeOnClickModal: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
55
57
|
readonly closeOnPressEscape: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
56
58
|
readonly fullscreen: import("../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
59
|
+
readonly draggable: import("../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
57
60
|
readonly lockScroll: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
58
61
|
readonly modal: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
59
62
|
readonly showClose: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
@@ -77,6 +80,7 @@ export declare const ElDialog: import("../../utils/types").SFCWithInstall<import
|
|
|
77
80
|
title: string;
|
|
78
81
|
width: import("../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
79
82
|
center: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
83
|
+
draggable: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
80
84
|
openDelay: number;
|
|
81
85
|
showClose: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
82
86
|
appendToBody: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
@@ -9,6 +9,7 @@ export declare const dialogProps: {
|
|
|
9
9
|
readonly closeOnClickModal: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
10
10
|
readonly closeOnPressEscape: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
11
11
|
readonly fullscreen: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
12
|
+
readonly draggable: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
12
13
|
readonly lockScroll: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
13
14
|
readonly modal: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
14
15
|
readonly showClose: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.mjs","sources":["../../../../../../packages/components/dialog/src/dialog.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils/props'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\n\nimport type { ExtractPropTypes, Component } from 'vue'\n\nexport const dialogProps = buildProps({\n appendToBody: {\n type: Boolean,\n default: false,\n },\n beforeClose: {\n type: definePropType<(...args: any[]) => void>(Function),\n },\n destroyOnClose: {\n type: Boolean,\n default: false,\n },\n center: {\n type: Boolean,\n default: false,\n },\n customClass: {\n type: String,\n default: '',\n },\n closeIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: '',\n },\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n fullscreen: {\n type: Boolean,\n default: false,\n },\n lockScroll: {\n type: Boolean,\n default: true,\n },\n modal: {\n type: Boolean,\n default: true,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n title: {\n type: String,\n default: '',\n },\n openDelay: {\n type: Number,\n default: 0,\n },\n closeDelay: {\n type: Number,\n default: 0,\n },\n top: {\n type: String,\n },\n modelValue: {\n type: Boolean,\n required: true,\n },\n modalClass: String,\n width: {\n type: [String, Number],\n },\n zIndex: {\n type: Number,\n },\n} as const)\nexport type DialogProps = ExtractPropTypes<typeof dialogProps>\n\nexport const dialogEmits = {\n open: () => true,\n opened: () => true,\n close: () => true,\n closed: () => true,\n [UPDATE_MODEL_EVENT]: (value: boolean) => typeof value === 'boolean',\n}\nexport type DialogEmits = typeof dialogEmits\n"],"names":[],"mappings":";;;AAEY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,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,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,SAAS;AAC7D;;;;"}
|
|
1
|
+
{"version":3,"file":"dialog.mjs","sources":["../../../../../../packages/components/dialog/src/dialog.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils/props'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\n\nimport type { ExtractPropTypes, Component } from 'vue'\n\nexport const dialogProps = buildProps({\n appendToBody: {\n type: Boolean,\n default: false,\n },\n beforeClose: {\n type: definePropType<(...args: any[]) => void>(Function),\n },\n destroyOnClose: {\n type: Boolean,\n default: false,\n },\n center: {\n type: Boolean,\n default: false,\n },\n customClass: {\n type: String,\n default: '',\n },\n closeIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: '',\n },\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n fullscreen: {\n type: Boolean,\n default: false,\n },\n draggable: {\n type: Boolean,\n default: false,\n },\n lockScroll: {\n type: Boolean,\n default: true,\n },\n modal: {\n type: Boolean,\n default: true,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n title: {\n type: String,\n default: '',\n },\n openDelay: {\n type: Number,\n default: 0,\n },\n closeDelay: {\n type: Number,\n default: 0,\n },\n top: {\n type: String,\n },\n modelValue: {\n type: Boolean,\n required: true,\n },\n modalClass: String,\n width: {\n type: [String, Number],\n },\n zIndex: {\n type: Number,\n },\n} as const)\nexport type DialogProps = ExtractPropTypes<typeof dialogProps>\n\nexport const dialogEmits = {\n open: () => true,\n opened: () => true,\n close: () => true,\n closed: () => true,\n [UPDATE_MODEL_EVENT]: (value: boolean) => typeof value === 'boolean',\n}\nexport type DialogEmits = typeof dialogEmits\n"],"names":[],"mappings":";;;AAEY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,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,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,SAAS;AAC7D;;;;"}
|
|
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
8
|
readonly closeOnClickModal: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
9
9
|
readonly closeOnPressEscape: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
10
10
|
readonly fullscreen: import("../../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
11
|
+
readonly draggable: import("../../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
11
12
|
readonly lockScroll: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
12
13
|
readonly modal: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
13
14
|
readonly showClose: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
@@ -33,6 +34,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
34
|
visible: import("vue").Ref<boolean>;
|
|
34
35
|
zIndex: import("vue").Ref<number>;
|
|
35
36
|
dialogRef: import("vue").Ref<HTMLElement | undefined>;
|
|
37
|
+
headerRef: import("vue").Ref<HTMLElement | undefined>;
|
|
36
38
|
overlayEvent: {
|
|
37
39
|
onClick: (e: MouseEvent) => void;
|
|
38
40
|
onMousedown: (e: MouseEvent) => void;
|
|
@@ -54,6 +56,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
56
|
readonly closeOnClickModal: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
55
57
|
readonly closeOnPressEscape: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
56
58
|
readonly fullscreen: import("../../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
59
|
+
readonly draggable: import("../../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
57
60
|
readonly lockScroll: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
58
61
|
readonly modal: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
59
62
|
readonly showClose: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
@@ -77,6 +80,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
77
80
|
title: string;
|
|
78
81
|
width: import("../../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
79
82
|
center: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
83
|
+
draggable: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
80
84
|
openDelay: number;
|
|
81
85
|
showClose: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
82
86
|
appendToBody: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, resolveComponent, resolveDirective, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, createElementVNode, createElementBlock, normalizeClass, normalizeStyle, withModifiers, renderSlot, toDisplayString, resolveDynamicComponent, createCommentVNode, vShow } from 'vue';
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, resolveDirective, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, createElementVNode, createElementBlock, normalizeClass, normalizeStyle, withModifiers, renderSlot, toDisplayString, resolveDynamicComponent, createCommentVNode, vShow } from 'vue';
|
|
2
2
|
import '../../../directives/index.mjs';
|
|
3
3
|
import { ElOverlay } from '../../overlay/index.mjs';
|
|
4
4
|
import { ElIcon } from '../../icon/index.mjs';
|
|
@@ -9,6 +9,7 @@ import { useDialog } from './use-dialog.mjs';
|
|
|
9
9
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
10
|
import TrapFocus from '../../../directives/trap-focus/index.mjs';
|
|
11
11
|
import { useSameTarget } from '../../../hooks/use-same-target/index.mjs';
|
|
12
|
+
import { useDraggable } from '../../../hooks/use-draggable/index.mjs';
|
|
12
13
|
|
|
13
14
|
const _sfc_main = defineComponent({
|
|
14
15
|
name: "ElDialog",
|
|
@@ -24,17 +25,24 @@ const _sfc_main = defineComponent({
|
|
|
24
25
|
emits: dialogEmits,
|
|
25
26
|
setup(props, ctx) {
|
|
26
27
|
const dialogRef = ref();
|
|
28
|
+
const headerRef = ref();
|
|
27
29
|
const dialog = useDialog(props, ctx, dialogRef);
|
|
28
30
|
const overlayEvent = useSameTarget(dialog.onModalClick);
|
|
31
|
+
const draggable = computed(() => props.draggable && !props.fullscreen);
|
|
32
|
+
useDraggable(dialogRef, headerRef, draggable);
|
|
29
33
|
return {
|
|
30
34
|
dialogRef,
|
|
35
|
+
headerRef,
|
|
31
36
|
overlayEvent,
|
|
32
37
|
...dialog
|
|
33
38
|
};
|
|
34
39
|
}
|
|
35
40
|
});
|
|
36
41
|
const _hoisted_1 = ["aria-label"];
|
|
37
|
-
const _hoisted_2 = {
|
|
42
|
+
const _hoisted_2 = {
|
|
43
|
+
ref: "headerRef",
|
|
44
|
+
class: "el-dialog__header"
|
|
45
|
+
};
|
|
38
46
|
const _hoisted_3 = { class: "el-dialog__title" };
|
|
39
47
|
const _hoisted_4 = {
|
|
40
48
|
key: 0,
|
|
@@ -78,6 +86,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
78
86
|
"el-dialog",
|
|
79
87
|
{
|
|
80
88
|
"is-fullscreen": _ctx.fullscreen,
|
|
89
|
+
"is-draggable": _ctx.draggable,
|
|
81
90
|
"el-dialog--center": _ctx.center
|
|
82
91
|
},
|
|
83
92
|
_ctx.customClass
|
|
@@ -107,7 +116,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
107
116
|
_: 1
|
|
108
117
|
})
|
|
109
118
|
])) : createCommentVNode("v-if", true)
|
|
110
|
-
]),
|
|
119
|
+
], 512),
|
|
111
120
|
_ctx.rendered ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
112
121
|
renderSlot(_ctx.$slots, "default")
|
|
113
122
|
])) : createCommentVNode("v-if", true),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog2.mjs","sources":["../../../../../../packages/components/dialog/src/dialog.vue"],"sourcesContent":["<template>\n <teleport to=\"body\" :disabled=\"!appendToBody\">\n <transition\n name=\"dialog-fade\"\n @after-enter=\"afterEnter\"\n @after-leave=\"afterLeave\"\n @before-leave=\"beforeLeave\"\n >\n <el-overlay\n v-show=\"visible\"\n custom-mask-event\n :mask=\"modal\"\n :overlay-class=\"modalClass\"\n :z-index=\"zIndex\"\n >\n <div\n class=\"el-overlay-dialog\"\n @click=\"overlayEvent.onClick\"\n @mousedown=\"overlayEvent.onMousedown\"\n @mouseup=\"overlayEvent.onMouseup\"\n >\n <div\n ref=\"dialogRef\"\n v-trap-focus\n :class=\"[\n 'el-dialog',\n {\n 'is-fullscreen': fullscreen,\n 'el-dialog--center': center,\n },\n customClass,\n ]\"\n aria-modal=\"true\"\n role=\"dialog\"\n :aria-label=\"title || 'dialog'\"\n :style=\"style\"\n @click.stop=\"\"\n >\n <div class=\"el-dialog__header\">\n <slot name=\"title\">\n <span class=\"el-dialog__title\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n aria-label=\"close\"\n class=\"el-dialog__headerbtn\"\n type=\"button\"\n @click=\"handleClose\"\n >\n <el-icon class=\"el-dialog__close\">\n <component :is=\"closeIcon || 'close'\" />\n </el-icon>\n </button>\n </div>\n <template v-if=\"rendered\">\n <div class=\"el-dialog__body\">\n <slot></slot>\n </div>\n </template>\n <div v-if=\"$slots.footer\" class=\"el-dialog__footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </div>\n </el-overlay>\n </transition>\n </teleport>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref } from 'vue'\nimport { TrapFocus } from '@element-plus/directives'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents } from '@element-plus/utils/icon'\nimport { useSameTarget } from '@element-plus/hooks'\nimport { dialogProps, dialogEmits } from './dialog'\nimport { useDialog } from './use-dialog'\n\nexport default defineComponent({\n name: 'ElDialog',\n components: {\n ElOverlay,\n ElIcon,\n ...CloseComponents,\n },\n directives: {\n TrapFocus,\n },\n\n props: dialogProps,\n emits: dialogEmits,\n\n setup(props, ctx) {\n const dialogRef = ref<HTMLElement>()\n const dialog = useDialog(props, ctx, dialogRef)\n const overlayEvent = useSameTarget(dialog.onModalClick)\n\n return {\n dialogRef,\n overlayEvent,\n ...dialog,\n }\n },\n})\n</script>\n"],"names":["_openBlock","_createBlock","_Transition","_createVNode","_withCtx","_createElementBlock","_normalizeStyle","_createCommentVNode"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog2.mjs","sources":["../../../../../../packages/components/dialog/src/dialog.vue"],"sourcesContent":["<template>\n <teleport to=\"body\" :disabled=\"!appendToBody\">\n <transition\n name=\"dialog-fade\"\n @after-enter=\"afterEnter\"\n @after-leave=\"afterLeave\"\n @before-leave=\"beforeLeave\"\n >\n <el-overlay\n v-show=\"visible\"\n custom-mask-event\n :mask=\"modal\"\n :overlay-class=\"modalClass\"\n :z-index=\"zIndex\"\n >\n <div\n class=\"el-overlay-dialog\"\n @click=\"overlayEvent.onClick\"\n @mousedown=\"overlayEvent.onMousedown\"\n @mouseup=\"overlayEvent.onMouseup\"\n >\n <div\n ref=\"dialogRef\"\n v-trap-focus\n :class=\"[\n 'el-dialog',\n {\n 'is-fullscreen': fullscreen,\n 'is-draggable': draggable,\n 'el-dialog--center': center,\n },\n customClass,\n ]\"\n aria-modal=\"true\"\n role=\"dialog\"\n :aria-label=\"title || 'dialog'\"\n :style=\"style\"\n @click.stop=\"\"\n >\n <div ref=\"headerRef\" class=\"el-dialog__header\">\n <slot name=\"title\">\n <span class=\"el-dialog__title\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n aria-label=\"close\"\n class=\"el-dialog__headerbtn\"\n type=\"button\"\n @click=\"handleClose\"\n >\n <el-icon class=\"el-dialog__close\">\n <component :is=\"closeIcon || 'close'\" />\n </el-icon>\n </button>\n </div>\n <template v-if=\"rendered\">\n <div class=\"el-dialog__body\">\n <slot></slot>\n </div>\n </template>\n <div v-if=\"$slots.footer\" class=\"el-dialog__footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </div>\n </el-overlay>\n </transition>\n </teleport>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue'\nimport { TrapFocus } from '@element-plus/directives'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents } from '@element-plus/utils/icon'\nimport { useDraggable, useSameTarget } from '@element-plus/hooks'\nimport { dialogProps, dialogEmits } from './dialog'\nimport { useDialog } from './use-dialog'\n\nexport default defineComponent({\n name: 'ElDialog',\n components: {\n ElOverlay,\n ElIcon,\n ...CloseComponents,\n },\n directives: {\n TrapFocus,\n },\n\n props: dialogProps,\n emits: dialogEmits,\n\n setup(props, ctx) {\n const dialogRef = ref<HTMLElement>()\n const headerRef = ref<HTMLElement>()\n const dialog = useDialog(props, ctx, dialogRef)\n const overlayEvent = useSameTarget(dialog.onModalClick)\n\n const draggable = computed(() => props.draggable && !props.fullscreen)\n useDraggable(dialogRef, headerRef, draggable)\n\n return {\n dialogRef,\n headerRef,\n overlayEvent,\n ...dialog,\n }\n },\n})\n</script>\n"],"names":["_openBlock","_createBlock","_Transition","_createVNode","_withCtx","_createElementBlock","_normalizeStyle","_createCommentVNode"],"mappings":";;;;;;;;;;;;;AAkFA,MAAK,YAAa,gBAAa;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,OACG;AAAA;AAAA,EAEL,YAAY;AAAA,IACV;AAAA;AAAA,EAGF,OAAO;AAAA,EACP,OAAO;AAAA,EAEP,MAAM,OAAO,KAAK;AAChB,UAAM,YAAY;AAClB,UAAM,YAAY;AAClB,UAAM,SAAS,UAAU,OAAO,KAAK;AACrC,UAAM,eAAe,cAAc,OAAO;AAE1C,UAAM,YAAY,SAAS,MAAM,MAAM,aAAa,CAAC,MAAM;AAC3D,iBAAa,WAAW,WAAW;AAEnC,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,SACG;AAAA;AAAA;AAAA;;MAtEW,aAAY;AAAA,EAAC,KAAK;AAAA;;;;EAmBnB,KAAK;AAAA;;;EAIc,KAAK;AAAA;;;;;;SA7D5BA,aAAMC;AAAA,IAAE;AAAA;KACnB;AAAA,gBACOC,YAAa;AAAA,MACjB;AAAA,MACA,cAAa;AAAA,MACb,cAAY,KAAE;AAAA;;uBAEf;AAAA,uBAEEC,YAAiB;AAAA,UAChB,qBAAW;AAAA,UACX;AAAA,UACA,iBAAS,KAAM;AAAA;;mBAEhBC,cAmDM;AAAA,+BAlDE;AAAA,cACL,OAAK;AAAA,cACL,gBAAS,qCAAE,wBAAa,KAAW,aAAxB,QAAa;AAAA,cACxB,aAAO,uCAAE,kBAAa,eAAb,kBAAa,YAAS;AAAA;;2CAGfC;AAAA,gBAEd,KAAK;AAAA;;;qCAA4H;AAAA,yCAAgD;AAAA;;;;gBAUlL,cAAa;AAAA,gBACZ;AAAA,gBACA,cAAK,cAAE;AAAA,gBACP,OAAKC;AAAA;;iBAEN;AAAA,mCAKS;AAAA,6BAHL,aAEO,SAFP,UAEO;AAAA;;;oBAIP;AAAA,oBACA,cAAM;AAAA,oBACN,OAAK;AAAA,oBACJ;AAAA;qBAED;AAAA,oDAC0C;AAAA,uCAAxC;AAAA;;;;;mBAIU;AAAA,8CAECD;AAAA;sBAGNE,mBAAa;AAAA,mDACKF;AAAA;;;;;;;;cAtDzB,SAAO;AAAA;;;;;;;;;;;"}
|
|
@@ -12,6 +12,7 @@ export declare const ElDrawer: import("../../utils/types").SFCWithInstall<import
|
|
|
12
12
|
readonly closeOnClickModal: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
13
13
|
readonly closeOnPressEscape: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
14
14
|
readonly fullscreen: import("../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
15
|
+
readonly draggable: import("../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
15
16
|
readonly lockScroll: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
16
17
|
readonly modal: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
17
18
|
readonly showClose: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
@@ -70,6 +71,7 @@ export declare const ElDrawer: import("../../utils/types").SFCWithInstall<import
|
|
|
70
71
|
readonly closeOnClickModal: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
71
72
|
readonly closeOnPressEscape: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
72
73
|
readonly fullscreen: import("../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
74
|
+
readonly draggable: import("../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
73
75
|
readonly lockScroll: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
74
76
|
readonly modal: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
75
77
|
readonly showClose: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
@@ -95,6 +97,7 @@ export declare const ElDrawer: import("../../utils/types").SFCWithInstall<import
|
|
|
95
97
|
width: import("../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
96
98
|
center: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
97
99
|
direction: import("../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl" | "ttb" | "btt", unknown>;
|
|
100
|
+
draggable: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
98
101
|
openDelay: number;
|
|
99
102
|
showClose: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
100
103
|
appendToBody: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
@@ -13,6 +13,7 @@ export declare const drawerProps: {
|
|
|
13
13
|
readonly closeOnClickModal: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
14
14
|
readonly closeOnPressEscape: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
15
15
|
readonly fullscreen: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
16
|
+
readonly draggable: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
16
17
|
readonly lockScroll: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
17
18
|
readonly modal: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
18
19
|
readonly showClose: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
@@ -12,6 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
readonly closeOnClickModal: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
13
13
|
readonly closeOnPressEscape: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
14
14
|
readonly fullscreen: import("../../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
15
|
+
readonly draggable: import("../../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
15
16
|
readonly lockScroll: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
16
17
|
readonly modal: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
17
18
|
readonly showClose: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
@@ -70,6 +71,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
70
71
|
readonly closeOnClickModal: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
71
72
|
readonly closeOnPressEscape: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
72
73
|
readonly fullscreen: import("../../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
74
|
+
readonly draggable: import("../../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
73
75
|
readonly lockScroll: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
74
76
|
readonly modal: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
75
77
|
readonly showClose: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
@@ -95,6 +97,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
97
|
width: import("../../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
96
98
|
center: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
97
99
|
direction: import("../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl" | "ttb" | "btt", unknown>;
|
|
100
|
+
draggable: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
98
101
|
openDelay: number;
|
|
99
102
|
showClose: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
100
103
|
appendToBody: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, computed, watch, nextTick, onMounted, onBeforeUnmount, toRefs, resolveComponent, resolveDirective, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode,
|
|
1
|
+
import { defineComponent, ref, reactive, computed, watch, nextTick, onMounted, onBeforeUnmount, toRefs, resolveComponent, resolveDirective, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createElementVNode, createElementBlock, normalizeClass, normalizeStyle, withModifiers, resolveDynamicComponent, createCommentVNode, toDisplayString, withKeys, renderSlot, vShow, createTextVNode } from 'vue';
|
|
2
2
|
import { ElButton } from '../../button/index.mjs';
|
|
3
3
|
import '../../../directives/index.mjs';
|
|
4
4
|
import '../../../hooks/index.mjs';
|
|
@@ -14,6 +14,8 @@ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
|
14
14
|
import TrapFocus from '../../../directives/trap-focus/index.mjs';
|
|
15
15
|
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
16
16
|
import { useSize } from '../../../hooks/use-common-props/index.mjs';
|
|
17
|
+
import { useDraggable } from '../../../hooks/use-draggable/index.mjs';
|
|
18
|
+
import { useSameTarget } from '../../../hooks/use-same-target/index.mjs';
|
|
17
19
|
import { useModal } from '../../../hooks/use-modal/index.mjs';
|
|
18
20
|
import { usePreventGlobal } from '../../../hooks/use-prevent-global/index.mjs';
|
|
19
21
|
import { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';
|
|
@@ -62,6 +64,7 @@ const _sfc_main = defineComponent({
|
|
|
62
64
|
default: true
|
|
63
65
|
},
|
|
64
66
|
center: Boolean,
|
|
67
|
+
draggable: Boolean,
|
|
65
68
|
roundButton: {
|
|
66
69
|
default: false,
|
|
67
70
|
type: Boolean
|
|
@@ -120,8 +123,10 @@ const _sfc_main = defineComponent({
|
|
|
120
123
|
const btnSize = useSize(computed(() => props.buttonSize), { prop: true, form: true, formItem: true });
|
|
121
124
|
const iconComponent = computed(() => state.icon || TypeComponentsMap[state.type] || "");
|
|
122
125
|
const hasMessage = computed(() => !!state.message);
|
|
123
|
-
const
|
|
124
|
-
const
|
|
126
|
+
const rootRef = ref();
|
|
127
|
+
const headerRef = ref();
|
|
128
|
+
const inputRef = ref();
|
|
129
|
+
const confirmRef = ref();
|
|
125
130
|
const confirmButtonClasses = computed(() => state.confirmButtonClass);
|
|
126
131
|
watch(() => state.inputValue, async (val) => {
|
|
127
132
|
await nextTick();
|
|
@@ -152,6 +157,8 @@ const _sfc_main = defineComponent({
|
|
|
152
157
|
state.validateError = false;
|
|
153
158
|
}
|
|
154
159
|
});
|
|
160
|
+
const draggable = computed(() => props.draggable);
|
|
161
|
+
useDraggable(rootRef, headerRef, draggable);
|
|
155
162
|
onMounted(async () => {
|
|
156
163
|
await nextTick();
|
|
157
164
|
if (props.closeOnHashChange) {
|
|
@@ -177,6 +184,7 @@ const _sfc_main = defineComponent({
|
|
|
177
184
|
handleAction(state.distinguishCancelAndClose ? "close" : "cancel");
|
|
178
185
|
}
|
|
179
186
|
};
|
|
187
|
+
const overlayEvent = useSameTarget(handleWrapperClick);
|
|
180
188
|
const handleInputEnter = () => {
|
|
181
189
|
if (state.inputType !== "textarea") {
|
|
182
190
|
return handleAction("confirm");
|
|
@@ -241,12 +249,15 @@ const _sfc_main = defineComponent({
|
|
|
241
249
|
useRestoreActive(visible);
|
|
242
250
|
return {
|
|
243
251
|
...toRefs(state),
|
|
252
|
+
overlayEvent,
|
|
244
253
|
visible,
|
|
245
254
|
hasMessage,
|
|
246
255
|
typeClass,
|
|
247
256
|
btnSize,
|
|
248
257
|
iconComponent,
|
|
249
258
|
confirmButtonClasses,
|
|
259
|
+
rootRef,
|
|
260
|
+
headerRef,
|
|
250
261
|
inputRef,
|
|
251
262
|
confirmRef,
|
|
252
263
|
doClose,
|
|
@@ -261,6 +272,7 @@ const _sfc_main = defineComponent({
|
|
|
261
272
|
const _hoisted_1 = ["aria-label"];
|
|
262
273
|
const _hoisted_2 = {
|
|
263
274
|
key: 0,
|
|
275
|
+
ref: "headerRef",
|
|
264
276
|
class: "el-message-box__header"
|
|
265
277
|
};
|
|
266
278
|
const _hoisted_3 = { class: "el-message-box__title" };
|
|
@@ -283,137 +295,145 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
283
295
|
const _directive_trap_focus = resolveDirective("trap-focus");
|
|
284
296
|
return openBlock(), createBlock(Transition, {
|
|
285
297
|
name: "fade-in-linear",
|
|
286
|
-
onAfterLeave: _cache[
|
|
298
|
+
onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit("vanish"))
|
|
287
299
|
}, {
|
|
288
300
|
default: withCtx(() => [
|
|
289
301
|
withDirectives(createVNode(_component_el_overlay, {
|
|
290
302
|
"z-index": _ctx.zIndex,
|
|
291
303
|
"overlay-class": ["is-message-box", _ctx.modalClass],
|
|
292
|
-
mask: _ctx.modal
|
|
293
|
-
onClick: withModifiers(_ctx.handleWrapperClick, ["self"])
|
|
304
|
+
mask: _ctx.modal
|
|
294
305
|
}, {
|
|
295
306
|
default: withCtx(() => [
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
class: normalizeClass([
|
|
302
|
-
"el-message-box",
|
|
303
|
-
_ctx.customClass,
|
|
304
|
-
{ "el-message-box--center": _ctx.center }
|
|
305
|
-
]),
|
|
306
|
-
style: normalizeStyle(_ctx.customStyle)
|
|
307
|
+
createElementVNode("div", {
|
|
308
|
+
class: "el-overlay-message-box",
|
|
309
|
+
onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),
|
|
310
|
+
onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),
|
|
311
|
+
onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))
|
|
307
312
|
}, [
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
313
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
314
|
+
ref: "rootRef",
|
|
315
|
+
role: "dialog",
|
|
316
|
+
"aria-label": _ctx.title || "dialog",
|
|
317
|
+
"aria-modal": "true",
|
|
318
|
+
class: normalizeClass([
|
|
319
|
+
"el-message-box",
|
|
320
|
+
_ctx.customClass,
|
|
321
|
+
{ "el-message-box--center": _ctx.center, "is-draggable": _ctx.draggable }
|
|
322
|
+
]),
|
|
323
|
+
style: normalizeStyle(_ctx.customStyle),
|
|
324
|
+
onClick: _cache[7] || (_cache[7] = withModifiers(() => {
|
|
325
|
+
}, ["stop"]))
|
|
326
|
+
}, [
|
|
327
|
+
_ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
328
|
+
createElementVNode("div", _hoisted_3, [
|
|
329
|
+
_ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {
|
|
330
|
+
key: 0,
|
|
331
|
+
class: normalizeClass(["el-message-box__status", _ctx.typeClass])
|
|
332
|
+
}, {
|
|
333
|
+
default: withCtx(() => [
|
|
334
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
|
|
335
|
+
]),
|
|
336
|
+
_: 1
|
|
337
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
|
338
|
+
createElementVNode("span", null, toDisplayString(_ctx.title), 1)
|
|
339
|
+
]),
|
|
340
|
+
_ctx.showClose ? (openBlock(), createElementBlock("button", {
|
|
311
341
|
key: 0,
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
]),
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
342
|
+
type: "button",
|
|
343
|
+
class: "el-message-box__headerbtn",
|
|
344
|
+
"aria-label": "Close",
|
|
345
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel")),
|
|
346
|
+
onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
|
|
347
|
+
}, [
|
|
348
|
+
createVNode(_component_el_icon, { class: "el-message-box__close" }, {
|
|
349
|
+
default: withCtx(() => [
|
|
350
|
+
createVNode(_component_close)
|
|
351
|
+
]),
|
|
352
|
+
_: 1
|
|
353
|
+
})
|
|
354
|
+
], 32)) : createCommentVNode("v-if", true)
|
|
355
|
+
], 512)) : createCommentVNode("v-if", true),
|
|
356
|
+
createElementVNode("div", _hoisted_4, [
|
|
357
|
+
createElementVNode("div", _hoisted_5, [
|
|
358
|
+
_ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {
|
|
359
|
+
key: 0,
|
|
360
|
+
class: normalizeClass(["el-message-box__status", _ctx.typeClass])
|
|
361
|
+
}, {
|
|
362
|
+
default: withCtx(() => [
|
|
363
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
|
|
364
|
+
]),
|
|
365
|
+
_: 1
|
|
366
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
|
367
|
+
_ctx.hasMessage ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
368
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
369
|
+
!_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_7, toDisplayString(_ctx.message), 1)) : (openBlock(), createElementBlock("p", {
|
|
370
|
+
key: 1,
|
|
371
|
+
innerHTML: _ctx.message
|
|
372
|
+
}, null, 8, _hoisted_8))
|
|
373
|
+
])
|
|
374
|
+
])) : createCommentVNode("v-if", true)
|
|
375
|
+
]),
|
|
376
|
+
withDirectives(createElementVNode("div", _hoisted_9, [
|
|
377
|
+
createVNode(_component_el_input, {
|
|
378
|
+
ref: "inputRef",
|
|
379
|
+
modelValue: _ctx.inputValue,
|
|
380
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),
|
|
381
|
+
type: _ctx.inputType,
|
|
382
|
+
placeholder: _ctx.inputPlaceholder,
|
|
383
|
+
class: normalizeClass({ invalid: _ctx.validateError }),
|
|
384
|
+
onKeydown: withKeys(withModifiers(_ctx.handleInputEnter, ["prevent"]), ["enter"])
|
|
385
|
+
}, null, 8, ["modelValue", "type", "placeholder", "class", "onKeydown"]),
|
|
386
|
+
createElementVNode("div", {
|
|
387
|
+
class: "el-message-box__errormsg",
|
|
388
|
+
style: normalizeStyle({
|
|
389
|
+
visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden"
|
|
390
|
+
})
|
|
391
|
+
}, toDisplayString(_ctx.editorErrorMessage), 5)
|
|
392
|
+
], 512), [
|
|
393
|
+
[vShow, _ctx.showInput]
|
|
394
|
+
])
|
|
320
395
|
]),
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
396
|
+
createElementVNode("div", _hoisted_10, [
|
|
397
|
+
_ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {
|
|
398
|
+
key: 0,
|
|
399
|
+
loading: _ctx.cancelButtonLoading,
|
|
400
|
+
class: normalizeClass([_ctx.cancelButtonClass]),
|
|
401
|
+
round: _ctx.roundButton,
|
|
402
|
+
size: _ctx.btnSize,
|
|
403
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction("cancel")),
|
|
404
|
+
onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"]))
|
|
405
|
+
}, {
|
|
330
406
|
default: withCtx(() => [
|
|
331
|
-
|
|
407
|
+
createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)
|
|
332
408
|
]),
|
|
333
409
|
_: 1
|
|
334
|
-
})
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
410
|
+
}, 8, ["loading", "class", "round", "size"])) : createCommentVNode("v-if", true),
|
|
411
|
+
withDirectives(createVNode(_component_el_button, {
|
|
412
|
+
ref: "confirmRef",
|
|
413
|
+
type: "primary",
|
|
414
|
+
loading: _ctx.confirmButtonLoading,
|
|
415
|
+
class: normalizeClass([_ctx.confirmButtonClasses]),
|
|
416
|
+
round: _ctx.roundButton,
|
|
417
|
+
disabled: _ctx.confirmButtonDisabled,
|
|
418
|
+
size: _ctx.btnSize,
|
|
419
|
+
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction("confirm")),
|
|
420
|
+
onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"]))
|
|
342
421
|
}, {
|
|
343
422
|
default: withCtx(() => [
|
|
344
|
-
(
|
|
423
|
+
createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)
|
|
345
424
|
]),
|
|
346
425
|
_: 1
|
|
347
|
-
}, 8, ["class"
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
!_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_7, toDisplayString(_ctx.message), 1)) : (openBlock(), createElementBlock("p", {
|
|
351
|
-
key: 1,
|
|
352
|
-
innerHTML: _ctx.message
|
|
353
|
-
}, null, 8, _hoisted_8))
|
|
354
|
-
])
|
|
355
|
-
])) : createCommentVNode("v-if", true)
|
|
356
|
-
]),
|
|
357
|
-
withDirectives(createElementVNode("div", _hoisted_9, [
|
|
358
|
-
createVNode(_component_el_input, {
|
|
359
|
-
ref: "inputRef",
|
|
360
|
-
modelValue: _ctx.inputValue,
|
|
361
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),
|
|
362
|
-
type: _ctx.inputType,
|
|
363
|
-
placeholder: _ctx.inputPlaceholder,
|
|
364
|
-
class: normalizeClass({ invalid: _ctx.validateError }),
|
|
365
|
-
onKeydown: withKeys(withModifiers(_ctx.handleInputEnter, ["prevent"]), ["enter"])
|
|
366
|
-
}, null, 8, ["modelValue", "type", "placeholder", "class", "onKeydown"]),
|
|
367
|
-
createElementVNode("div", {
|
|
368
|
-
class: "el-message-box__errormsg",
|
|
369
|
-
style: normalizeStyle({
|
|
370
|
-
visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden"
|
|
371
|
-
})
|
|
372
|
-
}, toDisplayString(_ctx.editorErrorMessage), 5)
|
|
373
|
-
], 512), [
|
|
374
|
-
[vShow, _ctx.showInput]
|
|
375
|
-
])
|
|
376
|
-
]),
|
|
377
|
-
createElementVNode("div", _hoisted_10, [
|
|
378
|
-
_ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {
|
|
379
|
-
key: 0,
|
|
380
|
-
loading: _ctx.cancelButtonLoading,
|
|
381
|
-
class: normalizeClass([_ctx.cancelButtonClass]),
|
|
382
|
-
round: _ctx.roundButton,
|
|
383
|
-
size: _ctx.btnSize,
|
|
384
|
-
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction("cancel")),
|
|
385
|
-
onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"]))
|
|
386
|
-
}, {
|
|
387
|
-
default: withCtx(() => [
|
|
388
|
-
createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)
|
|
389
|
-
]),
|
|
390
|
-
_: 1
|
|
391
|
-
}, 8, ["loading", "class", "round", "size"])) : createCommentVNode("v-if", true),
|
|
392
|
-
withDirectives(createVNode(_component_el_button, {
|
|
393
|
-
ref: "confirmRef",
|
|
394
|
-
type: "primary",
|
|
395
|
-
loading: _ctx.confirmButtonLoading,
|
|
396
|
-
class: normalizeClass([_ctx.confirmButtonClasses]),
|
|
397
|
-
round: _ctx.roundButton,
|
|
398
|
-
disabled: _ctx.confirmButtonDisabled,
|
|
399
|
-
size: _ctx.btnSize,
|
|
400
|
-
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction("confirm")),
|
|
401
|
-
onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"]))
|
|
402
|
-
}, {
|
|
403
|
-
default: withCtx(() => [
|
|
404
|
-
createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)
|
|
405
|
-
]),
|
|
406
|
-
_: 1
|
|
407
|
-
}, 8, ["loading", "class", "round", "disabled", "size"]), [
|
|
408
|
-
[vShow, _ctx.showConfirmButton]
|
|
426
|
+
}, 8, ["loading", "class", "round", "disabled", "size"]), [
|
|
427
|
+
[vShow, _ctx.showConfirmButton]
|
|
428
|
+
])
|
|
409
429
|
])
|
|
430
|
+
], 14, _hoisted_1)), [
|
|
431
|
+
[_directive_trap_focus]
|
|
410
432
|
])
|
|
411
|
-
],
|
|
412
|
-
[_directive_trap_focus]
|
|
413
|
-
])
|
|
433
|
+
], 32)
|
|
414
434
|
]),
|
|
415
435
|
_: 3
|
|
416
|
-
}, 8, ["z-index", "overlay-class", "mask"
|
|
436
|
+
}, 8, ["z-index", "overlay-class", "mask"]), [
|
|
417
437
|
[vShow, _ctx.visible]
|
|
418
438
|
])
|
|
419
439
|
]),
|