@element-plus/nightly 0.0.20220202 → 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 +207 -116
- package/dist/index.full.min.js +6 -6
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +6 -6
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +208 -118
- 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/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/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/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/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/index.css +1 -1
- package/theme-chalk/src/dialog.scss +7 -0
- package/theme-chalk/src/message-box.scss +26 -15
- package/web-types.json +1 -1
package/dist/index.full.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Element Plus v0.0.
|
|
1
|
+
/*! Element Plus v0.0.20220203 */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -3019,6 +3019,66 @@
|
|
|
3019
3019
|
return vue.computed(() => disabled.value || vue.unref(fallback) || (form == null ? void 0 : form.disabled) || false);
|
|
3020
3020
|
};
|
|
3021
3021
|
|
|
3022
|
+
const useDraggable = (targetRef, dragRef, draggable) => {
|
|
3023
|
+
let transform = {
|
|
3024
|
+
offsetX: 0,
|
|
3025
|
+
offsetY: 0
|
|
3026
|
+
};
|
|
3027
|
+
const onMousedown = (e) => {
|
|
3028
|
+
const downX = e.clientX;
|
|
3029
|
+
const downY = e.clientY;
|
|
3030
|
+
const { offsetX, offsetY } = transform;
|
|
3031
|
+
const targetRect = targetRef.value.getBoundingClientRect();
|
|
3032
|
+
const targetLeft = targetRect.left;
|
|
3033
|
+
const targetTop = targetRect.top;
|
|
3034
|
+
const targetWidth = targetRect.width;
|
|
3035
|
+
const targetHeight = targetRect.height;
|
|
3036
|
+
const clientWidth = document.documentElement.clientWidth;
|
|
3037
|
+
const clientHeight = document.documentElement.clientHeight;
|
|
3038
|
+
const minLeft = -targetLeft + offsetX;
|
|
3039
|
+
const minTop = -targetTop + offsetY;
|
|
3040
|
+
const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
|
|
3041
|
+
const maxTop = clientHeight - targetTop - targetHeight + offsetY;
|
|
3042
|
+
const onMousemove = (e2) => {
|
|
3043
|
+
const moveX = Math.min(Math.max(offsetX + e2.clientX - downX, minLeft), maxLeft);
|
|
3044
|
+
const moveY = Math.min(Math.max(offsetY + e2.clientY - downY, minTop), maxTop);
|
|
3045
|
+
transform = {
|
|
3046
|
+
offsetX: moveX,
|
|
3047
|
+
offsetY: moveY
|
|
3048
|
+
};
|
|
3049
|
+
targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(moveY)})`;
|
|
3050
|
+
};
|
|
3051
|
+
const onMouseup = () => {
|
|
3052
|
+
document.removeEventListener("mousemove", onMousemove);
|
|
3053
|
+
document.removeEventListener("mouseup", onMouseup);
|
|
3054
|
+
};
|
|
3055
|
+
document.addEventListener("mousemove", onMousemove);
|
|
3056
|
+
document.addEventListener("mouseup", onMouseup);
|
|
3057
|
+
};
|
|
3058
|
+
const onDraggable = () => {
|
|
3059
|
+
if (dragRef.value && targetRef.value) {
|
|
3060
|
+
dragRef.value.addEventListener("mousedown", onMousedown);
|
|
3061
|
+
}
|
|
3062
|
+
};
|
|
3063
|
+
const offDraggable = () => {
|
|
3064
|
+
if (dragRef.value && targetRef.value) {
|
|
3065
|
+
dragRef.value.removeEventListener("mousedown", onMousedown);
|
|
3066
|
+
}
|
|
3067
|
+
};
|
|
3068
|
+
vue.onMounted(() => {
|
|
3069
|
+
vue.watchEffect(() => {
|
|
3070
|
+
if (draggable.value) {
|
|
3071
|
+
onDraggable();
|
|
3072
|
+
} else {
|
|
3073
|
+
offDraggable();
|
|
3074
|
+
}
|
|
3075
|
+
});
|
|
3076
|
+
});
|
|
3077
|
+
vue.onBeforeUnmount(() => {
|
|
3078
|
+
offDraggable();
|
|
3079
|
+
});
|
|
3080
|
+
};
|
|
3081
|
+
|
|
3022
3082
|
const useFocus = (el) => {
|
|
3023
3083
|
return {
|
|
3024
3084
|
focus: () => {
|
|
@@ -4544,7 +4604,7 @@
|
|
|
4544
4604
|
});
|
|
4545
4605
|
}
|
|
4546
4606
|
|
|
4547
|
-
const version$1 = "0.0.
|
|
4607
|
+
const version$1 = "0.0.20220203";
|
|
4548
4608
|
|
|
4549
4609
|
const INSTALLED_KEY = Symbol("INSTALLED_KEY");
|
|
4550
4610
|
const makeInstaller = (components = []) => {
|
|
@@ -22480,6 +22540,10 @@
|
|
|
22480
22540
|
type: Boolean,
|
|
22481
22541
|
default: false
|
|
22482
22542
|
},
|
|
22543
|
+
draggable: {
|
|
22544
|
+
type: Boolean,
|
|
22545
|
+
default: false
|
|
22546
|
+
},
|
|
22483
22547
|
lockScroll: {
|
|
22484
22548
|
type: Boolean,
|
|
22485
22549
|
default: true
|
|
@@ -22670,17 +22734,24 @@
|
|
|
22670
22734
|
emits: dialogEmits,
|
|
22671
22735
|
setup(props, ctx) {
|
|
22672
22736
|
const dialogRef = vue.ref();
|
|
22737
|
+
const headerRef = vue.ref();
|
|
22673
22738
|
const dialog = useDialog(props, ctx, dialogRef);
|
|
22674
22739
|
const overlayEvent = useSameTarget(dialog.onModalClick);
|
|
22740
|
+
const draggable = vue.computed(() => props.draggable && !props.fullscreen);
|
|
22741
|
+
useDraggable(dialogRef, headerRef, draggable);
|
|
22675
22742
|
return {
|
|
22676
22743
|
dialogRef,
|
|
22744
|
+
headerRef,
|
|
22677
22745
|
overlayEvent,
|
|
22678
22746
|
...dialog
|
|
22679
22747
|
};
|
|
22680
22748
|
}
|
|
22681
22749
|
});
|
|
22682
22750
|
const _hoisted_1$I = ["aria-label"];
|
|
22683
|
-
const _hoisted_2$u = {
|
|
22751
|
+
const _hoisted_2$u = {
|
|
22752
|
+
ref: "headerRef",
|
|
22753
|
+
class: "el-dialog__header"
|
|
22754
|
+
};
|
|
22684
22755
|
const _hoisted_3$l = { class: "el-dialog__title" };
|
|
22685
22756
|
const _hoisted_4$c = {
|
|
22686
22757
|
key: 0,
|
|
@@ -22724,6 +22795,7 @@
|
|
|
22724
22795
|
"el-dialog",
|
|
22725
22796
|
{
|
|
22726
22797
|
"is-fullscreen": _ctx.fullscreen,
|
|
22798
|
+
"is-draggable": _ctx.draggable,
|
|
22727
22799
|
"el-dialog--center": _ctx.center
|
|
22728
22800
|
},
|
|
22729
22801
|
_ctx.customClass
|
|
@@ -22753,7 +22825,7 @@
|
|
|
22753
22825
|
_: 1
|
|
22754
22826
|
})
|
|
22755
22827
|
])) : vue.createCommentVNode("v-if", true)
|
|
22756
|
-
]),
|
|
22828
|
+
], 512),
|
|
22757
22829
|
_ctx.rendered ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$c, [
|
|
22758
22830
|
vue.renderSlot(_ctx.$slots, "default")
|
|
22759
22831
|
])) : vue.createCommentVNode("v-if", true),
|
|
@@ -47428,6 +47500,7 @@
|
|
|
47428
47500
|
default: true
|
|
47429
47501
|
},
|
|
47430
47502
|
center: Boolean,
|
|
47503
|
+
draggable: Boolean,
|
|
47431
47504
|
roundButton: {
|
|
47432
47505
|
default: false,
|
|
47433
47506
|
type: Boolean
|
|
@@ -47486,8 +47559,10 @@
|
|
|
47486
47559
|
const btnSize = useSize(vue.computed(() => props.buttonSize), { prop: true, form: true, formItem: true });
|
|
47487
47560
|
const iconComponent = vue.computed(() => state.icon || TypeComponentsMap[state.type] || "");
|
|
47488
47561
|
const hasMessage = vue.computed(() => !!state.message);
|
|
47489
|
-
const
|
|
47490
|
-
const
|
|
47562
|
+
const rootRef = vue.ref();
|
|
47563
|
+
const headerRef = vue.ref();
|
|
47564
|
+
const inputRef = vue.ref();
|
|
47565
|
+
const confirmRef = vue.ref();
|
|
47491
47566
|
const confirmButtonClasses = vue.computed(() => state.confirmButtonClass);
|
|
47492
47567
|
vue.watch(() => state.inputValue, async (val) => {
|
|
47493
47568
|
await vue.nextTick();
|
|
@@ -47518,6 +47593,8 @@
|
|
|
47518
47593
|
state.validateError = false;
|
|
47519
47594
|
}
|
|
47520
47595
|
});
|
|
47596
|
+
const draggable = vue.computed(() => props.draggable);
|
|
47597
|
+
useDraggable(rootRef, headerRef, draggable);
|
|
47521
47598
|
vue.onMounted(async () => {
|
|
47522
47599
|
await vue.nextTick();
|
|
47523
47600
|
if (props.closeOnHashChange) {
|
|
@@ -47543,6 +47620,7 @@
|
|
|
47543
47620
|
handleAction(state.distinguishCancelAndClose ? "close" : "cancel");
|
|
47544
47621
|
}
|
|
47545
47622
|
};
|
|
47623
|
+
const overlayEvent = useSameTarget(handleWrapperClick);
|
|
47546
47624
|
const handleInputEnter = () => {
|
|
47547
47625
|
if (state.inputType !== "textarea") {
|
|
47548
47626
|
return handleAction("confirm");
|
|
@@ -47607,12 +47685,15 @@
|
|
|
47607
47685
|
useRestoreActive(visible);
|
|
47608
47686
|
return {
|
|
47609
47687
|
...vue.toRefs(state),
|
|
47688
|
+
overlayEvent,
|
|
47610
47689
|
visible,
|
|
47611
47690
|
hasMessage,
|
|
47612
47691
|
typeClass,
|
|
47613
47692
|
btnSize,
|
|
47614
47693
|
iconComponent,
|
|
47615
47694
|
confirmButtonClasses,
|
|
47695
|
+
rootRef,
|
|
47696
|
+
headerRef,
|
|
47616
47697
|
inputRef,
|
|
47617
47698
|
confirmRef,
|
|
47618
47699
|
doClose,
|
|
@@ -47627,6 +47708,7 @@
|
|
|
47627
47708
|
const _hoisted_1$1 = ["aria-label"];
|
|
47628
47709
|
const _hoisted_2$1 = {
|
|
47629
47710
|
key: 0,
|
|
47711
|
+
ref: "headerRef",
|
|
47630
47712
|
class: "el-message-box__header"
|
|
47631
47713
|
};
|
|
47632
47714
|
const _hoisted_3$1 = { class: "el-message-box__title" };
|
|
@@ -47649,137 +47731,145 @@
|
|
|
47649
47731
|
const _directive_trap_focus = vue.resolveDirective("trap-focus");
|
|
47650
47732
|
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
47651
47733
|
name: "fade-in-linear",
|
|
47652
|
-
onAfterLeave: _cache[
|
|
47734
|
+
onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit("vanish"))
|
|
47653
47735
|
}, {
|
|
47654
47736
|
default: vue.withCtx(() => [
|
|
47655
47737
|
vue.withDirectives(vue.createVNode(_component_el_overlay, {
|
|
47656
47738
|
"z-index": _ctx.zIndex,
|
|
47657
47739
|
"overlay-class": ["is-message-box", _ctx.modalClass],
|
|
47658
|
-
mask: _ctx.modal
|
|
47659
|
-
onClick: vue.withModifiers(_ctx.handleWrapperClick, ["self"])
|
|
47740
|
+
mask: _ctx.modal
|
|
47660
47741
|
}, {
|
|
47661
47742
|
default: vue.withCtx(() => [
|
|
47662
|
-
vue.
|
|
47663
|
-
|
|
47664
|
-
|
|
47665
|
-
|
|
47666
|
-
|
|
47667
|
-
class: vue.normalizeClass([
|
|
47668
|
-
"el-message-box",
|
|
47669
|
-
_ctx.customClass,
|
|
47670
|
-
{ "el-message-box--center": _ctx.center }
|
|
47671
|
-
]),
|
|
47672
|
-
style: vue.normalizeStyle(_ctx.customStyle)
|
|
47743
|
+
vue.createElementVNode("div", {
|
|
47744
|
+
class: "el-overlay-message-box",
|
|
47745
|
+
onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),
|
|
47746
|
+
onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),
|
|
47747
|
+
onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))
|
|
47673
47748
|
}, [
|
|
47674
|
-
|
|
47675
|
-
|
|
47676
|
-
|
|
47749
|
+
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
47750
|
+
ref: "rootRef",
|
|
47751
|
+
role: "dialog",
|
|
47752
|
+
"aria-label": _ctx.title || "dialog",
|
|
47753
|
+
"aria-modal": "true",
|
|
47754
|
+
class: vue.normalizeClass([
|
|
47755
|
+
"el-message-box",
|
|
47756
|
+
_ctx.customClass,
|
|
47757
|
+
{ "el-message-box--center": _ctx.center, "is-draggable": _ctx.draggable }
|
|
47758
|
+
]),
|
|
47759
|
+
style: vue.normalizeStyle(_ctx.customStyle),
|
|
47760
|
+
onClick: _cache[7] || (_cache[7] = vue.withModifiers(() => {
|
|
47761
|
+
}, ["stop"]))
|
|
47762
|
+
}, [
|
|
47763
|
+
_ctx.title !== null && _ctx.title !== void 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [
|
|
47764
|
+
vue.createElementVNode("div", _hoisted_3$1, [
|
|
47765
|
+
_ctx.iconComponent && _ctx.center ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
47766
|
+
key: 0,
|
|
47767
|
+
class: vue.normalizeClass(["el-message-box__status", _ctx.typeClass])
|
|
47768
|
+
}, {
|
|
47769
|
+
default: vue.withCtx(() => [
|
|
47770
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.iconComponent)))
|
|
47771
|
+
]),
|
|
47772
|
+
_: 1
|
|
47773
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
47774
|
+
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.title), 1)
|
|
47775
|
+
]),
|
|
47776
|
+
_ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
47677
47777
|
key: 0,
|
|
47678
|
-
|
|
47679
|
-
|
|
47680
|
-
|
|
47681
|
-
|
|
47682
|
-
]),
|
|
47683
|
-
|
|
47684
|
-
|
|
47685
|
-
|
|
47778
|
+
type: "button",
|
|
47779
|
+
class: "el-message-box__headerbtn",
|
|
47780
|
+
"aria-label": "Close",
|
|
47781
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel")),
|
|
47782
|
+
onKeydown: _cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
|
|
47783
|
+
}, [
|
|
47784
|
+
vue.createVNode(_component_el_icon, { class: "el-message-box__close" }, {
|
|
47785
|
+
default: vue.withCtx(() => [
|
|
47786
|
+
vue.createVNode(_component_close)
|
|
47787
|
+
]),
|
|
47788
|
+
_: 1
|
|
47789
|
+
})
|
|
47790
|
+
], 32)) : vue.createCommentVNode("v-if", true)
|
|
47791
|
+
], 512)) : vue.createCommentVNode("v-if", true),
|
|
47792
|
+
vue.createElementVNode("div", _hoisted_4$1, [
|
|
47793
|
+
vue.createElementVNode("div", _hoisted_5$1, [
|
|
47794
|
+
_ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
47795
|
+
key: 0,
|
|
47796
|
+
class: vue.normalizeClass(["el-message-box__status", _ctx.typeClass])
|
|
47797
|
+
}, {
|
|
47798
|
+
default: vue.withCtx(() => [
|
|
47799
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.iconComponent)))
|
|
47800
|
+
]),
|
|
47801
|
+
_: 1
|
|
47802
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
47803
|
+
_ctx.hasMessage ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
47804
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
47805
|
+
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock("p", {
|
|
47806
|
+
key: 1,
|
|
47807
|
+
innerHTML: _ctx.message
|
|
47808
|
+
}, null, 8, _hoisted_8))
|
|
47809
|
+
])
|
|
47810
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
47811
|
+
]),
|
|
47812
|
+
vue.withDirectives(vue.createElementVNode("div", _hoisted_9, [
|
|
47813
|
+
vue.createVNode(_component_el_input, {
|
|
47814
|
+
ref: "inputRef",
|
|
47815
|
+
modelValue: _ctx.inputValue,
|
|
47816
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),
|
|
47817
|
+
type: _ctx.inputType,
|
|
47818
|
+
placeholder: _ctx.inputPlaceholder,
|
|
47819
|
+
class: vue.normalizeClass({ invalid: _ctx.validateError }),
|
|
47820
|
+
onKeydown: vue.withKeys(vue.withModifiers(_ctx.handleInputEnter, ["prevent"]), ["enter"])
|
|
47821
|
+
}, null, 8, ["modelValue", "type", "placeholder", "class", "onKeydown"]),
|
|
47822
|
+
vue.createElementVNode("div", {
|
|
47823
|
+
class: "el-message-box__errormsg",
|
|
47824
|
+
style: vue.normalizeStyle({
|
|
47825
|
+
visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden"
|
|
47826
|
+
})
|
|
47827
|
+
}, vue.toDisplayString(_ctx.editorErrorMessage), 5)
|
|
47828
|
+
], 512), [
|
|
47829
|
+
[vue.vShow, _ctx.showInput]
|
|
47830
|
+
])
|
|
47686
47831
|
]),
|
|
47687
|
-
|
|
47688
|
-
|
|
47689
|
-
|
|
47690
|
-
|
|
47691
|
-
|
|
47692
|
-
|
|
47693
|
-
|
|
47694
|
-
|
|
47695
|
-
|
|
47832
|
+
vue.createElementVNode("div", _hoisted_10, [
|
|
47833
|
+
_ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
47834
|
+
key: 0,
|
|
47835
|
+
loading: _ctx.cancelButtonLoading,
|
|
47836
|
+
class: vue.normalizeClass([_ctx.cancelButtonClass]),
|
|
47837
|
+
round: _ctx.roundButton,
|
|
47838
|
+
size: _ctx.btnSize,
|
|
47839
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction("cancel")),
|
|
47840
|
+
onKeydown: _cache[4] || (_cache[4] = vue.withKeys(vue.withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"]))
|
|
47841
|
+
}, {
|
|
47696
47842
|
default: vue.withCtx(() => [
|
|
47697
|
-
vue.
|
|
47843
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)
|
|
47698
47844
|
]),
|
|
47699
47845
|
_: 1
|
|
47700
|
-
})
|
|
47701
|
-
|
|
47702
|
-
|
|
47703
|
-
|
|
47704
|
-
|
|
47705
|
-
|
|
47706
|
-
|
|
47707
|
-
|
|
47846
|
+
}, 8, ["loading", "class", "round", "size"])) : vue.createCommentVNode("v-if", true),
|
|
47847
|
+
vue.withDirectives(vue.createVNode(_component_el_button, {
|
|
47848
|
+
ref: "confirmRef",
|
|
47849
|
+
type: "primary",
|
|
47850
|
+
loading: _ctx.confirmButtonLoading,
|
|
47851
|
+
class: vue.normalizeClass([_ctx.confirmButtonClasses]),
|
|
47852
|
+
round: _ctx.roundButton,
|
|
47853
|
+
disabled: _ctx.confirmButtonDisabled,
|
|
47854
|
+
size: _ctx.btnSize,
|
|
47855
|
+
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction("confirm")),
|
|
47856
|
+
onKeydown: _cache[6] || (_cache[6] = vue.withKeys(vue.withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"]))
|
|
47708
47857
|
}, {
|
|
47709
47858
|
default: vue.withCtx(() => [
|
|
47710
|
-
|
|
47859
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)
|
|
47711
47860
|
]),
|
|
47712
47861
|
_: 1
|
|
47713
|
-
}, 8, ["class"
|
|
47714
|
-
|
|
47715
|
-
|
|
47716
|
-
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock("p", {
|
|
47717
|
-
key: 1,
|
|
47718
|
-
innerHTML: _ctx.message
|
|
47719
|
-
}, null, 8, _hoisted_8))
|
|
47720
|
-
])
|
|
47721
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
47722
|
-
]),
|
|
47723
|
-
vue.withDirectives(vue.createElementVNode("div", _hoisted_9, [
|
|
47724
|
-
vue.createVNode(_component_el_input, {
|
|
47725
|
-
ref: "inputRef",
|
|
47726
|
-
modelValue: _ctx.inputValue,
|
|
47727
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),
|
|
47728
|
-
type: _ctx.inputType,
|
|
47729
|
-
placeholder: _ctx.inputPlaceholder,
|
|
47730
|
-
class: vue.normalizeClass({ invalid: _ctx.validateError }),
|
|
47731
|
-
onKeydown: vue.withKeys(vue.withModifiers(_ctx.handleInputEnter, ["prevent"]), ["enter"])
|
|
47732
|
-
}, null, 8, ["modelValue", "type", "placeholder", "class", "onKeydown"]),
|
|
47733
|
-
vue.createElementVNode("div", {
|
|
47734
|
-
class: "el-message-box__errormsg",
|
|
47735
|
-
style: vue.normalizeStyle({
|
|
47736
|
-
visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden"
|
|
47737
|
-
})
|
|
47738
|
-
}, vue.toDisplayString(_ctx.editorErrorMessage), 5)
|
|
47739
|
-
], 512), [
|
|
47740
|
-
[vue.vShow, _ctx.showInput]
|
|
47741
|
-
])
|
|
47742
|
-
]),
|
|
47743
|
-
vue.createElementVNode("div", _hoisted_10, [
|
|
47744
|
-
_ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
47745
|
-
key: 0,
|
|
47746
|
-
loading: _ctx.cancelButtonLoading,
|
|
47747
|
-
class: vue.normalizeClass([_ctx.cancelButtonClass]),
|
|
47748
|
-
round: _ctx.roundButton,
|
|
47749
|
-
size: _ctx.btnSize,
|
|
47750
|
-
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction("cancel")),
|
|
47751
|
-
onKeydown: _cache[4] || (_cache[4] = vue.withKeys(vue.withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"]))
|
|
47752
|
-
}, {
|
|
47753
|
-
default: vue.withCtx(() => [
|
|
47754
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)
|
|
47755
|
-
]),
|
|
47756
|
-
_: 1
|
|
47757
|
-
}, 8, ["loading", "class", "round", "size"])) : vue.createCommentVNode("v-if", true),
|
|
47758
|
-
vue.withDirectives(vue.createVNode(_component_el_button, {
|
|
47759
|
-
ref: "confirmRef",
|
|
47760
|
-
type: "primary",
|
|
47761
|
-
loading: _ctx.confirmButtonLoading,
|
|
47762
|
-
class: vue.normalizeClass([_ctx.confirmButtonClasses]),
|
|
47763
|
-
round: _ctx.roundButton,
|
|
47764
|
-
disabled: _ctx.confirmButtonDisabled,
|
|
47765
|
-
size: _ctx.btnSize,
|
|
47766
|
-
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction("confirm")),
|
|
47767
|
-
onKeydown: _cache[6] || (_cache[6] = vue.withKeys(vue.withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"]))
|
|
47768
|
-
}, {
|
|
47769
|
-
default: vue.withCtx(() => [
|
|
47770
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)
|
|
47771
|
-
]),
|
|
47772
|
-
_: 1
|
|
47773
|
-
}, 8, ["loading", "class", "round", "disabled", "size"]), [
|
|
47774
|
-
[vue.vShow, _ctx.showConfirmButton]
|
|
47862
|
+
}, 8, ["loading", "class", "round", "disabled", "size"]), [
|
|
47863
|
+
[vue.vShow, _ctx.showConfirmButton]
|
|
47864
|
+
])
|
|
47775
47865
|
])
|
|
47866
|
+
], 14, _hoisted_1$1)), [
|
|
47867
|
+
[_directive_trap_focus]
|
|
47776
47868
|
])
|
|
47777
|
-
],
|
|
47778
|
-
[_directive_trap_focus]
|
|
47779
|
-
])
|
|
47869
|
+
], 32)
|
|
47780
47870
|
]),
|
|
47781
47871
|
_: 3
|
|
47782
|
-
}, 8, ["z-index", "overlay-class", "mask"
|
|
47872
|
+
}, 8, ["z-index", "overlay-class", "mask"]), [
|
|
47783
47873
|
[vue.vShow, _ctx.visible]
|
|
47784
47874
|
])
|
|
47785
47875
|
]),
|
|
@@ -48515,6 +48605,7 @@
|
|
|
48515
48605
|
exports.useDelayedToggleProps = useDelayedToggleProps;
|
|
48516
48606
|
exports.useDialog = useDialog;
|
|
48517
48607
|
exports.useDisabled = useDisabled$1;
|
|
48608
|
+
exports.useDraggable = useDraggable;
|
|
48518
48609
|
exports.useEscapeKeydown = useEscapeKeydown;
|
|
48519
48610
|
exports.useFocus = useFocus;
|
|
48520
48611
|
exports.useFormItem = useFormItem;
|