1 | module.exports =
|
2 | (function(modules) {
|
3 |
|
4 | var installedModules = {};
|
5 |
|
6 |
|
7 | function __webpack_require__(moduleId) {
|
8 |
|
9 |
|
10 | if(installedModules[moduleId]) {
|
11 | return installedModules[moduleId].exports;
|
12 | }
|
13 |
|
14 | var module = installedModules[moduleId] = {
|
15 | i: moduleId,
|
16 | l: false,
|
17 | exports: {}
|
18 | };
|
19 |
|
20 |
|
21 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22 |
|
23 |
|
24 | module.l = true;
|
25 |
|
26 |
|
27 | return module.exports;
|
28 | }
|
29 |
|
30 |
|
31 |
|
32 | __webpack_require__.m = modules;
|
33 |
|
34 |
|
35 | __webpack_require__.c = installedModules;
|
36 |
|
37 |
|
38 | __webpack_require__.d = function(exports, name, getter) {
|
39 | if(!__webpack_require__.o(exports, name)) {
|
40 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
41 | }
|
42 | };
|
43 |
|
44 |
|
45 | __webpack_require__.r = function(exports) {
|
46 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
47 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
48 | }
|
49 | Object.defineProperty(exports, '__esModule', { value: true });
|
50 | };
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | __webpack_require__.t = function(value, mode) {
|
58 | if(mode & 1) value = __webpack_require__(value);
|
59 | if(mode & 8) return value;
|
60 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
61 | var ns = Object.create(null);
|
62 | __webpack_require__.r(ns);
|
63 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
64 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
65 | return ns;
|
66 | };
|
67 |
|
68 |
|
69 | __webpack_require__.n = function(module) {
|
70 | var getter = module && module.__esModule ?
|
71 | function getDefault() { return module['default']; } :
|
72 | function getModuleExports() { return module; };
|
73 | __webpack_require__.d(getter, 'a', getter);
|
74 | return getter;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
79 |
|
80 |
|
81 | __webpack_require__.p = "/dist/";
|
82 |
|
83 |
|
84 |
|
85 | return __webpack_require__(__webpack_require__.s = 79);
|
86 | })
|
87 |
|
88 | ({
|
89 |
|
90 | 0:
|
91 | (function(module, __webpack_exports__, __webpack_require__) {
|
92 |
|
93 | "use strict";
|
94 | __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 | function normalizeComponent (
|
102 | scriptExports,
|
103 | render,
|
104 | staticRenderFns,
|
105 | functionalTemplate,
|
106 | injectStyles,
|
107 | scopeId,
|
108 | moduleIdentifier, /* server only */
|
109 | shadowMode /* vue-cli only */
|
110 | ) {
|
111 |
|
112 | var options = typeof scriptExports === 'function'
|
113 | ? scriptExports.options
|
114 | : scriptExports
|
115 |
|
116 |
|
117 | if (render) {
|
118 | options.render = render
|
119 | options.staticRenderFns = staticRenderFns
|
120 | options._compiled = true
|
121 | }
|
122 |
|
123 |
|
124 | if (functionalTemplate) {
|
125 | options.functional = true
|
126 | }
|
127 |
|
128 |
|
129 | if (scopeId) {
|
130 | options._scopeId = 'data-v-' + scopeId
|
131 | }
|
132 |
|
133 | var hook
|
134 | if (moduleIdentifier) {
|
135 | hook = function (context) {
|
136 |
|
137 | context =
|
138 | context ||
|
139 | (this.$vnode && this.$vnode.ssrContext) ||
|
140 | (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext)
|
141 |
|
142 | if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
143 | context = __VUE_SSR_CONTEXT__
|
144 | }
|
145 |
|
146 | if (injectStyles) {
|
147 | injectStyles.call(this, context)
|
148 | }
|
149 |
|
150 | if (context && context._registeredComponents) {
|
151 | context._registeredComponents.add(moduleIdentifier)
|
152 | }
|
153 | }
|
154 |
|
155 |
|
156 | options._ssrRegister = hook
|
157 | } else if (injectStyles) {
|
158 | hook = shadowMode
|
159 | ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
160 | : injectStyles
|
161 | }
|
162 |
|
163 | if (hook) {
|
164 | if (options.functional) {
|
165 |
|
166 |
|
167 | options._injectStyles = hook
|
168 |
|
169 | var originalRender = options.render
|
170 | options.render = function renderWithStyleInjection (h, context) {
|
171 | hook.call(context)
|
172 | return originalRender(h, context)
|
173 | }
|
174 | } else {
|
175 |
|
176 | var existing = options.beforeCreate
|
177 | options.beforeCreate = existing
|
178 | ? [].concat(existing, hook)
|
179 | : [hook]
|
180 | }
|
181 | }
|
182 |
|
183 | return {
|
184 | exports: scriptExports,
|
185 | options: options
|
186 | }
|
187 | }
|
188 |
|
189 |
|
190 | }),
|
191 |
|
192 | 11:
|
193 | (function(module, exports) {
|
194 |
|
195 | module.exports = require("element-ui/lib/mixins/migrating");
|
196 |
|
197 | }),
|
198 |
|
199 | 16:
|
200 | (function(module, exports) {
|
201 |
|
202 | module.exports = require("element-ui/lib/utils/popup");
|
203 |
|
204 | }),
|
205 |
|
206 | 4:
|
207 | (function(module, exports) {
|
208 |
|
209 | module.exports = require("element-ui/lib/mixins/emitter");
|
210 |
|
211 | }),
|
212 |
|
213 | 79:
|
214 | (function(module, __webpack_exports__, __webpack_require__) {
|
215 |
|
216 | "use strict";
|
217 | __webpack_require__.r(__webpack_exports__);
|
218 |
|
219 |
|
220 | var render = function() {
|
221 | var _vm = this
|
222 | var _h = _vm.$createElement
|
223 | var _c = _vm._self._c || _h
|
224 | return _c(
|
225 | "transition",
|
226 | {
|
227 | attrs: { name: "dialog-fade" },
|
228 | on: { "after-enter": _vm.afterEnter, "after-leave": _vm.afterLeave }
|
229 | },
|
230 | [
|
231 | _c(
|
232 | "div",
|
233 | {
|
234 | directives: [
|
235 | {
|
236 | name: "show",
|
237 | rawName: "v-show",
|
238 | value: _vm.visible,
|
239 | expression: "visible"
|
240 | }
|
241 | ],
|
242 | staticClass: "el-dialog__wrapper",
|
243 | on: {
|
244 | click: function($event) {
|
245 | if ($event.target !== $event.currentTarget) {
|
246 | return null
|
247 | }
|
248 | return _vm.handleWrapperClick($event)
|
249 | }
|
250 | }
|
251 | },
|
252 | [
|
253 | _c(
|
254 | "div",
|
255 | {
|
256 | ref: "dialog",
|
257 | staticClass: "el-dialog",
|
258 | class: [
|
259 | {
|
260 | "is-fullscreen": _vm.fullscreen,
|
261 | "el-dialog--center": _vm.center
|
262 | },
|
263 | _vm.customClass
|
264 | ],
|
265 | style: _vm.style,
|
266 | attrs: {
|
267 | role: "dialog",
|
268 | "aria-modal": "true",
|
269 | "aria-label": _vm.title || "dialog"
|
270 | }
|
271 | },
|
272 | [
|
273 | _c(
|
274 | "div",
|
275 | { staticClass: "el-dialog__header" },
|
276 | [
|
277 | _vm._t("title", [
|
278 | _c("span", { staticClass: "el-dialog__title" }, [
|
279 | _vm._v(_vm._s(_vm.title))
|
280 | ])
|
281 | ]),
|
282 | _vm.showClose
|
283 | ? _c(
|
284 | "button",
|
285 | {
|
286 | staticClass: "el-dialog__headerbtn",
|
287 | attrs: { type: "button", "aria-label": "Close" },
|
288 | on: { click: _vm.handleClose }
|
289 | },
|
290 | [
|
291 | _c("i", {
|
292 | staticClass:
|
293 | "el-dialog__close el-icon el-icon-close"
|
294 | })
|
295 | ]
|
296 | )
|
297 | : _vm._e()
|
298 | ],
|
299 | 2
|
300 | ),
|
301 | _vm.rendered
|
302 | ? _c(
|
303 | "div",
|
304 | { staticClass: "el-dialog__body" },
|
305 | [_vm._t("default")],
|
306 | 2
|
307 | )
|
308 | : _vm._e(),
|
309 | _vm.$slots.footer
|
310 | ? _c(
|
311 | "div",
|
312 | { staticClass: "el-dialog__footer" },
|
313 | [_vm._t("footer")],
|
314 | 2
|
315 | )
|
316 | : _vm._e()
|
317 | ]
|
318 | )
|
319 | ]
|
320 | )
|
321 | ]
|
322 | )
|
323 | }
|
324 | var staticRenderFns = []
|
325 | render._withStripped = true
|
326 |
|
327 |
|
328 |
|
329 |
|
330 |
|
331 | var popup_ = __webpack_require__(16);
|
332 | var popup_default = __webpack_require__.n(popup_);
|
333 |
|
334 |
|
335 | var migrating_ = __webpack_require__(11);
|
336 | var migrating_default = __webpack_require__.n(migrating_);
|
337 |
|
338 |
|
339 | var emitter_ = __webpack_require__(4);
|
340 | var emitter_default = __webpack_require__.n(emitter_);
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 |
|
373 |
|
374 |
|
375 |
|
376 |
|
377 |
|
378 |
|
379 |
|
380 |
|
381 |
|
382 |
|
383 |
|
384 | var componentvue_type_script_lang_js_ = ({
|
385 | name: 'ElDialog',
|
386 |
|
387 | mixins: [popup_default.a, emitter_default.a, migrating_default.a],
|
388 |
|
389 | props: {
|
390 | title: {
|
391 | type: String,
|
392 | default: ''
|
393 | },
|
394 |
|
395 | modal: {
|
396 | type: Boolean,
|
397 | default: true
|
398 | },
|
399 |
|
400 | modalAppendToBody: {
|
401 | type: Boolean,
|
402 | default: true
|
403 | },
|
404 |
|
405 | appendToBody: {
|
406 | type: Boolean,
|
407 | default: false
|
408 | },
|
409 |
|
410 | lockScroll: {
|
411 | type: Boolean,
|
412 | default: true
|
413 | },
|
414 |
|
415 | closeOnClickModal: {
|
416 | type: Boolean,
|
417 | default: true
|
418 | },
|
419 |
|
420 | closeOnPressEscape: {
|
421 | type: Boolean,
|
422 | default: true
|
423 | },
|
424 |
|
425 | showClose: {
|
426 | type: Boolean,
|
427 | default: true
|
428 | },
|
429 |
|
430 | width: String,
|
431 |
|
432 | fullscreen: Boolean,
|
433 |
|
434 | customClass: {
|
435 | type: String,
|
436 | default: ''
|
437 | },
|
438 |
|
439 | top: {
|
440 | type: String,
|
441 | default: '15vh'
|
442 | },
|
443 | beforeClose: Function,
|
444 | center: {
|
445 | type: Boolean,
|
446 | default: false
|
447 | }
|
448 | },
|
449 |
|
450 | data: function data() {
|
451 | return {
|
452 | closed: false
|
453 | };
|
454 | },
|
455 |
|
456 |
|
457 | watch: {
|
458 | visible: function visible(val) {
|
459 | var _this = this;
|
460 |
|
461 | if (val) {
|
462 | this.closed = false;
|
463 | this.$emit('open');
|
464 | this.$el.addEventListener('scroll', this.updatePopper);
|
465 | this.$nextTick(function () {
|
466 | _this.$refs.dialog.scrollTop = 0;
|
467 | });
|
468 | if (this.appendToBody) {
|
469 | document.body.appendChild(this.$el);
|
470 | }
|
471 | } else {
|
472 | this.$el.removeEventListener('scroll', this.updatePopper);
|
473 | if (!this.closed) this.$emit('close');
|
474 | }
|
475 | }
|
476 | },
|
477 |
|
478 | computed: {
|
479 | style: function style() {
|
480 | var style = {};
|
481 | if (!this.fullscreen) {
|
482 | style.marginTop = this.top;
|
483 | if (this.width) {
|
484 | style.width = this.width;
|
485 | }
|
486 | }
|
487 | return style;
|
488 | }
|
489 | },
|
490 |
|
491 | methods: {
|
492 | getMigratingConfig: function getMigratingConfig() {
|
493 | return {
|
494 | props: {
|
495 | 'size': 'size is removed.'
|
496 | }
|
497 | };
|
498 | },
|
499 | handleWrapperClick: function handleWrapperClick() {
|
500 | if (!this.closeOnClickModal) return;
|
501 | this.handleClose();
|
502 | },
|
503 | handleClose: function handleClose() {
|
504 | if (typeof this.beforeClose === 'function') {
|
505 | this.beforeClose(this.hide);
|
506 | } else {
|
507 | this.hide();
|
508 | }
|
509 | },
|
510 | hide: function hide(cancel) {
|
511 | if (cancel !== false) {
|
512 | this.$emit('update:visible', false);
|
513 | this.$emit('close');
|
514 | this.closed = true;
|
515 | }
|
516 | },
|
517 | updatePopper: function updatePopper() {
|
518 | this.broadcast('ElSelectDropdown', 'updatePopper');
|
519 | this.broadcast('ElDropdownMenu', 'updatePopper');
|
520 | },
|
521 | afterEnter: function afterEnter() {
|
522 | this.$emit('opened');
|
523 | },
|
524 | afterLeave: function afterLeave() {
|
525 | this.$emit('closed');
|
526 | }
|
527 | },
|
528 |
|
529 | mounted: function mounted() {
|
530 | if (this.visible) {
|
531 | this.rendered = true;
|
532 | this.open();
|
533 | if (this.appendToBody) {
|
534 | document.body.appendChild(this.$el);
|
535 | }
|
536 | }
|
537 | },
|
538 | destroyed: function destroyed() {
|
539 |
|
540 | if (this.appendToBody && this.$el && this.$el.parentNode) {
|
541 | this.$el.parentNode.removeChild(this.$el);
|
542 | }
|
543 | }
|
544 | });
|
545 |
|
546 | var src_componentvue_type_script_lang_js_ = (componentvue_type_script_lang_js_);
|
547 |
|
548 | var componentNormalizer = __webpack_require__(0);
|
549 |
|
550 |
|
551 |
|
552 |
|
553 |
|
554 |
|
555 |
|
556 |
|
557 |
|
558 | var component = Object(componentNormalizer["a" ])(
|
559 | src_componentvue_type_script_lang_js_,
|
560 | render,
|
561 | staticRenderFns,
|
562 | false,
|
563 | null,
|
564 | null,
|
565 | null
|
566 |
|
567 | )
|
568 |
|
569 |
|
570 | if (false) { var api; }
|
571 | component.options.__file = "packages/dialog/src/component.vue"
|
572 | var src_component = (component.exports);
|
573 |
|
574 |
|
575 |
|
576 |
|
577 | src_component.install = function (Vue) {
|
578 | Vue.component(src_component.name, src_component);
|
579 | };
|
580 |
|
581 | var dialog = __webpack_exports__["default"] = (src_component);
|
582 |
|
583 | })
|
584 |
|
585 | }); |
\ | No newline at end of file |