@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.
Files changed (328) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +336 -228
  4. package/dist/index.full.min.js +8 -8
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +8 -8
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +337 -230
  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/cascader/index.d.ts +44 -0
  226. package/es/components/cascader/src/index.mjs +1 -7
  227. package/es/components/cascader/src/index.mjs.map +1 -1
  228. package/es/components/cascader/src/index.vue.d.ts +22 -0
  229. package/es/components/dialog/index.d.ts +4 -0
  230. package/es/components/dialog/src/dialog.d.ts +1 -0
  231. package/es/components/dialog/src/dialog.mjs +4 -0
  232. package/es/components/dialog/src/dialog.mjs.map +1 -1
  233. package/es/components/dialog/src/dialog.vue.d.ts +4 -0
  234. package/es/components/dialog/src/dialog2.mjs +12 -3
  235. package/es/components/dialog/src/dialog2.mjs.map +1 -1
  236. package/es/components/drawer/index.d.ts +3 -0
  237. package/es/components/drawer/src/drawer.d.ts +1 -0
  238. package/es/components/drawer/src/drawer.vue.d.ts +3 -0
  239. package/es/components/message-box/src/index.mjs +133 -113
  240. package/es/components/message-box/src/index.mjs.map +1 -1
  241. package/es/components/message-box/src/index.vue.d.ts +14 -4
  242. package/es/components/message-box/src/message-box.type.d.ts +2 -0
  243. package/es/components/popover/index.d.ts +4 -0
  244. package/es/components/popover/src/index.mjs +14 -4
  245. package/es/components/popover/src/index.mjs.map +1 -1
  246. package/es/components/popover/src/index.vue.d.ts +2 -0
  247. package/es/components/scrollbar/index.d.ts +11 -0
  248. package/es/components/scrollbar/src/scrollbar.vue.d.ts +11 -0
  249. package/es/components/scrollbar/src/scrollbar2.mjs +13 -10
  250. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  251. package/es/components/scrollbar/src/thumb.vue.d.ts +11 -0
  252. package/es/components/scrollbar/src/thumb2.mjs +11 -5
  253. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  254. package/es/components/skeleton/index.d.ts +37 -2
  255. package/es/components/skeleton/src/skeleton-item.vue.d.ts +13 -1
  256. package/es/components/skeleton/src/skeleton-item2.mjs +10 -2
  257. package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
  258. package/es/components/skeleton/src/skeleton.vue.d.ts +11 -0
  259. package/es/components/skeleton/src/skeleton2.mjs +11 -8
  260. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  261. package/es/hooks/index.d.ts +1 -0
  262. package/es/hooks/index.mjs +1 -0
  263. package/es/hooks/index.mjs.map +1 -1
  264. package/es/hooks/use-draggable/index.d.ts +2 -0
  265. package/es/hooks/use-draggable/index.mjs +65 -0
  266. package/es/hooks/use-draggable/index.mjs.map +1 -0
  267. package/es/index.mjs +1 -0
  268. package/es/index.mjs.map +1 -1
  269. package/es/version.d.ts +1 -1
  270. package/es/version.mjs +1 -1
  271. package/es/version.mjs.map +1 -1
  272. package/lib/components/cascader/index.d.ts +44 -0
  273. package/lib/components/cascader/src/index.js +1 -7
  274. package/lib/components/cascader/src/index.js.map +1 -1
  275. package/lib/components/cascader/src/index.vue.d.ts +22 -0
  276. package/lib/components/dialog/index.d.ts +4 -0
  277. package/lib/components/dialog/src/dialog.d.ts +1 -0
  278. package/lib/components/dialog/src/dialog.js +4 -0
  279. package/lib/components/dialog/src/dialog.js.map +1 -1
  280. package/lib/components/dialog/src/dialog.vue.d.ts +4 -0
  281. package/lib/components/dialog/src/dialog2.js +11 -2
  282. package/lib/components/dialog/src/dialog2.js.map +1 -1
  283. package/lib/components/drawer/index.d.ts +3 -0
  284. package/lib/components/drawer/src/drawer.d.ts +1 -0
  285. package/lib/components/drawer/src/drawer.vue.d.ts +3 -0
  286. package/lib/components/message-box/src/index.js +140 -120
  287. package/lib/components/message-box/src/index.js.map +1 -1
  288. package/lib/components/message-box/src/index.vue.d.ts +14 -4
  289. package/lib/components/message-box/src/message-box.type.d.ts +2 -0
  290. package/lib/components/popover/index.d.ts +4 -0
  291. package/lib/components/popover/src/index.js +14 -4
  292. package/lib/components/popover/src/index.js.map +1 -1
  293. package/lib/components/popover/src/index.vue.d.ts +2 -0
  294. package/lib/components/scrollbar/index.d.ts +11 -0
  295. package/lib/components/scrollbar/src/scrollbar.vue.d.ts +11 -0
  296. package/lib/components/scrollbar/src/scrollbar2.js +12 -9
  297. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  298. package/lib/components/scrollbar/src/thumb.vue.d.ts +11 -0
  299. package/lib/components/scrollbar/src/thumb2.js +11 -5
  300. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  301. package/lib/components/skeleton/index.d.ts +37 -2
  302. package/lib/components/skeleton/src/skeleton-item.vue.d.ts +13 -1
  303. package/lib/components/skeleton/src/skeleton-item2.js +10 -2
  304. package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
  305. package/lib/components/skeleton/src/skeleton.vue.d.ts +11 -0
  306. package/lib/components/skeleton/src/skeleton2.js +12 -9
  307. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  308. package/lib/hooks/index.d.ts +1 -0
  309. package/lib/hooks/index.js +60 -58
  310. package/lib/hooks/index.js.map +1 -1
  311. package/lib/hooks/use-draggable/index.d.ts +2 -0
  312. package/lib/hooks/use-draggable/index.js +69 -0
  313. package/lib/hooks/use-draggable/index.js.map +1 -0
  314. package/lib/index.js +60 -58
  315. package/lib/index.js.map +1 -1
  316. package/lib/version.d.ts +1 -1
  317. package/lib/version.js +1 -1
  318. package/lib/version.js.map +1 -1
  319. package/package.json +2 -2
  320. package/tags.json +1 -1
  321. package/theme-chalk/el-dialog.css +1 -1
  322. package/theme-chalk/el-message-box.css +1 -1
  323. package/theme-chalk/el-popper.css +1 -1
  324. package/theme-chalk/index.css +1 -1
  325. package/theme-chalk/src/dialog.scss +7 -0
  326. package/theme-chalk/src/message-box.scss +26 -15
  327. package/theme-chalk/src/popper.scss +6 -6
  328. 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>;
@@ -37,6 +37,10 @@ const dialogProps = buildProps({
37
37
  type: Boolean,
38
38
  default: false
39
39
  },
40
+ draggable: {
41
+ type: Boolean,
42
+ default: false
43
+ },
40
44
  lockScroll: {
41
45
  type: Boolean,
42
46
  default: true
@@ -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 = { class: "el-dialog__header" };
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":";;;;;;;;;;;;AAiFA,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,SAAS,UAAU,OAAO,KAAK;AACrC,UAAM,eAAe,cAAc,OAAO;AAE1C,WAAO;AAAA,MACL;AAAA,MACA;AAAA,SACG;AAAA;AAAA;AAAA;;qBA/Da,OAAM;;;EAiBT,KAAK;AAAA;;;EAIc,KAAK;AAAA;;;;;;SA5D5BA,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,cAkDM;AAAA,+BAjDE;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;;;0CAAiI;AAAA;;;;gBASvI,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;;;;;;8CAMWD;AAAA;sBAGNE,mBAAa;AAAA,mDACKF;AAAA;;;;;;;;cArDzB,SAAO;AAAA;;;;;;;;;;;"}
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, withModifiers, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, resolveDynamicComponent, createCommentVNode, toDisplayString, withKeys, renderSlot, vShow, createTextVNode } from 'vue';
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 inputRef = ref(null);
124
- const confirmRef = ref(null);
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[7] || (_cache[7] = ($event) => _ctx.$emit("vanish"))
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
- withDirectives((openBlock(), createElementBlock("div", {
297
- ref: "root",
298
- role: "dialog",
299
- "aria-label": _ctx.title || "dialog",
300
- "aria-modal": "true",
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
- _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [
309
- createElementVNode("div", _hoisted_3, [
310
- _ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {
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
- class: normalizeClass(["el-message-box__status", _ctx.typeClass])
313
- }, {
314
- default: withCtx(() => [
315
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
316
- ]),
317
- _: 1
318
- }, 8, ["class"])) : createCommentVNode("v-if", true),
319
- createElementVNode("span", null, toDisplayString(_ctx.title), 1)
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
- _ctx.showClose ? (openBlock(), createElementBlock("button", {
322
- key: 0,
323
- type: "button",
324
- class: "el-message-box__headerbtn",
325
- "aria-label": "Close",
326
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel")),
327
- onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
328
- }, [
329
- createVNode(_component_el_icon, { class: "el-message-box__close" }, {
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
- createVNode(_component_close)
407
+ createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)
332
408
  ]),
333
409
  _: 1
334
- })
335
- ], 32)) : createCommentVNode("v-if", true)
336
- ])) : createCommentVNode("v-if", true),
337
- createElementVNode("div", _hoisted_4, [
338
- createElementVNode("div", _hoisted_5, [
339
- _ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {
340
- key: 0,
341
- class: normalizeClass(["el-message-box__status", _ctx.typeClass])
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
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
423
+ createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)
345
424
  ]),
346
425
  _: 1
347
- }, 8, ["class"])) : createCommentVNode("v-if", true),
348
- _ctx.hasMessage ? (openBlock(), createElementBlock("div", _hoisted_6, [
349
- renderSlot(_ctx.$slots, "default", {}, () => [
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
- ], 14, _hoisted_1)), [
412
- [_directive_trap_focus]
413
- ])
433
+ ], 32)
414
434
  ]),
415
435
  _: 3
416
- }, 8, ["z-index", "overlay-class", "mask", "onClick"]), [
436
+ }, 8, ["z-index", "overlay-class", "mask"]), [
417
437
  [vShow, _ctx.visible]
418
438
  ])
419
439
  ]),