@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.
Files changed (282) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +207 -116
  4. package/dist/index.full.min.js +6 -6
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +6 -6
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +208 -118
  9. package/dist/locale/af.js +1 -1
  10. package/dist/locale/af.min.js +1 -1
  11. package/dist/locale/af.min.mjs +1 -1
  12. package/dist/locale/af.mjs +1 -1
  13. package/dist/locale/ar.js +1 -1
  14. package/dist/locale/ar.min.js +1 -1
  15. package/dist/locale/ar.min.mjs +1 -1
  16. package/dist/locale/ar.mjs +1 -1
  17. package/dist/locale/bg.js +1 -1
  18. package/dist/locale/bg.min.js +1 -1
  19. package/dist/locale/bg.min.mjs +1 -1
  20. package/dist/locale/bg.mjs +1 -1
  21. package/dist/locale/bn.js +1 -1
  22. package/dist/locale/bn.min.js +1 -1
  23. package/dist/locale/bn.min.mjs +1 -1
  24. package/dist/locale/bn.mjs +1 -1
  25. package/dist/locale/ca.js +1 -1
  26. package/dist/locale/ca.min.js +1 -1
  27. package/dist/locale/ca.min.mjs +1 -1
  28. package/dist/locale/ca.mjs +1 -1
  29. package/dist/locale/cs.js +1 -1
  30. package/dist/locale/cs.min.js +1 -1
  31. package/dist/locale/cs.min.mjs +1 -1
  32. package/dist/locale/cs.mjs +1 -1
  33. package/dist/locale/da.js +1 -1
  34. package/dist/locale/da.min.js +1 -1
  35. package/dist/locale/da.min.mjs +1 -1
  36. package/dist/locale/da.mjs +1 -1
  37. package/dist/locale/de.js +1 -1
  38. package/dist/locale/de.min.js +1 -1
  39. package/dist/locale/de.min.mjs +1 -1
  40. package/dist/locale/de.mjs +1 -1
  41. package/dist/locale/el.js +1 -1
  42. package/dist/locale/el.min.js +1 -1
  43. package/dist/locale/el.min.mjs +1 -1
  44. package/dist/locale/el.mjs +1 -1
  45. package/dist/locale/en.js +1 -1
  46. package/dist/locale/en.min.js +1 -1
  47. package/dist/locale/en.min.mjs +1 -1
  48. package/dist/locale/en.mjs +1 -1
  49. package/dist/locale/eo.js +1 -1
  50. package/dist/locale/eo.min.js +1 -1
  51. package/dist/locale/eo.min.mjs +1 -1
  52. package/dist/locale/eo.mjs +1 -1
  53. package/dist/locale/es.js +1 -1
  54. package/dist/locale/es.min.js +1 -1
  55. package/dist/locale/es.min.mjs +1 -1
  56. package/dist/locale/es.mjs +1 -1
  57. package/dist/locale/et.js +1 -1
  58. package/dist/locale/et.min.js +1 -1
  59. package/dist/locale/et.min.mjs +1 -1
  60. package/dist/locale/et.mjs +1 -1
  61. package/dist/locale/eu.js +1 -1
  62. package/dist/locale/eu.min.js +1 -1
  63. package/dist/locale/eu.min.mjs +1 -1
  64. package/dist/locale/eu.mjs +1 -1
  65. package/dist/locale/fa.js +1 -1
  66. package/dist/locale/fa.min.js +1 -1
  67. package/dist/locale/fa.min.mjs +1 -1
  68. package/dist/locale/fa.mjs +1 -1
  69. package/dist/locale/fi.js +1 -1
  70. package/dist/locale/fi.min.js +1 -1
  71. package/dist/locale/fi.min.mjs +1 -1
  72. package/dist/locale/fi.mjs +1 -1
  73. package/dist/locale/fr.js +1 -1
  74. package/dist/locale/fr.min.js +1 -1
  75. package/dist/locale/fr.min.mjs +1 -1
  76. package/dist/locale/fr.mjs +1 -1
  77. package/dist/locale/he.js +1 -1
  78. package/dist/locale/he.min.js +1 -1
  79. package/dist/locale/he.min.mjs +1 -1
  80. package/dist/locale/he.mjs +1 -1
  81. package/dist/locale/hr.js +1 -1
  82. package/dist/locale/hr.min.js +1 -1
  83. package/dist/locale/hr.min.mjs +1 -1
  84. package/dist/locale/hr.mjs +1 -1
  85. package/dist/locale/hu.js +1 -1
  86. package/dist/locale/hu.min.js +1 -1
  87. package/dist/locale/hu.min.mjs +1 -1
  88. package/dist/locale/hu.mjs +1 -1
  89. package/dist/locale/hy-am.js +1 -1
  90. package/dist/locale/hy-am.min.js +1 -1
  91. package/dist/locale/hy-am.min.mjs +1 -1
  92. package/dist/locale/hy-am.mjs +1 -1
  93. package/dist/locale/id.js +1 -1
  94. package/dist/locale/id.min.js +1 -1
  95. package/dist/locale/id.min.mjs +1 -1
  96. package/dist/locale/id.mjs +1 -1
  97. package/dist/locale/it.js +1 -1
  98. package/dist/locale/it.min.js +1 -1
  99. package/dist/locale/it.min.mjs +1 -1
  100. package/dist/locale/it.mjs +1 -1
  101. package/dist/locale/ja.js +1 -1
  102. package/dist/locale/ja.min.js +1 -1
  103. package/dist/locale/ja.min.mjs +1 -1
  104. package/dist/locale/ja.mjs +1 -1
  105. package/dist/locale/kk.js +1 -1
  106. package/dist/locale/kk.min.js +1 -1
  107. package/dist/locale/kk.min.mjs +1 -1
  108. package/dist/locale/kk.mjs +1 -1
  109. package/dist/locale/km.js +1 -1
  110. package/dist/locale/km.min.js +1 -1
  111. package/dist/locale/km.min.mjs +1 -1
  112. package/dist/locale/km.mjs +1 -1
  113. package/dist/locale/ko.js +1 -1
  114. package/dist/locale/ko.min.js +1 -1
  115. package/dist/locale/ko.min.mjs +1 -1
  116. package/dist/locale/ko.mjs +1 -1
  117. package/dist/locale/ku.js +1 -1
  118. package/dist/locale/ku.min.js +1 -1
  119. package/dist/locale/ku.min.mjs +1 -1
  120. package/dist/locale/ku.mjs +1 -1
  121. package/dist/locale/ky.js +1 -1
  122. package/dist/locale/ky.min.js +1 -1
  123. package/dist/locale/ky.min.mjs +1 -1
  124. package/dist/locale/ky.mjs +1 -1
  125. package/dist/locale/lt.js +1 -1
  126. package/dist/locale/lt.min.js +1 -1
  127. package/dist/locale/lt.min.mjs +1 -1
  128. package/dist/locale/lt.mjs +1 -1
  129. package/dist/locale/lv.js +1 -1
  130. package/dist/locale/lv.min.js +1 -1
  131. package/dist/locale/lv.min.mjs +1 -1
  132. package/dist/locale/lv.mjs +1 -1
  133. package/dist/locale/mn.js +1 -1
  134. package/dist/locale/mn.min.js +1 -1
  135. package/dist/locale/mn.min.mjs +1 -1
  136. package/dist/locale/mn.mjs +1 -1
  137. package/dist/locale/nb-no.js +1 -1
  138. package/dist/locale/nb-no.min.js +1 -1
  139. package/dist/locale/nb-no.min.mjs +1 -1
  140. package/dist/locale/nb-no.mjs +1 -1
  141. package/dist/locale/nl.js +1 -1
  142. package/dist/locale/nl.min.js +1 -1
  143. package/dist/locale/nl.min.mjs +1 -1
  144. package/dist/locale/nl.mjs +1 -1
  145. package/dist/locale/pa.js +1 -1
  146. package/dist/locale/pa.min.js +1 -1
  147. package/dist/locale/pa.min.mjs +1 -1
  148. package/dist/locale/pa.mjs +1 -1
  149. package/dist/locale/pl.js +1 -1
  150. package/dist/locale/pl.min.js +1 -1
  151. package/dist/locale/pl.min.mjs +1 -1
  152. package/dist/locale/pl.mjs +1 -1
  153. package/dist/locale/pt-br.js +1 -1
  154. package/dist/locale/pt-br.min.js +1 -1
  155. package/dist/locale/pt-br.min.mjs +1 -1
  156. package/dist/locale/pt-br.mjs +1 -1
  157. package/dist/locale/pt.js +1 -1
  158. package/dist/locale/pt.min.js +1 -1
  159. package/dist/locale/pt.min.mjs +1 -1
  160. package/dist/locale/pt.mjs +1 -1
  161. package/dist/locale/ro.js +1 -1
  162. package/dist/locale/ro.min.js +1 -1
  163. package/dist/locale/ro.min.mjs +1 -1
  164. package/dist/locale/ro.mjs +1 -1
  165. package/dist/locale/ru.js +1 -1
  166. package/dist/locale/ru.min.js +1 -1
  167. package/dist/locale/ru.min.mjs +1 -1
  168. package/dist/locale/ru.mjs +1 -1
  169. package/dist/locale/sk.js +1 -1
  170. package/dist/locale/sk.min.js +1 -1
  171. package/dist/locale/sk.min.mjs +1 -1
  172. package/dist/locale/sk.mjs +1 -1
  173. package/dist/locale/sl.js +1 -1
  174. package/dist/locale/sl.min.js +1 -1
  175. package/dist/locale/sl.min.mjs +1 -1
  176. package/dist/locale/sl.mjs +1 -1
  177. package/dist/locale/sr.js +1 -1
  178. package/dist/locale/sr.min.js +1 -1
  179. package/dist/locale/sr.min.mjs +1 -1
  180. package/dist/locale/sr.mjs +1 -1
  181. package/dist/locale/sv.js +1 -1
  182. package/dist/locale/sv.min.js +1 -1
  183. package/dist/locale/sv.min.mjs +1 -1
  184. package/dist/locale/sv.mjs +1 -1
  185. package/dist/locale/ta.js +1 -1
  186. package/dist/locale/ta.min.js +1 -1
  187. package/dist/locale/ta.min.mjs +1 -1
  188. package/dist/locale/ta.mjs +1 -1
  189. package/dist/locale/th.js +1 -1
  190. package/dist/locale/th.min.js +1 -1
  191. package/dist/locale/th.min.mjs +1 -1
  192. package/dist/locale/th.mjs +1 -1
  193. package/dist/locale/tk.js +1 -1
  194. package/dist/locale/tk.min.js +1 -1
  195. package/dist/locale/tk.min.mjs +1 -1
  196. package/dist/locale/tk.mjs +1 -1
  197. package/dist/locale/tr.js +1 -1
  198. package/dist/locale/tr.min.js +1 -1
  199. package/dist/locale/tr.min.mjs +1 -1
  200. package/dist/locale/tr.mjs +1 -1
  201. package/dist/locale/ug-cn.js +1 -1
  202. package/dist/locale/ug-cn.min.js +1 -1
  203. package/dist/locale/ug-cn.min.mjs +1 -1
  204. package/dist/locale/ug-cn.mjs +1 -1
  205. package/dist/locale/uk.js +1 -1
  206. package/dist/locale/uk.min.js +1 -1
  207. package/dist/locale/uk.min.mjs +1 -1
  208. package/dist/locale/uk.mjs +1 -1
  209. package/dist/locale/uz-uz.js +1 -1
  210. package/dist/locale/uz-uz.min.js +1 -1
  211. package/dist/locale/uz-uz.min.mjs +1 -1
  212. package/dist/locale/uz-uz.mjs +1 -1
  213. package/dist/locale/vi.js +1 -1
  214. package/dist/locale/vi.min.js +1 -1
  215. package/dist/locale/vi.min.mjs +1 -1
  216. package/dist/locale/vi.mjs +1 -1
  217. package/dist/locale/zh-cn.js +1 -1
  218. package/dist/locale/zh-cn.min.js +1 -1
  219. package/dist/locale/zh-cn.min.mjs +1 -1
  220. package/dist/locale/zh-cn.mjs +1 -1
  221. package/dist/locale/zh-tw.js +1 -1
  222. package/dist/locale/zh-tw.min.js +1 -1
  223. package/dist/locale/zh-tw.min.mjs +1 -1
  224. package/dist/locale/zh-tw.mjs +1 -1
  225. package/es/components/dialog/index.d.ts +4 -0
  226. package/es/components/dialog/src/dialog.d.ts +1 -0
  227. package/es/components/dialog/src/dialog.mjs +4 -0
  228. package/es/components/dialog/src/dialog.mjs.map +1 -1
  229. package/es/components/dialog/src/dialog.vue.d.ts +4 -0
  230. package/es/components/dialog/src/dialog2.mjs +12 -3
  231. package/es/components/dialog/src/dialog2.mjs.map +1 -1
  232. package/es/components/drawer/index.d.ts +3 -0
  233. package/es/components/drawer/src/drawer.d.ts +1 -0
  234. package/es/components/drawer/src/drawer.vue.d.ts +3 -0
  235. package/es/components/message-box/src/index.mjs +133 -113
  236. package/es/components/message-box/src/index.mjs.map +1 -1
  237. package/es/components/message-box/src/index.vue.d.ts +14 -4
  238. package/es/components/message-box/src/message-box.type.d.ts +2 -0
  239. package/es/hooks/index.d.ts +1 -0
  240. package/es/hooks/index.mjs +1 -0
  241. package/es/hooks/index.mjs.map +1 -1
  242. package/es/hooks/use-draggable/index.d.ts +2 -0
  243. package/es/hooks/use-draggable/index.mjs +65 -0
  244. package/es/hooks/use-draggable/index.mjs.map +1 -0
  245. package/es/index.mjs +1 -0
  246. package/es/index.mjs.map +1 -1
  247. package/es/version.d.ts +1 -1
  248. package/es/version.mjs +1 -1
  249. package/es/version.mjs.map +1 -1
  250. package/lib/components/dialog/index.d.ts +4 -0
  251. package/lib/components/dialog/src/dialog.d.ts +1 -0
  252. package/lib/components/dialog/src/dialog.js +4 -0
  253. package/lib/components/dialog/src/dialog.js.map +1 -1
  254. package/lib/components/dialog/src/dialog.vue.d.ts +4 -0
  255. package/lib/components/dialog/src/dialog2.js +11 -2
  256. package/lib/components/dialog/src/dialog2.js.map +1 -1
  257. package/lib/components/drawer/index.d.ts +3 -0
  258. package/lib/components/drawer/src/drawer.d.ts +1 -0
  259. package/lib/components/drawer/src/drawer.vue.d.ts +3 -0
  260. package/lib/components/message-box/src/index.js +140 -120
  261. package/lib/components/message-box/src/index.js.map +1 -1
  262. package/lib/components/message-box/src/index.vue.d.ts +14 -4
  263. package/lib/components/message-box/src/message-box.type.d.ts +2 -0
  264. package/lib/hooks/index.d.ts +1 -0
  265. package/lib/hooks/index.js +60 -58
  266. package/lib/hooks/index.js.map +1 -1
  267. package/lib/hooks/use-draggable/index.d.ts +2 -0
  268. package/lib/hooks/use-draggable/index.js +69 -0
  269. package/lib/hooks/use-draggable/index.js.map +1 -0
  270. package/lib/index.js +60 -58
  271. package/lib/index.js.map +1 -1
  272. package/lib/version.d.ts +1 -1
  273. package/lib/version.js +1 -1
  274. package/lib/version.js.map +1 -1
  275. package/package.json +2 -2
  276. package/tags.json +1 -1
  277. package/theme-chalk/el-dialog.css +1 -1
  278. package/theme-chalk/el-message-box.css +1 -1
  279. package/theme-chalk/index.css +1 -1
  280. package/theme-chalk/src/dialog.scss +7 -0
  281. package/theme-chalk/src/message-box.scss +26 -15
  282. package/web-types.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! Element Plus v0.0.20220202 */
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.20220202";
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 = { class: "el-dialog__header" };
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 inputRef = vue.ref(null);
47490
- const confirmRef = vue.ref(null);
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[7] || (_cache[7] = ($event) => _ctx.$emit("vanish"))
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.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
47663
- ref: "root",
47664
- role: "dialog",
47665
- "aria-label": _ctx.title || "dialog",
47666
- "aria-modal": "true",
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
- _ctx.title !== null && _ctx.title !== void 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [
47675
- vue.createElementVNode("div", _hoisted_3$1, [
47676
- _ctx.iconComponent && _ctx.center ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
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
- class: vue.normalizeClass(["el-message-box__status", _ctx.typeClass])
47679
- }, {
47680
- default: vue.withCtx(() => [
47681
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.iconComponent)))
47682
- ]),
47683
- _: 1
47684
- }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
47685
- vue.createElementVNode("span", null, vue.toDisplayString(_ctx.title), 1)
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
- _ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
47688
- key: 0,
47689
- type: "button",
47690
- class: "el-message-box__headerbtn",
47691
- "aria-label": "Close",
47692
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel")),
47693
- onKeydown: _cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
47694
- }, [
47695
- vue.createVNode(_component_el_icon, { class: "el-message-box__close" }, {
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.createVNode(_component_close)
47843
+ vue.createTextVNode(vue.toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)
47698
47844
  ]),
47699
47845
  _: 1
47700
- })
47701
- ], 32)) : vue.createCommentVNode("v-if", true)
47702
- ])) : vue.createCommentVNode("v-if", true),
47703
- vue.createElementVNode("div", _hoisted_4$1, [
47704
- vue.createElementVNode("div", _hoisted_5$1, [
47705
- _ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
47706
- key: 0,
47707
- class: vue.normalizeClass(["el-message-box__status", _ctx.typeClass])
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
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.iconComponent)))
47859
+ vue.createTextVNode(vue.toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)
47711
47860
  ]),
47712
47861
  _: 1
47713
- }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
47714
- _ctx.hasMessage ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
47715
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
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
- ], 14, _hoisted_1$1)), [
47778
- [_directive_trap_focus]
47779
- ])
47869
+ ], 32)
47780
47870
  ]),
47781
47871
  _: 3
47782
- }, 8, ["z-index", "overlay-class", "mask", "onClick"]), [
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;