cy-element-ui 1.0.46 → 1.0.48

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 (303) hide show
  1. package/README.md +1 -1
  2. package/lib/alert.js +4 -4
  3. package/lib/aside.js +77 -77
  4. package/lib/autocomplete.js +159 -3940
  5. package/lib/avatar.js +108 -108
  6. package/lib/backtop.js +110 -110
  7. package/lib/badge.js +108 -108
  8. package/lib/breadcrumb-item.js +4 -4
  9. package/lib/breadcrumb.js +4 -4
  10. package/lib/button-group.js +4 -4
  11. package/lib/button.js +4 -4
  12. package/lib/calendar.js +46 -1545
  13. package/lib/card.js +96 -96
  14. package/lib/carousel-item.js +108 -452
  15. package/lib/carousel.js +116 -185
  16. package/lib/cascader-panel.js +187 -2270
  17. package/lib/cascader.js +275 -6452
  18. package/lib/checkbox-button.js +11 -43
  19. package/lib/checkbox-group.js +15 -47
  20. package/lib/checkbox.js +15 -47
  21. package/lib/col.js +2 -2
  22. package/lib/collapse-item.js +110 -815
  23. package/lib/collapse.js +108 -108
  24. package/lib/color-picker.js +153 -3953
  25. package/lib/container.js +88 -88
  26. package/lib/date-picker.js +419 -5230
  27. package/lib/descriptions-item.js +2 -2
  28. package/lib/descriptions.js +8 -63
  29. package/lib/dialog.js +22 -1200
  30. package/lib/divider.js +104 -104
  31. package/lib/drawer.js +105 -875
  32. package/lib/dropdown-item.js +11 -43
  33. package/lib/dropdown-menu.js +75 -2277
  34. package/lib/dropdown.js +136 -1072
  35. package/lib/element-ui.common.js +29785 -42723
  36. package/lib/empty.js +7 -603
  37. package/lib/fileUpload.js +109 -2477
  38. package/lib/footer.js +77 -77
  39. package/lib/form-item.js +28 -418
  40. package/lib/form.js +15 -29
  41. package/lib/header.js +77 -77
  42. package/lib/icon.js +4 -4
  43. package/lib/image.js +49 -1376
  44. package/lib/index.js +1 -1
  45. package/lib/infinite-scroll.js +21 -311
  46. package/lib/input-number.js +33 -1422
  47. package/lib/input.js +37 -507
  48. package/lib/link.js +4 -4
  49. package/lib/loading.js +67 -804
  50. package/lib/main.js +64 -64
  51. package/lib/menu-item-group.js +4 -4
  52. package/lib/menu-item.js +61 -2945
  53. package/lib/menu.js +54 -745
  54. package/lib/message-box.js +80 -2537
  55. package/lib/message.js +24 -1102
  56. package/lib/notification.js +25 -1102
  57. package/lib/option-group.js +11 -43
  58. package/lib/option.js +18 -394
  59. package/lib/page-header.js +87 -683
  60. package/lib/pagination.js +139 -6078
  61. package/lib/popconfirm.js +219 -3508
  62. package/lib/popover.js +99 -2624
  63. package/lib/progress.js +4 -4
  64. package/lib/radio-button.js +11 -43
  65. package/lib/radio-group.js +11 -43
  66. package/lib/radio.js +15 -47
  67. package/lib/rate.js +113 -756
  68. package/lib/result.js +4 -4
  69. package/lib/row.js +2 -2
  70. package/lib/scrollbar.js +50 -735
  71. package/lib/select.js +209 -4352
  72. package/lib/selectDisplayInput.js +108 -108
  73. package/lib/skeleton-item.js +2 -2
  74. package/lib/skeleton.js +108 -108
  75. package/lib/slider.js +120 -4266
  76. package/lib/spinner.js +4 -4
  77. package/lib/statistic.js +117 -9605
  78. package/lib/step.js +108 -108
  79. package/lib/steps.js +99 -514
  80. package/lib/subTitle.js +91 -91
  81. package/lib/submenu.js +121 -2442
  82. package/lib/switch.js +21 -476
  83. package/lib/tab-pane.js +4 -4
  84. package/lib/tabDialog.js +37 -1563
  85. package/lib/table-column.js +32 -880
  86. package/lib/table.js +424 -4467
  87. package/lib/tabs.js +12 -425
  88. package/lib/tag.js +4 -4
  89. package/lib/theme-chalk/README.md +33 -0
  90. package/lib/theme-chalk/base.css +1 -1
  91. package/lib/theme-chalk/gulpfile.js +27 -0
  92. package/lib/theme-chalk/index.css +1 -1
  93. package/lib/theme-chalk/package.json +35 -0
  94. package/lib/theme-chalk/src/alert.scss +147 -0
  95. package/lib/theme-chalk/src/aside.scss +7 -0
  96. package/lib/theme-chalk/src/autocomplete.scss +80 -0
  97. package/lib/theme-chalk/src/avatar.scss +51 -0
  98. package/lib/theme-chalk/src/backtop.scss +22 -0
  99. package/lib/theme-chalk/src/badge.scss +57 -0
  100. package/lib/theme-chalk/src/base.scss +2 -0
  101. package/lib/theme-chalk/src/breadcrumb.scss +55 -0
  102. package/lib/theme-chalk/src/button.scss +262 -0
  103. package/lib/theme-chalk/src/calendar.scss +79 -0
  104. package/lib/theme-chalk/src/card.scss +32 -0
  105. package/lib/theme-chalk/src/carousel-item.scss +50 -0
  106. package/lib/theme-chalk/src/carousel.scss +161 -0
  107. package/lib/theme-chalk/src/cascader-panel.scss +120 -0
  108. package/lib/theme-chalk/src/cascader.scss +182 -0
  109. package/lib/theme-chalk/src/checkbox.scss +359 -0
  110. package/lib/theme-chalk/src/col.scss +156 -0
  111. package/lib/theme-chalk/src/collapse.scss +63 -0
  112. package/lib/theme-chalk/src/color-picker.scss +384 -0
  113. package/lib/theme-chalk/src/common/popup.scss +42 -0
  114. package/lib/theme-chalk/src/common/transition.scss +99 -0
  115. package/lib/theme-chalk/src/common/var.scss +1028 -0
  116. package/lib/theme-chalk/src/container.scss +14 -0
  117. package/lib/theme-chalk/src/date-picker/date-picker.scss +97 -0
  118. package/lib/theme-chalk/src/date-picker/date-range-picker.scss +101 -0
  119. package/lib/theme-chalk/src/date-picker/date-table.scss +151 -0
  120. package/lib/theme-chalk/src/date-picker/month-table.scss +82 -0
  121. package/lib/theme-chalk/src/date-picker/picker-panel.scss +117 -0
  122. package/lib/theme-chalk/src/date-picker/picker.scss +197 -0
  123. package/lib/theme-chalk/src/date-picker/time-picker.scss +85 -0
  124. package/lib/theme-chalk/src/date-picker/time-range-picker.scss +31 -0
  125. package/lib/theme-chalk/src/date-picker/time-spinner.scss +110 -0
  126. package/lib/theme-chalk/src/date-picker/year-table.scss +51 -0
  127. package/lib/theme-chalk/src/date-picker.scss +12 -0
  128. package/lib/theme-chalk/src/descriptions-item.scss +42 -0
  129. package/lib/theme-chalk/src/descriptions.scss +111 -0
  130. package/lib/theme-chalk/src/dialog.scss +123 -0
  131. package/lib/theme-chalk/src/display.scss +12 -0
  132. package/lib/theme-chalk/src/divider.scss +47 -0
  133. package/lib/theme-chalk/src/drawer.scss +219 -0
  134. package/lib/theme-chalk/src/dropdown.scss +182 -0
  135. package/lib/theme-chalk/src/empty.scss +45 -0
  136. package/lib/theme-chalk/src/footer.scss +8 -0
  137. package/lib/theme-chalk/src/form.scss +167 -0
  138. package/lib/theme-chalk/src/header.scss +8 -0
  139. package/lib/theme-chalk/src/icon.scss +1167 -0
  140. package/lib/theme-chalk/src/image.scss +179 -0
  141. package/lib/theme-chalk/src/index.scss +90 -0
  142. package/lib/theme-chalk/src/input-number.scss +180 -0
  143. package/lib/theme-chalk/src/input.scss +360 -0
  144. package/lib/theme-chalk/src/link.scss +81 -0
  145. package/lib/theme-chalk/src/loading.scss +96 -0
  146. package/lib/theme-chalk/src/main.scss +12 -0
  147. package/lib/theme-chalk/src/menu.scss +289 -0
  148. package/lib/theme-chalk/src/message-box.scss +226 -0
  149. package/lib/theme-chalk/src/message.scss +120 -0
  150. package/lib/theme-chalk/src/mixins/_button.scss +81 -0
  151. package/lib/theme-chalk/src/mixins/config.scss +4 -0
  152. package/lib/theme-chalk/src/mixins/function.scss +44 -0
  153. package/lib/theme-chalk/src/mixins/mixins.scss +190 -0
  154. package/lib/theme-chalk/src/mixins/utils.scss +39 -0
  155. package/lib/theme-chalk/src/notification.scss +99 -0
  156. package/lib/theme-chalk/src/option-group.scss +42 -0
  157. package/lib/theme-chalk/src/option.scss +36 -0
  158. package/lib/theme-chalk/src/page-header.scss +41 -0
  159. package/lib/theme-chalk/src/pagination.scss +295 -0
  160. package/lib/theme-chalk/src/popconfirm.scss +16 -0
  161. package/lib/theme-chalk/src/popover.scss +40 -0
  162. package/lib/theme-chalk/src/popper.scss +101 -0
  163. package/lib/theme-chalk/src/progress.scss +141 -0
  164. package/lib/theme-chalk/src/radio-button.scss +113 -0
  165. package/lib/theme-chalk/src/radio-group.scss +9 -0
  166. package/lib/theme-chalk/src/radio.scss +199 -0
  167. package/lib/theme-chalk/src/rate.scss +49 -0
  168. package/lib/theme-chalk/src/reset.scss +79 -0
  169. package/lib/theme-chalk/src/result.scss +61 -0
  170. package/lib/theme-chalk/src/row.scss +43 -0
  171. package/lib/theme-chalk/src/scrollbar.scss +72 -0
  172. package/lib/theme-chalk/src/select-dropdown.scss +62 -0
  173. package/lib/theme-chalk/src/select.scss +152 -0
  174. package/lib/theme-chalk/src/skeleton-item.scss +84 -0
  175. package/lib/theme-chalk/src/skeleton.scss +40 -0
  176. package/lib/theme-chalk/src/slider.scss +250 -0
  177. package/lib/theme-chalk/src/spinner.scss +44 -0
  178. package/lib/theme-chalk/src/statistic.scss +38 -0
  179. package/lib/theme-chalk/src/step.scss +317 -0
  180. package/lib/theme-chalk/src/steps.scss +20 -0
  181. package/lib/theme-chalk/src/switch.scss +116 -0
  182. package/lib/theme-chalk/src/table-column.scss +97 -0
  183. package/lib/theme-chalk/src/table.scss +564 -0
  184. package/lib/theme-chalk/src/tabs.scss +602 -0
  185. package/lib/theme-chalk/src/tag.scss +163 -0
  186. package/lib/theme-chalk/src/time-picker.scss +8 -0
  187. package/lib/theme-chalk/src/time-select.scss +37 -0
  188. package/lib/theme-chalk/src/timeline-item.scss +86 -0
  189. package/lib/theme-chalk/src/timeline.scss +14 -0
  190. package/lib/theme-chalk/src/tooltip.scss +141 -0
  191. package/lib/theme-chalk/src/transfer.scss +227 -0
  192. package/lib/theme-chalk/src/tree.scss +123 -0
  193. package/lib/theme-chalk/src/upload.scss +603 -0
  194. package/lib/time-picker.js +285 -5013
  195. package/lib/time-select.js +181 -4949
  196. package/lib/timeline-item.js +108 -108
  197. package/lib/timeline.js +82 -82
  198. package/lib/tooltip.js +41 -2566
  199. package/lib/transfer.js +142 -2136
  200. package/lib/tree.js +55 -1372
  201. package/lib/treeSelect.js +106 -3421
  202. package/lib/upload.js +28 -1047
  203. package/package.json +3 -3
  204. package/packages/theme-chalk/gulpfile.js +1 -14
  205. package/packages/theme-chalk/src/common/var.scss +16 -16
  206. package/packages/theme-cy/gulpfile.js +1 -14
  207. package/src/index.js +1 -1
  208. package/lib/theme-chalk/alert.css +0 -1
  209. package/lib/theme-chalk/aside.css +0 -1
  210. package/lib/theme-chalk/autocomplete.css +0 -1
  211. package/lib/theme-chalk/avatar.css +0 -1
  212. package/lib/theme-chalk/backtop.css +0 -1
  213. package/lib/theme-chalk/badge.css +0 -1
  214. package/lib/theme-chalk/breadcrumb.css +0 -1
  215. package/lib/theme-chalk/button.css +0 -1
  216. package/lib/theme-chalk/calendar.css +0 -1
  217. package/lib/theme-chalk/card.css +0 -1
  218. package/lib/theme-chalk/carousel-item.css +0 -1
  219. package/lib/theme-chalk/carousel.css +0 -1
  220. package/lib/theme-chalk/cascader-panel.css +0 -1
  221. package/lib/theme-chalk/cascader.css +0 -1
  222. package/lib/theme-chalk/checkbox.css +0 -1
  223. package/lib/theme-chalk/col.css +0 -1
  224. package/lib/theme-chalk/collapse.css +0 -1
  225. package/lib/theme-chalk/color-picker.css +0 -1
  226. package/lib/theme-chalk/container.css +0 -1
  227. package/lib/theme-chalk/date-picker.css +0 -1
  228. package/lib/theme-chalk/descriptions-item.css +0 -1
  229. package/lib/theme-chalk/descriptions.css +0 -1
  230. package/lib/theme-chalk/dialog.css +0 -1
  231. package/lib/theme-chalk/display.css +0 -1
  232. package/lib/theme-chalk/divider.css +0 -1
  233. package/lib/theme-chalk/drawer.css +0 -1
  234. package/lib/theme-chalk/dropdown.css +0 -1
  235. package/lib/theme-chalk/empty.css +0 -1
  236. package/lib/theme-chalk/footer.css +0 -1
  237. package/lib/theme-chalk/form.css +0 -1
  238. package/lib/theme-chalk/header.css +0 -1
  239. package/lib/theme-chalk/icon.css +0 -1
  240. package/lib/theme-chalk/image.css +0 -1
  241. package/lib/theme-chalk/input-number.css +0 -1
  242. package/lib/theme-chalk/input.css +0 -1
  243. package/lib/theme-chalk/link.css +0 -1
  244. package/lib/theme-chalk/loading.css +0 -1
  245. package/lib/theme-chalk/main.css +0 -1
  246. package/lib/theme-chalk/menu.css +0 -1
  247. package/lib/theme-chalk/message-box.css +0 -1
  248. package/lib/theme-chalk/message.css +0 -1
  249. package/lib/theme-chalk/notification.css +0 -1
  250. package/lib/theme-chalk/option-group.css +0 -1
  251. package/lib/theme-chalk/option.css +0 -1
  252. package/lib/theme-chalk/page-header.css +0 -1
  253. package/lib/theme-chalk/pagination.css +0 -1
  254. package/lib/theme-chalk/popconfirm.css +0 -1
  255. package/lib/theme-chalk/popover.css +0 -1
  256. package/lib/theme-chalk/popper.css +0 -1
  257. package/lib/theme-chalk/progress.css +0 -1
  258. package/lib/theme-chalk/radio-button.css +0 -1
  259. package/lib/theme-chalk/radio-group.css +0 -1
  260. package/lib/theme-chalk/radio.css +0 -1
  261. package/lib/theme-chalk/rate.css +0 -1
  262. package/lib/theme-chalk/reset.css +0 -1
  263. package/lib/theme-chalk/result.css +0 -1
  264. package/lib/theme-chalk/row.css +0 -1
  265. package/lib/theme-chalk/scrollbar.css +0 -1
  266. package/lib/theme-chalk/select-dropdown.css +0 -1
  267. package/lib/theme-chalk/select.css +0 -1
  268. package/lib/theme-chalk/skeleton-item.css +0 -1
  269. package/lib/theme-chalk/skeleton.css +0 -1
  270. package/lib/theme-chalk/slider.css +0 -1
  271. package/lib/theme-chalk/spinner.css +0 -1
  272. package/lib/theme-chalk/statistic.css +0 -1
  273. package/lib/theme-chalk/step.css +0 -1
  274. package/lib/theme-chalk/steps.css +0 -1
  275. package/lib/theme-chalk/switch.css +0 -1
  276. package/lib/theme-chalk/table-column.css +0 -1
  277. package/lib/theme-chalk/table.css +0 -1
  278. package/lib/theme-chalk/tabs.css +0 -1
  279. package/lib/theme-chalk/tag.css +0 -1
  280. package/lib/theme-chalk/time-picker.css +0 -1
  281. package/lib/theme-chalk/time-select.css +0 -1
  282. package/lib/theme-chalk/timeline-item.css +0 -1
  283. package/lib/theme-chalk/timeline.css +0 -1
  284. package/lib/theme-chalk/tooltip.css +0 -1
  285. package/lib/theme-chalk/transfer.css +0 -1
  286. package/lib/theme-chalk/tree.css +0 -1
  287. package/lib/theme-chalk/upload.css +0 -1
  288. /package/lib/theme-chalk/{breadcrumb-item.css → src/breadcrumb-item.scss} +0 -0
  289. /package/lib/theme-chalk/{button-group.css → src/button-group.scss} +0 -0
  290. /package/lib/theme-chalk/{checkbox-button.css → src/checkbox-button.scss} +0 -0
  291. /package/lib/theme-chalk/{checkbox-group.css → src/checkbox-group.scss} +0 -0
  292. /package/lib/theme-chalk/{collapse-item.css → src/collapse-item.scss} +0 -0
  293. /package/lib/theme-chalk/{dropdown-item.css → src/dropdown-item.scss} +0 -0
  294. /package/lib/theme-chalk/{dropdown-menu.css → src/dropdown-menu.scss} +0 -0
  295. /package/lib/theme-chalk/{fonts → src/fonts}/element-icons.ttf +0 -0
  296. /package/lib/theme-chalk/{fonts → src/fonts}/element-icons.woff +0 -0
  297. /package/lib/theme-chalk/{form-item.css → src/form-item.scss} +0 -0
  298. /package/lib/theme-chalk/{infinite-scroll.css → src/infinite-scroll.scss} +0 -0
  299. /package/lib/theme-chalk/{infiniteScroll.css → src/infiniteScroll.scss} +0 -0
  300. /package/lib/theme-chalk/{menu-item-group.css → src/menu-item-group.scss} +0 -0
  301. /package/lib/theme-chalk/{menu-item.css → src/menu-item.scss} +0 -0
  302. /package/lib/theme-chalk/{submenu.css → src/submenu.scss} +0 -0
  303. /package/lib/theme-chalk/{tab-pane.css → src/tab-pane.scss} +0 -0
package/lib/tabDialog.js CHANGED
@@ -82,333 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 76);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 75);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
90
  /***/ 0:
91
- /***/ (function(module, exports) {
92
-
93
- module.exports = require("vue");
94
-
95
- /***/ }),
96
-
97
- /***/ 1:
98
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
-
100
- "use strict";
101
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
102
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
103
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
104
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
105
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
106
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
107
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
108
- /* unused harmony export setStyle */
109
- /* unused harmony export isScroll */
110
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
111
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
112
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
113
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
114
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
115
-
116
- /* istanbul ignore next */
117
-
118
-
119
-
120
- var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
121
- var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
122
- var MOZ_HACK_REGEXP = /^moz([A-Z])/;
123
- var ieVersion = isServer ? 0 : Number(document.documentMode);
124
-
125
- /* istanbul ignore next */
126
- var trim = function trim(string) {
127
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
128
- };
129
- /* istanbul ignore next */
130
- var camelCase = function camelCase(name) {
131
- return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
132
- return offset ? letter.toUpperCase() : letter;
133
- }).replace(MOZ_HACK_REGEXP, 'Moz$1');
134
- };
135
-
136
- /* istanbul ignore next */
137
- var on = function () {
138
- if (!isServer && document.addEventListener) {
139
- return function (element, event, handler) {
140
- if (element && event && handler) {
141
- element.addEventListener(event, handler, false);
142
- }
143
- };
144
- } else {
145
- return function (element, event, handler) {
146
- if (element && event && handler) {
147
- element.attachEvent('on' + event, handler);
148
- }
149
- };
150
- }
151
- }();
152
-
153
- /* istanbul ignore next */
154
- var off = function () {
155
- if (!isServer && document.removeEventListener) {
156
- return function (element, event, handler) {
157
- if (element && event) {
158
- element.removeEventListener(event, handler, false);
159
- }
160
- };
161
- } else {
162
- return function (element, event, handler) {
163
- if (element && event) {
164
- element.detachEvent('on' + event, handler);
165
- }
166
- };
167
- }
168
- }();
169
-
170
- /* istanbul ignore next */
171
- var once = function once(el, event, fn) {
172
- var listener = function listener() {
173
- if (fn) {
174
- fn.apply(this, arguments);
175
- }
176
- off(el, event, listener);
177
- };
178
- on(el, event, listener);
179
- };
180
-
181
- /* istanbul ignore next */
182
- function hasClass(el, cls) {
183
- if (!el || !cls) return false;
184
- if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
185
- if (el.classList) {
186
- return el.classList.contains(cls);
187
- } else {
188
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
189
- }
190
- };
191
-
192
- /* istanbul ignore next */
193
- function addClass(el, cls) {
194
- if (!el) return;
195
- var curClass = el.className;
196
- var classes = (cls || '').split(' ');
197
-
198
- for (var i = 0, j = classes.length; i < j; i++) {
199
- var clsName = classes[i];
200
- if (!clsName) continue;
201
-
202
- if (el.classList) {
203
- el.classList.add(clsName);
204
- } else if (!hasClass(el, clsName)) {
205
- curClass += ' ' + clsName;
206
- }
207
- }
208
- if (!el.classList) {
209
- el.setAttribute('class', curClass);
210
- }
211
- };
212
-
213
- /* istanbul ignore next */
214
- function removeClass(el, cls) {
215
- if (!el || !cls) return;
216
- var classes = cls.split(' ');
217
- var curClass = ' ' + el.className + ' ';
218
-
219
- for (var i = 0, j = classes.length; i < j; i++) {
220
- var clsName = classes[i];
221
- if (!clsName) continue;
222
-
223
- if (el.classList) {
224
- el.classList.remove(clsName);
225
- } else if (hasClass(el, clsName)) {
226
- curClass = curClass.replace(' ' + clsName + ' ', ' ');
227
- }
228
- }
229
- if (!el.classList) {
230
- el.setAttribute('class', trim(curClass));
231
- }
232
- };
233
-
234
- /* istanbul ignore next */
235
- var getStyle = ieVersion < 9 ? function (element, styleName) {
236
- if (isServer) return;
237
- if (!element || !styleName) return null;
238
- styleName = camelCase(styleName);
239
- if (styleName === 'float') {
240
- styleName = 'styleFloat';
241
- }
242
- try {
243
- switch (styleName) {
244
- case 'opacity':
245
- try {
246
- return element.filters.item('alpha').opacity / 100;
247
- } catch (e) {
248
- return 1.0;
249
- }
250
- default:
251
- return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
252
- }
253
- } catch (e) {
254
- return element.style[styleName];
255
- }
256
- } : function (element, styleName) {
257
- if (isServer) return;
258
- if (!element || !styleName) return null;
259
- styleName = camelCase(styleName);
260
- if (styleName === 'float') {
261
- styleName = 'cssFloat';
262
- }
263
- try {
264
- var computed = document.defaultView.getComputedStyle(element, '');
265
- return element.style[styleName] || computed ? computed[styleName] : null;
266
- } catch (e) {
267
- return element.style[styleName];
268
- }
269
- };
270
-
271
- /* istanbul ignore next */
272
- function setStyle(element, styleName, value) {
273
- if (!element || !styleName) return;
274
-
275
- if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
276
- for (var prop in styleName) {
277
- if (styleName.hasOwnProperty(prop)) {
278
- setStyle(element, prop, styleName[prop]);
279
- }
280
- }
281
- } else {
282
- styleName = camelCase(styleName);
283
- if (styleName === 'opacity' && ieVersion < 9) {
284
- element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
285
- } else {
286
- element.style[styleName] = value;
287
- }
288
- }
289
- };
290
-
291
- var isScroll = function isScroll(el, vertical) {
292
- if (isServer) return;
293
-
294
- var determinedDirection = vertical !== null && vertical !== undefined;
295
- var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
296
-
297
- return overflow.match(/(scroll|auto|overlay)/);
298
- };
299
-
300
- var getScrollContainer = function getScrollContainer(el, vertical) {
301
- if (isServer) return;
302
-
303
- var parent = el;
304
- while (parent) {
305
- if ([window, document, document.documentElement].includes(parent)) {
306
- return window;
307
- }
308
- if (isScroll(parent, vertical)) {
309
- return parent;
310
- }
311
- parent = parent.parentNode;
312
- }
313
-
314
- return parent;
315
- };
316
-
317
- var isInContainer = function isInContainer(el, container) {
318
- if (isServer || !el || !container) return false;
319
-
320
- var elRect = el.getBoundingClientRect();
321
- var containerRect = void 0;
322
-
323
- if ([window, document, document.documentElement, null, undefined].includes(container)) {
324
- containerRect = {
325
- top: 0,
326
- right: window.innerWidth,
327
- bottom: window.innerHeight,
328
- left: 0
329
- };
330
- } else {
331
- containerRect = container.getBoundingClientRect();
332
- }
333
-
334
- return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
335
- };
336
-
337
- /***/ }),
338
-
339
- /***/ 12:
340
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
341
-
342
- "use strict";
343
- /* harmony import */ var element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
344
-
345
- /**
346
- * Show migrating guide in browser console.
347
- *
348
- * Usage:
349
- * import Migrating from 'element-ui/src/mixins/migrating';
350
- *
351
- * mixins: [Migrating]
352
- *
353
- * add getMigratingConfig method for your component.
354
- * getMigratingConfig() {
355
- * return {
356
- * props: {
357
- * 'allow-no-selection': 'allow-no-selection is removed.',
358
- * 'selection-mode': 'selection-mode is removed.'
359
- * },
360
- * events: {
361
- * selectionchange: 'selectionchange is renamed to selection-change.'
362
- * }
363
- * };
364
- * },
365
- */
366
- /* harmony default export */ __webpack_exports__["a"] = ({
367
- mounted: function mounted() {
368
- if (true) return;
369
- if (!this.$vnode) return;
370
-
371
- var _getMigratingConfig = this.getMigratingConfig(),
372
- _getMigratingConfig$p = _getMigratingConfig.props,
373
- props = _getMigratingConfig$p === undefined ? {} : _getMigratingConfig$p,
374
- _getMigratingConfig$e = _getMigratingConfig.events,
375
- events = _getMigratingConfig$e === undefined ? {} : _getMigratingConfig$e;
376
-
377
- var _$vnode = this.$vnode,
378
- data = _$vnode.data,
379
- componentOptions = _$vnode.componentOptions;
380
-
381
- var definedProps = data.attrs || {};
382
- var definedEvents = componentOptions.listeners || {};
383
-
384
- for (var propName in definedProps) {
385
- propName = Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(propName); // compatible with camel case
386
- if (props[propName]) {
387
- console.warn('[Element Migrating][' + this.$options.name + '][Attribute]: ' + props[propName]);
388
- }
389
- }
390
-
391
- for (var eventName in definedEvents) {
392
- eventName = Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(eventName); // compatible with camel case
393
- if (events[eventName]) {
394
- console.warn('[Element Migrating][' + this.$options.name + '][Event]: ' + events[eventName]);
395
- }
396
- }
397
- },
398
-
399
- methods: {
400
- getMigratingConfig: function getMigratingConfig() {
401
- return {
402
- props: {},
403
- events: {}
404
- };
405
- }
406
- }
407
- });
408
-
409
- /***/ }),
410
-
411
- /***/ 2:
412
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
413
92
 
414
93
  "use strict";
@@ -484,781 +163,50 @@ function normalizeComponent(
484
163
  )
485
164
  }
486
165
  : injectStyles
487
- }
488
-
489
- if (hook) {
490
- if (options.functional) {
491
- // for template-only hot-reload because in that case the render fn doesn't
492
- // go through the normalizer
493
- options._injectStyles = hook
494
- // register for functional component in vue file
495
- var originalRender = options.render
496
- options.render = function renderWithStyleInjection(h, context) {
497
- hook.call(context)
498
- return originalRender(h, context)
499
- }
500
- } else {
501
- // inject component registration as beforeCreate hook
502
- var existing = options.beforeCreate
503
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
504
- }
505
- }
506
-
507
- return {
508
- exports: scriptExports,
509
- options: options
510
- }
511
- }
512
-
513
-
514
- /***/ }),
515
-
516
- /***/ 3:
517
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
518
-
519
- "use strict";
520
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
521
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
522
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
523
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
524
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
525
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
526
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
527
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
528
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
529
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
530
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
531
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
532
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
533
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
534
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
535
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
536
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
537
- /* unused harmony export looseEqual */
538
- /* unused harmony export arrayEquals */
539
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
540
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
541
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
542
- /* unused harmony export objToArray */
543
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
544
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
545
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
546
- /* harmony import */ var element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
547
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
548
-
549
-
550
-
551
-
552
- var hasOwnProperty = Object.prototype.hasOwnProperty;
553
-
554
- function noop() {};
555
-
556
- function hasOwn(obj, key) {
557
- return hasOwnProperty.call(obj, key);
558
- };
559
-
560
- function extend(to, _from) {
561
- for (var key in _from) {
562
- to[key] = _from[key];
563
- }
564
- return to;
565
- };
566
-
567
- function toObject(arr) {
568
- var res = {};
569
- for (var i = 0; i < arr.length; i++) {
570
- if (arr[i]) {
571
- extend(res, arr[i]);
572
- }
573
- }
574
- return res;
575
- };
576
-
577
- var getValueByPath = function getValueByPath(object, prop) {
578
- prop = prop || '';
579
- var paths = prop.split('.');
580
- var current = object;
581
- var result = null;
582
- for (var i = 0, j = paths.length; i < j; i++) {
583
- var path = paths[i];
584
- if (!current) break;
585
-
586
- if (i === j - 1) {
587
- result = current[path];
588
- break;
589
- }
590
- current = current[path];
591
- }
592
- return result;
593
- };
594
-
595
- function getPropByPath(obj, path, strict) {
596
- var tempObj = obj;
597
- path = path.replace(/\[(\w+)\]/g, '.$1');
598
- path = path.replace(/^\./, '');
599
-
600
- var keyArr = path.split('.');
601
- var i = 0;
602
- for (var len = keyArr.length; i < len - 1; ++i) {
603
- if (!tempObj && !strict) break;
604
- var key = keyArr[i];
605
- if (key in tempObj) {
606
- tempObj = tempObj[key];
607
- } else {
608
- if (strict) {
609
- throw new Error('please transfer a valid prop path to form item!');
610
- }
611
- break;
612
- }
613
- }
614
- return {
615
- o: tempObj,
616
- k: keyArr[i],
617
- v: tempObj ? tempObj[keyArr[i]] : null
618
- };
619
- };
620
-
621
- var generateId = function generateId() {
622
- return Math.floor(Math.random() * 10000);
623
- };
624
-
625
- var valueEquals = function valueEquals(a, b) {
626
- // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
627
- if (a === b) return true;
628
- if (!(a instanceof Array)) return false;
629
- if (!(b instanceof Array)) return false;
630
- if (a.length !== b.length) return false;
631
- for (var i = 0; i !== a.length; ++i) {
632
- if (a[i] !== b[i]) return false;
633
- }
634
- return true;
635
- };
636
-
637
- var escapeRegexpString = function escapeRegexpString() {
638
- var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
639
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
640
- };
641
-
642
- // TODO: use native Array.find, Array.findIndex when IE support is dropped
643
- var arrayFindIndex = function arrayFindIndex(arr, pred) {
644
- for (var i = 0; i !== arr.length; ++i) {
645
- if (pred(arr[i])) {
646
- return i;
647
- }
648
- }
649
- return -1;
650
- };
651
-
652
- var arrayFind = function arrayFind(arr, pred) {
653
- var idx = arrayFindIndex(arr, pred);
654
- return idx !== -1 ? arr[idx] : undefined;
655
- };
656
-
657
- // coerce truthy value to array
658
- var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
659
- if (Array.isArray(val)) {
660
- return val;
661
- } else if (val) {
662
- return [val];
663
- } else {
664
- return [];
665
- }
666
- };
667
-
668
- var isIE = function isIE() {
669
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
670
- };
671
-
672
- var isEdge = function isEdge() {
673
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
674
- };
675
-
676
- var isFirefox = function isFirefox() {
677
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
678
- };
679
-
680
- var autoprefixer = function autoprefixer(style) {
681
- if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
682
- var rules = ['transform', 'transition', 'animation'];
683
- var prefixes = ['ms-', 'webkit-'];
684
- rules.forEach(function (rule) {
685
- var value = style[rule];
686
- if (rule && value) {
687
- prefixes.forEach(function (prefix) {
688
- style[prefix + rule] = value;
689
- });
690
- }
691
- });
692
- return style;
693
- };
694
-
695
- var kebabCase = function kebabCase(str) {
696
- var hyphenateRE = /([^-])([A-Z])/g;
697
- return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
698
- };
699
-
700
- var capitalize = function capitalize(str) {
701
- if (!Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
702
- return str.charAt(0).toUpperCase() + str.slice(1);
703
- };
704
-
705
- var looseEqual = function looseEqual(a, b) {
706
- var isObjectA = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
707
- var isObjectB = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
708
- if (isObjectA && isObjectB) {
709
- return JSON.stringify(a) === JSON.stringify(b);
710
- } else if (!isObjectA && !isObjectB) {
711
- return String(a) === String(b);
712
- } else {
713
- return false;
714
- }
715
- };
716
-
717
- var arrayEquals = function arrayEquals(arrayA, arrayB) {
718
- arrayA = arrayA || [];
719
- arrayB = arrayB || [];
720
-
721
- if (arrayA.length !== arrayB.length) {
722
- return false;
723
- }
724
-
725
- for (var i = 0; i < arrayA.length; i++) {
726
- if (!looseEqual(arrayA[i], arrayB[i])) {
727
- return false;
728
- }
729
- }
730
-
731
- return true;
732
- };
733
-
734
- var isEqual = function isEqual(value1, value2) {
735
- if (Array.isArray(value1) && Array.isArray(value2)) {
736
- return arrayEquals(value1, value2);
737
- }
738
- return looseEqual(value1, value2);
739
- };
740
-
741
- var isEmpty = function isEmpty(val) {
742
- // null or undefined
743
- if (val == null) return true;
744
-
745
- if (typeof val === 'boolean') return false;
746
-
747
- if (typeof val === 'number') return !val;
748
-
749
- if (val instanceof Error) return val.message === '';
750
-
751
- switch (Object.prototype.toString.call(val)) {
752
- // String or Array
753
- case '[object String]':
754
- case '[object Array]':
755
- return !val.length;
756
-
757
- // Map or Set or File
758
- case '[object File]':
759
- case '[object Map]':
760
- case '[object Set]':
761
- {
762
- return !val.size;
763
- }
764
- // Plain Object
765
- case '[object Object]':
766
- {
767
- return !Object.keys(val).length;
768
- }
769
- }
770
-
771
- return false;
772
- };
773
-
774
- function rafThrottle(fn) {
775
- var locked = false;
776
- return function () {
777
- var _this = this;
778
-
779
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
780
- args[_key] = arguments[_key];
781
- }
782
-
783
- if (locked) return;
784
- locked = true;
785
- window.requestAnimationFrame(function (_) {
786
- fn.apply(_this, args);
787
- locked = false;
788
- });
789
- };
790
- }
791
-
792
- function objToArray(obj) {
793
- if (Array.isArray(obj)) {
794
- return obj;
795
- }
796
- return isEmpty(obj) ? [] : [obj];
797
- }
798
-
799
- var isMac = function isMac() {
800
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
801
- };
802
-
803
- /***/ }),
804
-
805
- /***/ 4:
806
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
807
-
808
- "use strict";
809
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
810
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
811
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
812
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
813
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
814
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
815
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
816
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
817
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
818
-
819
-
820
-
821
- function isString(obj) {
822
- return Object.prototype.toString.call(obj) === '[object String]';
823
- }
824
-
825
- function isObject(obj) {
826
- return Object.prototype.toString.call(obj) === '[object Object]';
827
- }
828
-
829
- function isHtmlElement(node) {
830
- return node && node.nodeType === Node.ELEMENT_NODE;
831
- }
832
-
833
- /**
834
- * - Inspired:
835
- * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
836
- */
837
- var isFunction = function isFunction(functionToCheck) {
838
- var getType = {};
839
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
840
- };
841
-
842
- if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
843
- isFunction = function isFunction(obj) {
844
- return typeof obj === 'function' || false;
845
- };
846
- }
847
-
848
-
849
-
850
- var isUndefined = function isUndefined(val) {
851
- return val === void 0;
852
- };
853
-
854
- var isDefined = function isDefined(val) {
855
- return val !== undefined && val !== null;
856
- };
857
-
858
- /***/ }),
859
-
860
- /***/ 53:
861
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
862
-
863
- "use strict";
864
- // ESM COMPAT FLAG
865
- __webpack_require__.r(__webpack_exports__);
866
-
867
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/component.vue?vue&type=template&id=00cb1a07
868
- var render = function render() {
869
- var _vm = this,
870
- _c = _vm._self._c
871
- return _c(
872
- "transition",
873
- {
874
- attrs: { name: "dialog-fade" },
875
- on: { "after-enter": _vm.afterEnter, "after-leave": _vm.afterLeave },
876
- },
877
- [
878
- _c(
879
- "div",
880
- {
881
- directives: [
882
- {
883
- name: "show",
884
- rawName: "v-show",
885
- value: _vm.visible,
886
- expression: "visible",
887
- },
888
- ],
889
- staticClass: "el-dialog__wrapper",
890
- on: {
891
- click: function ($event) {
892
- if ($event.target !== $event.currentTarget) return null
893
- return _vm.handleWrapperClick.apply(null, arguments)
894
- },
895
- },
896
- },
897
- [
898
- _c(
899
- "div",
900
- {
901
- key: _vm.key,
902
- ref: "dialog",
903
- class: [
904
- "el-dialog",
905
- {
906
- "is-fullscreen": _vm.fullscreen,
907
- "el-dialog--center": _vm.center,
908
- },
909
- _vm.customClass,
910
- ],
911
- style: _vm.style,
912
- attrs: {
913
- role: "dialog",
914
- "aria-modal": "true",
915
- "aria-label": _vm.title || "dialog",
916
- },
917
- },
918
- [
919
- _c(
920
- "div",
921
- { staticClass: "el-dialog__header" },
922
- [
923
- _vm._t("title", function () {
924
- return [
925
- _c("span", { staticClass: "el-dialog__title" }, [
926
- _vm._v(_vm._s(_vm.title)),
927
- ]),
928
- ]
929
- }),
930
- _vm.showClose
931
- ? _c(
932
- "button",
933
- {
934
- staticClass: "el-dialog__headerbtn",
935
- attrs: { type: "button", "aria-label": "Close" },
936
- on: { click: _vm.handleClose },
937
- },
938
- [
939
- _c("i", {
940
- staticClass:
941
- "el-dialog__close el-icon el-icon-close",
942
- }),
943
- ]
944
- )
945
- : _vm._e(),
946
- ],
947
- 2
948
- ),
949
- _vm.rendered
950
- ? _c(
951
- "div",
952
- { staticClass: "el-dialog__body" },
953
- [_vm._t("default")],
954
- 2
955
- )
956
- : _vm._e(),
957
- _vm.$slots.footer
958
- ? _c(
959
- "div",
960
- { staticClass: "el-dialog__footer" },
961
- [_vm._t("footer")],
962
- 2
963
- )
964
- : _vm._e(),
965
- ]
966
- ),
967
- ]
968
- ),
969
- ]
970
- )
971
- }
972
- var staticRenderFns = []
973
- render._withStripped = true
974
-
975
-
976
- // CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=template&id=00cb1a07
977
-
978
- // EXTERNAL MODULE: ./src/utils/popup/index.js + 1 modules
979
- var popup = __webpack_require__(9);
980
-
981
- // EXTERNAL MODULE: ./src/mixins/migrating.js
982
- var migrating = __webpack_require__(12);
983
-
984
- // EXTERNAL MODULE: ./src/mixins/emitter.js
985
- var emitter = __webpack_require__(6);
986
-
987
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/component.vue?vue&type=script&lang=js
988
-
989
-
990
-
991
-
992
-
993
- /* harmony default export */ var componentvue_type_script_lang_js = ({
994
- name: 'ElDialog',
995
-
996
- mixins: [popup["b" /* default */], emitter["a" /* default */], migrating["a" /* default */]],
997
-
998
- props: {
999
- title: {
1000
- type: String,
1001
- default: ''
1002
- },
1003
-
1004
- modal: {
1005
- type: Boolean,
1006
- default: true
1007
- },
1008
-
1009
- modalAppendToBody: {
1010
- type: Boolean,
1011
- default: true
1012
- },
1013
-
1014
- appendToBody: {
1015
- type: Boolean,
1016
- default: false
1017
- },
1018
-
1019
- lockScroll: {
1020
- type: Boolean,
1021
- default: true
1022
- },
1023
-
1024
- closeOnClickModal: {
1025
- type: Boolean,
1026
- default: true
1027
- },
1028
-
1029
- closeOnPressEscape: {
1030
- type: Boolean,
1031
- default: true
1032
- },
1033
-
1034
- showClose: {
1035
- type: Boolean,
1036
- default: true
1037
- },
1038
-
1039
- width: String,
1040
-
1041
- fullscreen: Boolean,
1042
-
1043
- customClass: {
1044
- type: String,
1045
- default: ''
1046
- },
1047
-
1048
- top: {
1049
- type: String,
1050
- default: '15vh'
1051
- },
1052
- beforeClose: Function,
1053
- center: {
1054
- type: Boolean,
1055
- default: false
1056
- },
1057
-
1058
- destroyOnClose: Boolean
1059
- },
1060
-
1061
- data: function data() {
1062
- return {
1063
- closed: false,
1064
- key: 0
1065
- };
1066
- },
1067
-
1068
-
1069
- watch: {
1070
- visible: function visible(val) {
1071
- var _this = this;
1072
-
1073
- if (val) {
1074
- this.closed = false;
1075
- this.$emit('open');
1076
- this.$el.addEventListener('scroll', this.updatePopper);
1077
- this.$nextTick(function () {
1078
- _this.$refs.dialog.scrollTop = 0;
1079
- });
1080
- if (this.appendToBody) {
1081
- document.body.appendChild(this.$el);
1082
- }
1083
- } else {
1084
- this.$el.removeEventListener('scroll', this.updatePopper);
1085
- if (!this.closed) this.$emit('close');
1086
- if (this.destroyOnClose) {
1087
- this.$nextTick(function () {
1088
- _this.key++;
1089
- });
1090
- }
1091
- }
1092
- }
1093
- },
1094
-
1095
- computed: {
1096
- style: function style() {
1097
- var style = {};
1098
- if (!this.fullscreen) {
1099
- style.marginTop = this.top;
1100
- if (this.width) {
1101
- style.width = this.width;
1102
- }
1103
- }
1104
- return style;
1105
- }
1106
- },
1107
-
1108
- methods: {
1109
- getMigratingConfig: function getMigratingConfig() {
1110
- return {
1111
- props: {
1112
- 'size': 'size is removed.'
1113
- }
1114
- };
1115
- },
1116
- handleWrapperClick: function handleWrapperClick() {
1117
- if (!this.closeOnClickModal) return;
1118
- this.handleClose();
1119
- },
1120
- handleClose: function handleClose() {
1121
- if (typeof this.beforeClose === 'function') {
1122
- this.beforeClose(this.hide);
1123
- } else {
1124
- this.hide();
1125
- }
1126
- },
1127
- hide: function hide(cancel) {
1128
- if (cancel !== false) {
1129
- this.$emit('update:visible', false);
1130
- this.$emit('close');
1131
- this.closed = true;
1132
- }
1133
- },
1134
- updatePopper: function updatePopper() {
1135
- this.broadcast('ElSelectDropdown', 'updatePopper');
1136
- this.broadcast('ElDropdownMenu', 'updatePopper');
1137
- },
1138
- afterEnter: function afterEnter() {
1139
- this.$emit('opened');
1140
- },
1141
- afterLeave: function afterLeave() {
1142
- this.$emit('closed');
1143
- }
1144
- },
1145
-
1146
- mounted: function mounted() {
1147
- if (this.visible) {
1148
- this.rendered = true;
1149
- this.open();
1150
- if (this.appendToBody) {
1151
- document.body.appendChild(this.$el);
1152
- }
1153
- }
1154
- },
1155
- destroyed: function destroyed() {
1156
- // if appendToBody is true, remove DOM node after destroy
1157
- if (this.appendToBody && this.$el && this.$el.parentNode) {
1158
- this.$el.parentNode.removeChild(this.$el);
1159
- }
1160
- }
1161
- });
1162
- // CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=script&lang=js
1163
- /* harmony default export */ var src_componentvue_type_script_lang_js = (componentvue_type_script_lang_js);
1164
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1165
- var componentNormalizer = __webpack_require__(2);
1166
-
1167
- // CONCATENATED MODULE: ./packages/dialog/src/component.vue
1168
-
1169
-
1170
-
1171
-
1172
-
1173
- /* normalize component */
1174
-
1175
- var component = Object(componentNormalizer["a" /* default */])(
1176
- src_componentvue_type_script_lang_js,
1177
- render,
1178
- staticRenderFns,
1179
- false,
1180
- null,
1181
- null,
1182
- null
1183
-
1184
- )
1185
-
1186
- /* harmony default export */ var src_component = (component.exports);
1187
- // CONCATENATED MODULE: ./packages/dialog/index.js
1188
-
1189
-
1190
- /* istanbul ignore next */
1191
- src_component.install = function (Vue) {
1192
- Vue.component(src_component.name, src_component);
1193
- };
1194
-
1195
- /* harmony default export */ var dialog = __webpack_exports__["default"] = (src_component);
166
+ }
1196
167
 
1197
- /***/ }),
168
+ if (hook) {
169
+ if (options.functional) {
170
+ // for template-only hot-reload because in that case the render fn doesn't
171
+ // go through the normalizer
172
+ options._injectStyles = hook
173
+ // register for functional component in vue file
174
+ var originalRender = options.render
175
+ options.render = function renderWithStyleInjection(h, context) {
176
+ hook.call(context)
177
+ return originalRender(h, context)
178
+ }
179
+ } else {
180
+ // inject component registration as beforeCreate hook
181
+ var existing = options.beforeCreate
182
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
183
+ }
184
+ }
1198
185
 
1199
- /***/ 6:
1200
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
186
+ return {
187
+ exports: scriptExports,
188
+ options: options
189
+ }
190
+ }
1201
191
 
1202
- "use strict";
1203
- function _broadcast(componentName, eventName, params) {
1204
- this.$children.forEach(function (child) {
1205
- var name = child.$options.componentName;
1206
192
 
1207
- if (name === componentName) {
1208
- child.$emit.apply(child, [eventName].concat(params));
1209
- } else {
1210
- _broadcast.apply(child, [componentName, eventName].concat([params]));
1211
- }
1212
- });
1213
- }
1214
- /* harmony default export */ __webpack_exports__["a"] = ({
1215
- methods: {
1216
- dispatch: function dispatch(componentName, eventName, params) {
1217
- var parent = this.$parent || this.$root;
1218
- var name = parent.$options.componentName;
193
+ /***/ }),
1219
194
 
1220
- while (parent && (!name || name !== componentName)) {
1221
- parent = parent.$parent;
195
+ /***/ 54:
196
+ /***/ (function(module, exports) {
1222
197
 
1223
- if (parent) {
1224
- name = parent.$options.componentName;
1225
- }
1226
- }
1227
- if (parent) {
1228
- parent.$emit.apply(parent, [eventName].concat(params));
1229
- }
1230
- },
1231
- broadcast: function broadcast(componentName, eventName, params) {
1232
- _broadcast.call(this, componentName, eventName, params);
1233
- }
1234
- }
1235
- });
198
+ module.exports = require("element-ui/lib/dialog");
1236
199
 
1237
200
  /***/ }),
1238
201
 
1239
202
  /***/ 7:
1240
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1241
-
1242
- "use strict";
1243
- /* harmony default export */ __webpack_exports__["a"] = (function (target) {
1244
- for (var i = 1, j = arguments.length; i < j; i++) {
1245
- var source = arguments[i] || {};
1246
- for (var prop in source) {
1247
- if (source.hasOwnProperty(prop)) {
1248
- var value = source[prop];
1249
- if (value !== undefined) {
1250
- target[prop] = value;
1251
- }
1252
- }
1253
- }
1254
- }
203
+ /***/ (function(module, exports) {
1255
204
 
1256
- return target;
1257
- });;
205
+ module.exports = require("vue");
1258
206
 
1259
207
  /***/ }),
1260
208
 
1261
- /***/ 76:
209
+ /***/ 75:
1262
210
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1263
211
 
1264
212
  "use strict";
@@ -1370,11 +318,12 @@ render._withStripped = true
1370
318
 
1371
319
  // CONCATENATED MODULE: ./packages/tabDialog/src/main.vue?vue&type=template&id=da1baefa
1372
320
 
1373
- // EXTERNAL MODULE: ./packages/dialog/index.js + 5 modules
1374
- var dialog = __webpack_require__(53);
321
+ // EXTERNAL MODULE: external "element-ui/lib/dialog"
322
+ var dialog_ = __webpack_require__(54);
323
+ var dialog_default = /*#__PURE__*/__webpack_require__.n(dialog_);
1375
324
 
1376
325
  // EXTERNAL MODULE: external "vue"
1377
- var external_vue_ = __webpack_require__(0);
326
+ var external_vue_ = __webpack_require__(7);
1378
327
  var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
1379
328
 
1380
329
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabDialog/src/main.vue?vue&type=script&lang=js
@@ -1384,7 +333,7 @@ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
1384
333
 
1385
334
  /* harmony default export */ var mainvue_type_script_lang_js = ({
1386
335
  name: 'CyTabDialog',
1387
- component: [dialog["default"]],
336
+ component: [dialog_default.a],
1388
337
  props: {
1389
338
  // 是否显示 Dialog,支持 .sync 修饰符
1390
339
  visible: {
@@ -1608,7 +557,7 @@ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
1608
557
  // CONCATENATED MODULE: ./packages/tabDialog/src/main.vue?vue&type=script&lang=js
1609
558
  /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
1610
559
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1611
- var componentNormalizer = __webpack_require__(2);
560
+ var componentNormalizer = __webpack_require__(0);
1612
561
 
1613
562
  // CONCATENATED MODULE: ./packages/tabDialog/src/main.vue
1614
563
 
@@ -1784,481 +733,6 @@ main.install = function (Vue) {
1784
733
 
1785
734
  /* harmony default export */ var tabDialog = __webpack_exports__["default"] = (main);
1786
735
 
1787
- /***/ }),
1788
-
1789
- /***/ 8:
1790
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1791
-
1792
- "use strict";
1793
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1794
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1795
-
1796
-
1797
- var scrollBarWidth = void 0;
1798
-
1799
- /* harmony default export */ __webpack_exports__["a"] = (function () {
1800
- if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
1801
- if (scrollBarWidth !== undefined) return scrollBarWidth;
1802
-
1803
- var outer = document.createElement('div');
1804
- outer.className = 'el-scrollbar__wrap';
1805
- outer.style.visibility = 'hidden';
1806
- outer.style.width = '100px';
1807
- outer.style.position = 'absolute';
1808
- outer.style.top = '-9999px';
1809
- document.body.appendChild(outer);
1810
-
1811
- var widthNoScroll = outer.offsetWidth;
1812
- outer.style.overflow = 'scroll';
1813
-
1814
- var inner = document.createElement('div');
1815
- inner.style.width = '100%';
1816
- outer.appendChild(inner);
1817
-
1818
- var widthWithScroll = inner.offsetWidth;
1819
- outer.parentNode.removeChild(outer);
1820
- scrollBarWidth = widthNoScroll - widthWithScroll;
1821
-
1822
- return scrollBarWidth;
1823
- });;
1824
-
1825
- /***/ }),
1826
-
1827
- /***/ 9:
1828
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1829
-
1830
- "use strict";
1831
-
1832
- // EXPORTS
1833
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
1834
-
1835
- // EXTERNAL MODULE: external "vue"
1836
- var external_vue_ = __webpack_require__(0);
1837
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
1838
-
1839
- // EXTERNAL MODULE: ./src/utils/merge.js
1840
- var merge = __webpack_require__(7);
1841
-
1842
- // EXTERNAL MODULE: ./src/utils/dom.js
1843
- var utils_dom = __webpack_require__(1);
1844
-
1845
- // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
1846
-
1847
-
1848
-
1849
- var hasModal = false;
1850
- var hasInitZIndex = false;
1851
- var popup_manager_zIndex = void 0;
1852
-
1853
- var popup_manager_getModal = function getModal() {
1854
- if (external_vue_default.a.prototype.$isServer) return;
1855
- var modalDom = PopupManager.modalDom;
1856
- if (modalDom) {
1857
- hasModal = true;
1858
- } else {
1859
- hasModal = false;
1860
- modalDom = document.createElement('div');
1861
- PopupManager.modalDom = modalDom;
1862
-
1863
- modalDom.addEventListener('touchmove', function (event) {
1864
- event.preventDefault();
1865
- event.stopPropagation();
1866
- });
1867
-
1868
- modalDom.addEventListener('click', function () {
1869
- PopupManager.doOnModalClick && PopupManager.doOnModalClick();
1870
- });
1871
- }
1872
-
1873
- return modalDom;
1874
- };
1875
-
1876
- var instances = {};
1877
-
1878
- var PopupManager = {
1879
- modalFade: true,
1880
-
1881
- getInstance: function getInstance(id) {
1882
- return instances[id];
1883
- },
1884
-
1885
- register: function register(id, instance) {
1886
- if (id && instance) {
1887
- instances[id] = instance;
1888
- }
1889
- },
1890
-
1891
- deregister: function deregister(id) {
1892
- if (id) {
1893
- instances[id] = null;
1894
- delete instances[id];
1895
- }
1896
- },
1897
-
1898
- nextZIndex: function nextZIndex() {
1899
- return PopupManager.zIndex++;
1900
- },
1901
-
1902
- modalStack: [],
1903
-
1904
- doOnModalClick: function doOnModalClick() {
1905
- var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1906
- if (!topItem) return;
1907
-
1908
- var instance = PopupManager.getInstance(topItem.id);
1909
- if (instance && instance.closeOnClickModal) {
1910
- instance.close();
1911
- }
1912
- },
1913
-
1914
- openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
1915
- if (external_vue_default.a.prototype.$isServer) return;
1916
- if (!id || zIndex === undefined) return;
1917
- this.modalFade = modalFade;
1918
-
1919
- var modalStack = this.modalStack;
1920
-
1921
- for (var i = 0, j = modalStack.length; i < j; i++) {
1922
- var item = modalStack[i];
1923
- if (item.id === id) {
1924
- return;
1925
- }
1926
- }
1927
-
1928
- var modalDom = popup_manager_getModal();
1929
-
1930
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
1931
- if (this.modalFade && !hasModal) {
1932
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
1933
- }
1934
- if (modalClass) {
1935
- var classArr = modalClass.trim().split(/\s+/);
1936
- classArr.forEach(function (item) {
1937
- return Object(utils_dom["a" /* addClass */])(modalDom, item);
1938
- });
1939
- }
1940
- setTimeout(function () {
1941
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
1942
- }, 200);
1943
-
1944
- if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
1945
- dom.parentNode.appendChild(modalDom);
1946
- } else {
1947
- document.body.appendChild(modalDom);
1948
- }
1949
-
1950
- if (zIndex) {
1951
- modalDom.style.zIndex = zIndex;
1952
- }
1953
- modalDom.tabIndex = 0;
1954
- modalDom.style.display = '';
1955
-
1956
- this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
1957
- },
1958
-
1959
- closeModal: function closeModal(id) {
1960
- var modalStack = this.modalStack;
1961
- var modalDom = popup_manager_getModal();
1962
-
1963
- if (modalStack.length > 0) {
1964
- var topItem = modalStack[modalStack.length - 1];
1965
- if (topItem.id === id) {
1966
- if (topItem.modalClass) {
1967
- var classArr = topItem.modalClass.trim().split(/\s+/);
1968
- classArr.forEach(function (item) {
1969
- return Object(utils_dom["i" /* removeClass */])(modalDom, item);
1970
- });
1971
- }
1972
-
1973
- modalStack.pop();
1974
- if (modalStack.length > 0) {
1975
- modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
1976
- }
1977
- } else {
1978
- for (var i = modalStack.length - 1; i >= 0; i--) {
1979
- if (modalStack[i].id === id) {
1980
- modalStack.splice(i, 1);
1981
- break;
1982
- }
1983
- }
1984
- }
1985
- }
1986
-
1987
- if (modalStack.length === 0) {
1988
- if (this.modalFade) {
1989
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
1990
- }
1991
- setTimeout(function () {
1992
- if (modalStack.length === 0) {
1993
- if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
1994
- modalDom.style.display = 'none';
1995
- PopupManager.modalDom = undefined;
1996
- }
1997
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
1998
- }, 200);
1999
- }
2000
- }
2001
- };
2002
-
2003
- Object.defineProperty(PopupManager, 'zIndex', {
2004
- configurable: true,
2005
- get: function get() {
2006
- if (!hasInitZIndex) {
2007
- popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
2008
- hasInitZIndex = true;
2009
- }
2010
- return popup_manager_zIndex;
2011
- },
2012
- set: function set(value) {
2013
- popup_manager_zIndex = value;
2014
- }
2015
- });
2016
-
2017
- var popup_manager_getTopPopup = function getTopPopup() {
2018
- if (external_vue_default.a.prototype.$isServer) return;
2019
- if (PopupManager.modalStack.length > 0) {
2020
- var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
2021
- if (!topPopup) return;
2022
- var instance = PopupManager.getInstance(topPopup.id);
2023
-
2024
- return instance;
2025
- }
2026
- };
2027
-
2028
- if (!external_vue_default.a.prototype.$isServer) {
2029
- // handle `esc` key when the popup is shown
2030
- window.addEventListener('keydown', function (event) {
2031
- if (event.keyCode === 27) {
2032
- var topPopup = popup_manager_getTopPopup();
2033
-
2034
- if (topPopup && topPopup.closeOnPressEscape) {
2035
- topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
2036
- }
2037
- }
2038
- });
2039
- }
2040
-
2041
- /* harmony default export */ var popup_manager = (PopupManager);
2042
- // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
2043
- var scrollbar_width = __webpack_require__(8);
2044
-
2045
- // CONCATENATED MODULE: ./src/utils/popup/index.js
2046
-
2047
-
2048
-
2049
-
2050
-
2051
-
2052
- var idSeed = 1;
2053
-
2054
- var scrollBarWidth = void 0;
2055
-
2056
- /* harmony default export */ var popup = __webpack_exports__["b"] = ({
2057
- props: {
2058
- visible: {
2059
- type: Boolean,
2060
- default: false
2061
- },
2062
- openDelay: {},
2063
- closeDelay: {},
2064
- zIndex: {},
2065
- modal: {
2066
- type: Boolean,
2067
- default: false
2068
- },
2069
- modalFade: {
2070
- type: Boolean,
2071
- default: true
2072
- },
2073
- modalClass: {},
2074
- modalAppendToBody: {
2075
- type: Boolean,
2076
- default: false
2077
- },
2078
- lockScroll: {
2079
- type: Boolean,
2080
- default: true
2081
- },
2082
- closeOnPressEscape: {
2083
- type: Boolean,
2084
- default: false
2085
- },
2086
- closeOnClickModal: {
2087
- type: Boolean,
2088
- default: false
2089
- }
2090
- },
2091
-
2092
- beforeMount: function beforeMount() {
2093
- this._popupId = 'popup-' + idSeed++;
2094
- popup_manager.register(this._popupId, this);
2095
- },
2096
- beforeDestroy: function beforeDestroy() {
2097
- popup_manager.deregister(this._popupId);
2098
- popup_manager.closeModal(this._popupId);
2099
-
2100
- this.restoreBodyStyle();
2101
- },
2102
- data: function data() {
2103
- return {
2104
- opened: false,
2105
- bodyPaddingRight: null,
2106
- computedBodyPaddingRight: 0,
2107
- withoutHiddenClass: true,
2108
- rendered: false
2109
- };
2110
- },
2111
-
2112
-
2113
- watch: {
2114
- visible: function visible(val) {
2115
- var _this = this;
2116
-
2117
- if (val) {
2118
- if (this._opening) return;
2119
- if (!this.rendered) {
2120
- this.rendered = true;
2121
- external_vue_default.a.nextTick(function () {
2122
- _this.open();
2123
- });
2124
- } else {
2125
- this.open();
2126
- }
2127
- } else {
2128
- this.close();
2129
- }
2130
- }
2131
- },
2132
-
2133
- methods: {
2134
- open: function open(options) {
2135
- var _this2 = this;
2136
-
2137
- if (!this.rendered) {
2138
- this.rendered = true;
2139
- }
2140
-
2141
- var props = Object(merge["a" /* default */])({}, this.$props || this, options);
2142
-
2143
- if (this._closeTimer) {
2144
- clearTimeout(this._closeTimer);
2145
- this._closeTimer = null;
2146
- }
2147
- clearTimeout(this._openTimer);
2148
-
2149
- var openDelay = Number(props.openDelay);
2150
- if (openDelay > 0) {
2151
- this._openTimer = setTimeout(function () {
2152
- _this2._openTimer = null;
2153
- _this2.doOpen(props);
2154
- }, openDelay);
2155
- } else {
2156
- this.doOpen(props);
2157
- }
2158
- },
2159
- doOpen: function doOpen(props) {
2160
- if (this.$isServer) return;
2161
- if (this.willOpen && !this.willOpen()) return;
2162
- if (this.opened) return;
2163
-
2164
- this._opening = true;
2165
-
2166
- var dom = this.$el;
2167
-
2168
- var modal = props.modal;
2169
-
2170
- var zIndex = props.zIndex;
2171
- if (zIndex) {
2172
- popup_manager.zIndex = zIndex;
2173
- }
2174
-
2175
- if (modal) {
2176
- if (this._closing) {
2177
- popup_manager.closeModal(this._popupId);
2178
- this._closing = false;
2179
- }
2180
- popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
2181
- if (props.lockScroll) {
2182
- this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
2183
- if (this.withoutHiddenClass) {
2184
- this.bodyPaddingRight = document.body.style.paddingRight;
2185
- this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
2186
- }
2187
- scrollBarWidth = Object(scrollbar_width["a" /* default */])();
2188
- var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
2189
- var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
2190
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
2191
- document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
2192
- }
2193
- Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
2194
- }
2195
- }
2196
-
2197
- if (getComputedStyle(dom).position === 'static') {
2198
- dom.style.position = 'absolute';
2199
- }
2200
-
2201
- dom.style.zIndex = popup_manager.nextZIndex();
2202
- this.opened = true;
2203
-
2204
- this.onOpen && this.onOpen();
2205
-
2206
- this.doAfterOpen();
2207
- },
2208
- doAfterOpen: function doAfterOpen() {
2209
- this._opening = false;
2210
- },
2211
- close: function close() {
2212
- var _this3 = this;
2213
-
2214
- if (this.willClose && !this.willClose()) return;
2215
-
2216
- if (this._openTimer !== null) {
2217
- clearTimeout(this._openTimer);
2218
- this._openTimer = null;
2219
- }
2220
- clearTimeout(this._closeTimer);
2221
-
2222
- var closeDelay = Number(this.closeDelay);
2223
-
2224
- if (closeDelay > 0) {
2225
- this._closeTimer = setTimeout(function () {
2226
- _this3._closeTimer = null;
2227
- _this3.doClose();
2228
- }, closeDelay);
2229
- } else {
2230
- this.doClose();
2231
- }
2232
- },
2233
- doClose: function doClose() {
2234
- this._closing = true;
2235
-
2236
- this.onClose && this.onClose();
2237
-
2238
- if (this.lockScroll) {
2239
- setTimeout(this.restoreBodyStyle, 200);
2240
- }
2241
-
2242
- this.opened = false;
2243
-
2244
- this.doAfterClose();
2245
- },
2246
- doAfterClose: function doAfterClose() {
2247
- popup_manager.closeModal(this._popupId);
2248
- this._closing = false;
2249
- },
2250
- restoreBodyStyle: function restoreBodyStyle() {
2251
- if (this.modal && this.withoutHiddenClass) {
2252
- document.body.style.paddingRight = this.bodyPaddingRight;
2253
- Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
2254
- }
2255
- this.withoutHiddenClass = true;
2256
- }
2257
- }
2258
- });
2259
-
2260
-
2261
-
2262
736
  /***/ })
2263
737
 
2264
738
  /******/ });