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.
- package/README.md +1 -1
- package/lib/alert.js +4 -4
- package/lib/aside.js +77 -77
- package/lib/autocomplete.js +159 -3940
- package/lib/avatar.js +108 -108
- package/lib/backtop.js +110 -110
- package/lib/badge.js +108 -108
- package/lib/breadcrumb-item.js +4 -4
- package/lib/breadcrumb.js +4 -4
- package/lib/button-group.js +4 -4
- package/lib/button.js +4 -4
- package/lib/calendar.js +46 -1545
- package/lib/card.js +96 -96
- package/lib/carousel-item.js +108 -452
- package/lib/carousel.js +116 -185
- package/lib/cascader-panel.js +187 -2270
- package/lib/cascader.js +275 -6452
- package/lib/checkbox-button.js +11 -43
- package/lib/checkbox-group.js +15 -47
- package/lib/checkbox.js +15 -47
- package/lib/col.js +2 -2
- package/lib/collapse-item.js +110 -815
- package/lib/collapse.js +108 -108
- package/lib/color-picker.js +153 -3953
- package/lib/container.js +88 -88
- package/lib/date-picker.js +419 -5230
- package/lib/descriptions-item.js +2 -2
- package/lib/descriptions.js +8 -63
- package/lib/dialog.js +22 -1200
- package/lib/divider.js +104 -104
- package/lib/drawer.js +105 -875
- package/lib/dropdown-item.js +11 -43
- package/lib/dropdown-menu.js +75 -2277
- package/lib/dropdown.js +136 -1072
- package/lib/element-ui.common.js +29785 -42723
- package/lib/empty.js +7 -603
- package/lib/fileUpload.js +109 -2477
- package/lib/footer.js +77 -77
- package/lib/form-item.js +28 -418
- package/lib/form.js +15 -29
- package/lib/header.js +77 -77
- package/lib/icon.js +4 -4
- package/lib/image.js +49 -1376
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +21 -311
- package/lib/input-number.js +33 -1422
- package/lib/input.js +37 -507
- package/lib/link.js +4 -4
- package/lib/loading.js +67 -804
- package/lib/main.js +64 -64
- package/lib/menu-item-group.js +4 -4
- package/lib/menu-item.js +61 -2945
- package/lib/menu.js +54 -745
- package/lib/message-box.js +80 -2537
- package/lib/message.js +24 -1102
- package/lib/notification.js +25 -1102
- package/lib/option-group.js +11 -43
- package/lib/option.js +18 -394
- package/lib/page-header.js +87 -683
- package/lib/pagination.js +139 -6078
- package/lib/popconfirm.js +219 -3508
- package/lib/popover.js +99 -2624
- package/lib/progress.js +4 -4
- package/lib/radio-button.js +11 -43
- package/lib/radio-group.js +11 -43
- package/lib/radio.js +15 -47
- package/lib/rate.js +113 -756
- package/lib/result.js +4 -4
- package/lib/row.js +2 -2
- package/lib/scrollbar.js +50 -735
- package/lib/select.js +209 -4352
- package/lib/selectDisplayInput.js +108 -108
- package/lib/skeleton-item.js +2 -2
- package/lib/skeleton.js +108 -108
- package/lib/slider.js +120 -4266
- package/lib/spinner.js +4 -4
- package/lib/statistic.js +117 -9605
- package/lib/step.js +108 -108
- package/lib/steps.js +99 -514
- package/lib/subTitle.js +91 -91
- package/lib/submenu.js +121 -2442
- package/lib/switch.js +21 -476
- package/lib/tab-pane.js +4 -4
- package/lib/tabDialog.js +37 -1563
- package/lib/table-column.js +32 -880
- package/lib/table.js +424 -4467
- package/lib/tabs.js +12 -425
- package/lib/tag.js +4 -4
- package/lib/theme-chalk/README.md +33 -0
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/gulpfile.js +27 -0
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/package.json +35 -0
- package/lib/theme-chalk/src/alert.scss +147 -0
- package/lib/theme-chalk/src/aside.scss +7 -0
- package/lib/theme-chalk/src/autocomplete.scss +80 -0
- package/lib/theme-chalk/src/avatar.scss +51 -0
- package/lib/theme-chalk/src/backtop.scss +22 -0
- package/lib/theme-chalk/src/badge.scss +57 -0
- package/lib/theme-chalk/src/base.scss +2 -0
- package/lib/theme-chalk/src/breadcrumb.scss +55 -0
- package/lib/theme-chalk/src/button.scss +262 -0
- package/lib/theme-chalk/src/calendar.scss +79 -0
- package/lib/theme-chalk/src/card.scss +32 -0
- package/lib/theme-chalk/src/carousel-item.scss +50 -0
- package/lib/theme-chalk/src/carousel.scss +161 -0
- package/lib/theme-chalk/src/cascader-panel.scss +120 -0
- package/lib/theme-chalk/src/cascader.scss +182 -0
- package/lib/theme-chalk/src/checkbox.scss +359 -0
- package/lib/theme-chalk/src/col.scss +156 -0
- package/lib/theme-chalk/src/collapse.scss +63 -0
- package/lib/theme-chalk/src/color-picker.scss +384 -0
- package/lib/theme-chalk/src/common/popup.scss +42 -0
- package/lib/theme-chalk/src/common/transition.scss +99 -0
- package/lib/theme-chalk/src/common/var.scss +1028 -0
- package/lib/theme-chalk/src/container.scss +14 -0
- package/lib/theme-chalk/src/date-picker/date-picker.scss +97 -0
- package/lib/theme-chalk/src/date-picker/date-range-picker.scss +101 -0
- package/lib/theme-chalk/src/date-picker/date-table.scss +151 -0
- package/lib/theme-chalk/src/date-picker/month-table.scss +82 -0
- package/lib/theme-chalk/src/date-picker/picker-panel.scss +117 -0
- package/lib/theme-chalk/src/date-picker/picker.scss +197 -0
- package/lib/theme-chalk/src/date-picker/time-picker.scss +85 -0
- package/lib/theme-chalk/src/date-picker/time-range-picker.scss +31 -0
- package/lib/theme-chalk/src/date-picker/time-spinner.scss +110 -0
- package/lib/theme-chalk/src/date-picker/year-table.scss +51 -0
- package/lib/theme-chalk/src/date-picker.scss +12 -0
- package/lib/theme-chalk/src/descriptions-item.scss +42 -0
- package/lib/theme-chalk/src/descriptions.scss +111 -0
- package/lib/theme-chalk/src/dialog.scss +123 -0
- package/lib/theme-chalk/src/display.scss +12 -0
- package/lib/theme-chalk/src/divider.scss +47 -0
- package/lib/theme-chalk/src/drawer.scss +219 -0
- package/lib/theme-chalk/src/dropdown.scss +182 -0
- package/lib/theme-chalk/src/empty.scss +45 -0
- package/lib/theme-chalk/src/footer.scss +8 -0
- package/lib/theme-chalk/src/form.scss +167 -0
- package/lib/theme-chalk/src/header.scss +8 -0
- package/lib/theme-chalk/src/icon.scss +1167 -0
- package/lib/theme-chalk/src/image.scss +179 -0
- package/lib/theme-chalk/src/index.scss +90 -0
- package/lib/theme-chalk/src/input-number.scss +180 -0
- package/lib/theme-chalk/src/input.scss +360 -0
- package/lib/theme-chalk/src/link.scss +81 -0
- package/lib/theme-chalk/src/loading.scss +96 -0
- package/lib/theme-chalk/src/main.scss +12 -0
- package/lib/theme-chalk/src/menu.scss +289 -0
- package/lib/theme-chalk/src/message-box.scss +226 -0
- package/lib/theme-chalk/src/message.scss +120 -0
- package/lib/theme-chalk/src/mixins/_button.scss +81 -0
- package/lib/theme-chalk/src/mixins/config.scss +4 -0
- package/lib/theme-chalk/src/mixins/function.scss +44 -0
- package/lib/theme-chalk/src/mixins/mixins.scss +190 -0
- package/lib/theme-chalk/src/mixins/utils.scss +39 -0
- package/lib/theme-chalk/src/notification.scss +99 -0
- package/lib/theme-chalk/src/option-group.scss +42 -0
- package/lib/theme-chalk/src/option.scss +36 -0
- package/lib/theme-chalk/src/page-header.scss +41 -0
- package/lib/theme-chalk/src/pagination.scss +295 -0
- package/lib/theme-chalk/src/popconfirm.scss +16 -0
- package/lib/theme-chalk/src/popover.scss +40 -0
- package/lib/theme-chalk/src/popper.scss +101 -0
- package/lib/theme-chalk/src/progress.scss +141 -0
- package/lib/theme-chalk/src/radio-button.scss +113 -0
- package/lib/theme-chalk/src/radio-group.scss +9 -0
- package/lib/theme-chalk/src/radio.scss +199 -0
- package/lib/theme-chalk/src/rate.scss +49 -0
- package/lib/theme-chalk/src/reset.scss +79 -0
- package/lib/theme-chalk/src/result.scss +61 -0
- package/lib/theme-chalk/src/row.scss +43 -0
- package/lib/theme-chalk/src/scrollbar.scss +72 -0
- package/lib/theme-chalk/src/select-dropdown.scss +62 -0
- package/lib/theme-chalk/src/select.scss +152 -0
- package/lib/theme-chalk/src/skeleton-item.scss +84 -0
- package/lib/theme-chalk/src/skeleton.scss +40 -0
- package/lib/theme-chalk/src/slider.scss +250 -0
- package/lib/theme-chalk/src/spinner.scss +44 -0
- package/lib/theme-chalk/src/statistic.scss +38 -0
- package/lib/theme-chalk/src/step.scss +317 -0
- package/lib/theme-chalk/src/steps.scss +20 -0
- package/lib/theme-chalk/src/switch.scss +116 -0
- package/lib/theme-chalk/src/table-column.scss +97 -0
- package/lib/theme-chalk/src/table.scss +564 -0
- package/lib/theme-chalk/src/tabs.scss +602 -0
- package/lib/theme-chalk/src/tag.scss +163 -0
- package/lib/theme-chalk/src/time-picker.scss +8 -0
- package/lib/theme-chalk/src/time-select.scss +37 -0
- package/lib/theme-chalk/src/timeline-item.scss +86 -0
- package/lib/theme-chalk/src/timeline.scss +14 -0
- package/lib/theme-chalk/src/tooltip.scss +141 -0
- package/lib/theme-chalk/src/transfer.scss +227 -0
- package/lib/theme-chalk/src/tree.scss +123 -0
- package/lib/theme-chalk/src/upload.scss +603 -0
- package/lib/time-picker.js +285 -5013
- package/lib/time-select.js +181 -4949
- package/lib/timeline-item.js +108 -108
- package/lib/timeline.js +82 -82
- package/lib/tooltip.js +41 -2566
- package/lib/transfer.js +142 -2136
- package/lib/tree.js +55 -1372
- package/lib/treeSelect.js +106 -3421
- package/lib/upload.js +28 -1047
- package/package.json +3 -3
- package/packages/theme-chalk/gulpfile.js +1 -14
- package/packages/theme-chalk/src/common/var.scss +16 -16
- package/packages/theme-cy/gulpfile.js +1 -14
- package/src/index.js +1 -1
- package/lib/theme-chalk/alert.css +0 -1
- package/lib/theme-chalk/aside.css +0 -1
- package/lib/theme-chalk/autocomplete.css +0 -1
- package/lib/theme-chalk/avatar.css +0 -1
- package/lib/theme-chalk/backtop.css +0 -1
- package/lib/theme-chalk/badge.css +0 -1
- package/lib/theme-chalk/breadcrumb.css +0 -1
- package/lib/theme-chalk/button.css +0 -1
- package/lib/theme-chalk/calendar.css +0 -1
- package/lib/theme-chalk/card.css +0 -1
- package/lib/theme-chalk/carousel-item.css +0 -1
- package/lib/theme-chalk/carousel.css +0 -1
- package/lib/theme-chalk/cascader-panel.css +0 -1
- package/lib/theme-chalk/cascader.css +0 -1
- package/lib/theme-chalk/checkbox.css +0 -1
- package/lib/theme-chalk/col.css +0 -1
- package/lib/theme-chalk/collapse.css +0 -1
- package/lib/theme-chalk/color-picker.css +0 -1
- package/lib/theme-chalk/container.css +0 -1
- package/lib/theme-chalk/date-picker.css +0 -1
- package/lib/theme-chalk/descriptions-item.css +0 -1
- package/lib/theme-chalk/descriptions.css +0 -1
- package/lib/theme-chalk/dialog.css +0 -1
- package/lib/theme-chalk/display.css +0 -1
- package/lib/theme-chalk/divider.css +0 -1
- package/lib/theme-chalk/drawer.css +0 -1
- package/lib/theme-chalk/dropdown.css +0 -1
- package/lib/theme-chalk/empty.css +0 -1
- package/lib/theme-chalk/footer.css +0 -1
- package/lib/theme-chalk/form.css +0 -1
- package/lib/theme-chalk/header.css +0 -1
- package/lib/theme-chalk/icon.css +0 -1
- package/lib/theme-chalk/image.css +0 -1
- package/lib/theme-chalk/input-number.css +0 -1
- package/lib/theme-chalk/input.css +0 -1
- package/lib/theme-chalk/link.css +0 -1
- package/lib/theme-chalk/loading.css +0 -1
- package/lib/theme-chalk/main.css +0 -1
- package/lib/theme-chalk/menu.css +0 -1
- package/lib/theme-chalk/message-box.css +0 -1
- package/lib/theme-chalk/message.css +0 -1
- package/lib/theme-chalk/notification.css +0 -1
- package/lib/theme-chalk/option-group.css +0 -1
- package/lib/theme-chalk/option.css +0 -1
- package/lib/theme-chalk/page-header.css +0 -1
- package/lib/theme-chalk/pagination.css +0 -1
- package/lib/theme-chalk/popconfirm.css +0 -1
- package/lib/theme-chalk/popover.css +0 -1
- package/lib/theme-chalk/popper.css +0 -1
- package/lib/theme-chalk/progress.css +0 -1
- package/lib/theme-chalk/radio-button.css +0 -1
- package/lib/theme-chalk/radio-group.css +0 -1
- package/lib/theme-chalk/radio.css +0 -1
- package/lib/theme-chalk/rate.css +0 -1
- package/lib/theme-chalk/reset.css +0 -1
- package/lib/theme-chalk/result.css +0 -1
- package/lib/theme-chalk/row.css +0 -1
- package/lib/theme-chalk/scrollbar.css +0 -1
- package/lib/theme-chalk/select-dropdown.css +0 -1
- package/lib/theme-chalk/select.css +0 -1
- package/lib/theme-chalk/skeleton-item.css +0 -1
- package/lib/theme-chalk/skeleton.css +0 -1
- package/lib/theme-chalk/slider.css +0 -1
- package/lib/theme-chalk/spinner.css +0 -1
- package/lib/theme-chalk/statistic.css +0 -1
- package/lib/theme-chalk/step.css +0 -1
- package/lib/theme-chalk/steps.css +0 -1
- package/lib/theme-chalk/switch.css +0 -1
- package/lib/theme-chalk/table-column.css +0 -1
- package/lib/theme-chalk/table.css +0 -1
- package/lib/theme-chalk/tabs.css +0 -1
- package/lib/theme-chalk/tag.css +0 -1
- package/lib/theme-chalk/time-picker.css +0 -1
- package/lib/theme-chalk/time-select.css +0 -1
- package/lib/theme-chalk/timeline-item.css +0 -1
- package/lib/theme-chalk/timeline.css +0 -1
- package/lib/theme-chalk/tooltip.css +0 -1
- package/lib/theme-chalk/transfer.css +0 -1
- package/lib/theme-chalk/tree.css +0 -1
- package/lib/theme-chalk/upload.css +0 -1
- /package/lib/theme-chalk/{breadcrumb-item.css → src/breadcrumb-item.scss} +0 -0
- /package/lib/theme-chalk/{button-group.css → src/button-group.scss} +0 -0
- /package/lib/theme-chalk/{checkbox-button.css → src/checkbox-button.scss} +0 -0
- /package/lib/theme-chalk/{checkbox-group.css → src/checkbox-group.scss} +0 -0
- /package/lib/theme-chalk/{collapse-item.css → src/collapse-item.scss} +0 -0
- /package/lib/theme-chalk/{dropdown-item.css → src/dropdown-item.scss} +0 -0
- /package/lib/theme-chalk/{dropdown-menu.css → src/dropdown-menu.scss} +0 -0
- /package/lib/theme-chalk/{fonts → src/fonts}/element-icons.ttf +0 -0
- /package/lib/theme-chalk/{fonts → src/fonts}/element-icons.woff +0 -0
- /package/lib/theme-chalk/{form-item.css → src/form-item.scss} +0 -0
- /package/lib/theme-chalk/{infinite-scroll.css → src/infinite-scroll.scss} +0 -0
- /package/lib/theme-chalk/{infiniteScroll.css → src/infiniteScroll.scss} +0 -0
- /package/lib/theme-chalk/{menu-item-group.css → src/menu-item-group.scss} +0 -0
- /package/lib/theme-chalk/{menu-item.css → src/menu-item.scss} +0 -0
- /package/lib/theme-chalk/{submenu.css → src/submenu.scss} +0 -0
- /package/lib/theme-chalk/{tab-pane.css → src/tab-pane.scss} +0 -0
package/lib/notification.js
CHANGED
|
@@ -82,261 +82,12 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 84);
|
|
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
|
-
/***/ 2:
|
|
340
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
341
92
|
|
|
342
93
|
"use strict";
|
|
@@ -441,427 +192,28 @@ function normalizeComponent(
|
|
|
441
192
|
|
|
442
193
|
/***/ }),
|
|
443
194
|
|
|
444
|
-
/***/
|
|
445
|
-
/***/ (function(module,
|
|
446
|
-
|
|
447
|
-
"use strict";
|
|
448
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
|
|
449
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
|
|
450
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
|
|
451
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
|
|
452
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
|
|
453
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
|
|
454
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
|
|
455
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
|
|
456
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
|
|
457
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
|
|
458
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
|
|
459
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
|
|
460
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
|
|
461
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
|
|
462
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
|
|
463
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
|
|
464
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
|
|
465
|
-
/* unused harmony export looseEqual */
|
|
466
|
-
/* unused harmony export arrayEquals */
|
|
467
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
|
|
468
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
|
|
469
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
|
|
470
|
-
/* unused harmony export objToArray */
|
|
471
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
|
|
472
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
473
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
474
|
-
/* harmony import */ var element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
475
|
-
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; };
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
481
|
-
|
|
482
|
-
function noop() {};
|
|
483
|
-
|
|
484
|
-
function hasOwn(obj, key) {
|
|
485
|
-
return hasOwnProperty.call(obj, key);
|
|
486
|
-
};
|
|
487
|
-
|
|
488
|
-
function extend(to, _from) {
|
|
489
|
-
for (var key in _from) {
|
|
490
|
-
to[key] = _from[key];
|
|
491
|
-
}
|
|
492
|
-
return to;
|
|
493
|
-
};
|
|
494
|
-
|
|
495
|
-
function toObject(arr) {
|
|
496
|
-
var res = {};
|
|
497
|
-
for (var i = 0; i < arr.length; i++) {
|
|
498
|
-
if (arr[i]) {
|
|
499
|
-
extend(res, arr[i]);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
return res;
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
var getValueByPath = function getValueByPath(object, prop) {
|
|
506
|
-
prop = prop || '';
|
|
507
|
-
var paths = prop.split('.');
|
|
508
|
-
var current = object;
|
|
509
|
-
var result = null;
|
|
510
|
-
for (var i = 0, j = paths.length; i < j; i++) {
|
|
511
|
-
var path = paths[i];
|
|
512
|
-
if (!current) break;
|
|
513
|
-
|
|
514
|
-
if (i === j - 1) {
|
|
515
|
-
result = current[path];
|
|
516
|
-
break;
|
|
517
|
-
}
|
|
518
|
-
current = current[path];
|
|
519
|
-
}
|
|
520
|
-
return result;
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
function getPropByPath(obj, path, strict) {
|
|
524
|
-
var tempObj = obj;
|
|
525
|
-
path = path.replace(/\[(\w+)\]/g, '.$1');
|
|
526
|
-
path = path.replace(/^\./, '');
|
|
527
|
-
|
|
528
|
-
var keyArr = path.split('.');
|
|
529
|
-
var i = 0;
|
|
530
|
-
for (var len = keyArr.length; i < len - 1; ++i) {
|
|
531
|
-
if (!tempObj && !strict) break;
|
|
532
|
-
var key = keyArr[i];
|
|
533
|
-
if (key in tempObj) {
|
|
534
|
-
tempObj = tempObj[key];
|
|
535
|
-
} else {
|
|
536
|
-
if (strict) {
|
|
537
|
-
throw new Error('please transfer a valid prop path to form item!');
|
|
538
|
-
}
|
|
539
|
-
break;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
return {
|
|
543
|
-
o: tempObj,
|
|
544
|
-
k: keyArr[i],
|
|
545
|
-
v: tempObj ? tempObj[keyArr[i]] : null
|
|
546
|
-
};
|
|
547
|
-
};
|
|
548
|
-
|
|
549
|
-
var generateId = function generateId() {
|
|
550
|
-
return Math.floor(Math.random() * 10000);
|
|
551
|
-
};
|
|
552
|
-
|
|
553
|
-
var valueEquals = function valueEquals(a, b) {
|
|
554
|
-
// see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
|
|
555
|
-
if (a === b) return true;
|
|
556
|
-
if (!(a instanceof Array)) return false;
|
|
557
|
-
if (!(b instanceof Array)) return false;
|
|
558
|
-
if (a.length !== b.length) return false;
|
|
559
|
-
for (var i = 0; i !== a.length; ++i) {
|
|
560
|
-
if (a[i] !== b[i]) return false;
|
|
561
|
-
}
|
|
562
|
-
return true;
|
|
563
|
-
};
|
|
564
|
-
|
|
565
|
-
var escapeRegexpString = function escapeRegexpString() {
|
|
566
|
-
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
567
|
-
return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
|
|
568
|
-
};
|
|
569
|
-
|
|
570
|
-
// TODO: use native Array.find, Array.findIndex when IE support is dropped
|
|
571
|
-
var arrayFindIndex = function arrayFindIndex(arr, pred) {
|
|
572
|
-
for (var i = 0; i !== arr.length; ++i) {
|
|
573
|
-
if (pred(arr[i])) {
|
|
574
|
-
return i;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
return -1;
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
var arrayFind = function arrayFind(arr, pred) {
|
|
581
|
-
var idx = arrayFindIndex(arr, pred);
|
|
582
|
-
return idx !== -1 ? arr[idx] : undefined;
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
// coerce truthy value to array
|
|
586
|
-
var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
|
|
587
|
-
if (Array.isArray(val)) {
|
|
588
|
-
return val;
|
|
589
|
-
} else if (val) {
|
|
590
|
-
return [val];
|
|
591
|
-
} else {
|
|
592
|
-
return [];
|
|
593
|
-
}
|
|
594
|
-
};
|
|
595
|
-
|
|
596
|
-
var isIE = function isIE() {
|
|
597
|
-
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
598
|
-
};
|
|
599
|
-
|
|
600
|
-
var isEdge = function isEdge() {
|
|
601
|
-
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
var isFirefox = function isFirefox() {
|
|
605
|
-
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
var autoprefixer = function autoprefixer(style) {
|
|
609
|
-
if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
|
|
610
|
-
var rules = ['transform', 'transition', 'animation'];
|
|
611
|
-
var prefixes = ['ms-', 'webkit-'];
|
|
612
|
-
rules.forEach(function (rule) {
|
|
613
|
-
var value = style[rule];
|
|
614
|
-
if (rule && value) {
|
|
615
|
-
prefixes.forEach(function (prefix) {
|
|
616
|
-
style[prefix + rule] = value;
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
});
|
|
620
|
-
return style;
|
|
621
|
-
};
|
|
622
|
-
|
|
623
|
-
var kebabCase = function kebabCase(str) {
|
|
624
|
-
var hyphenateRE = /([^-])([A-Z])/g;
|
|
625
|
-
return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
|
|
626
|
-
};
|
|
627
|
-
|
|
628
|
-
var capitalize = function capitalize(str) {
|
|
629
|
-
if (!Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
|
|
630
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
631
|
-
};
|
|
632
|
-
|
|
633
|
-
var looseEqual = function looseEqual(a, b) {
|
|
634
|
-
var isObjectA = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
|
|
635
|
-
var isObjectB = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
|
|
636
|
-
if (isObjectA && isObjectB) {
|
|
637
|
-
return JSON.stringify(a) === JSON.stringify(b);
|
|
638
|
-
} else if (!isObjectA && !isObjectB) {
|
|
639
|
-
return String(a) === String(b);
|
|
640
|
-
} else {
|
|
641
|
-
return false;
|
|
642
|
-
}
|
|
643
|
-
};
|
|
644
|
-
|
|
645
|
-
var arrayEquals = function arrayEquals(arrayA, arrayB) {
|
|
646
|
-
arrayA = arrayA || [];
|
|
647
|
-
arrayB = arrayB || [];
|
|
648
|
-
|
|
649
|
-
if (arrayA.length !== arrayB.length) {
|
|
650
|
-
return false;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
for (var i = 0; i < arrayA.length; i++) {
|
|
654
|
-
if (!looseEqual(arrayA[i], arrayB[i])) {
|
|
655
|
-
return false;
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
return true;
|
|
660
|
-
};
|
|
661
|
-
|
|
662
|
-
var isEqual = function isEqual(value1, value2) {
|
|
663
|
-
if (Array.isArray(value1) && Array.isArray(value2)) {
|
|
664
|
-
return arrayEquals(value1, value2);
|
|
665
|
-
}
|
|
666
|
-
return looseEqual(value1, value2);
|
|
667
|
-
};
|
|
668
|
-
|
|
669
|
-
var isEmpty = function isEmpty(val) {
|
|
670
|
-
// null or undefined
|
|
671
|
-
if (val == null) return true;
|
|
672
|
-
|
|
673
|
-
if (typeof val === 'boolean') return false;
|
|
674
|
-
|
|
675
|
-
if (typeof val === 'number') return !val;
|
|
676
|
-
|
|
677
|
-
if (val instanceof Error) return val.message === '';
|
|
678
|
-
|
|
679
|
-
switch (Object.prototype.toString.call(val)) {
|
|
680
|
-
// String or Array
|
|
681
|
-
case '[object String]':
|
|
682
|
-
case '[object Array]':
|
|
683
|
-
return !val.length;
|
|
684
|
-
|
|
685
|
-
// Map or Set or File
|
|
686
|
-
case '[object File]':
|
|
687
|
-
case '[object Map]':
|
|
688
|
-
case '[object Set]':
|
|
689
|
-
{
|
|
690
|
-
return !val.size;
|
|
691
|
-
}
|
|
692
|
-
// Plain Object
|
|
693
|
-
case '[object Object]':
|
|
694
|
-
{
|
|
695
|
-
return !Object.keys(val).length;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
return false;
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
function rafThrottle(fn) {
|
|
703
|
-
var locked = false;
|
|
704
|
-
return function () {
|
|
705
|
-
var _this = this;
|
|
706
|
-
|
|
707
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
708
|
-
args[_key] = arguments[_key];
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
if (locked) return;
|
|
712
|
-
locked = true;
|
|
713
|
-
window.requestAnimationFrame(function (_) {
|
|
714
|
-
fn.apply(_this, args);
|
|
715
|
-
locked = false;
|
|
716
|
-
});
|
|
717
|
-
};
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
function objToArray(obj) {
|
|
721
|
-
if (Array.isArray(obj)) {
|
|
722
|
-
return obj;
|
|
723
|
-
}
|
|
724
|
-
return isEmpty(obj) ? [] : [obj];
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
var isMac = function isMac() {
|
|
728
|
-
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
|
|
729
|
-
};
|
|
730
|
-
|
|
731
|
-
/***/ }),
|
|
732
|
-
|
|
733
|
-
/***/ 35:
|
|
734
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
735
|
-
|
|
736
|
-
"use strict";
|
|
737
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isVNode; });
|
|
738
|
-
/* harmony import */ var element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
|
|
739
|
-
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; };
|
|
740
|
-
|
|
741
|
-
|
|
195
|
+
/***/ 14:
|
|
196
|
+
/***/ (function(module, exports) {
|
|
742
197
|
|
|
743
|
-
|
|
744
|
-
return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* hasOwn */ "j"])(node, 'componentOptions');
|
|
745
|
-
};
|
|
198
|
+
module.exports = require("element-ui/lib/utils/popup");
|
|
746
199
|
|
|
747
200
|
/***/ }),
|
|
748
201
|
|
|
749
|
-
/***/
|
|
750
|
-
/***/ (function(module,
|
|
751
|
-
|
|
752
|
-
"use strict";
|
|
753
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
|
|
754
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
|
|
755
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
|
|
756
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
|
|
757
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
|
|
758
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
|
|
759
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
760
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
761
|
-
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; };
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
function isString(obj) {
|
|
766
|
-
return Object.prototype.toString.call(obj) === '[object String]';
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
function isObject(obj) {
|
|
770
|
-
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
function isHtmlElement(node) {
|
|
774
|
-
return node && node.nodeType === Node.ELEMENT_NODE;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* - Inspired:
|
|
779
|
-
* https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
|
|
780
|
-
*/
|
|
781
|
-
var isFunction = function isFunction(functionToCheck) {
|
|
782
|
-
var getType = {};
|
|
783
|
-
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
784
|
-
};
|
|
785
|
-
|
|
786
|
-
if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
|
|
787
|
-
isFunction = function isFunction(obj) {
|
|
788
|
-
return typeof obj === 'function' || false;
|
|
789
|
-
};
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
|
|
202
|
+
/***/ 23:
|
|
203
|
+
/***/ (function(module, exports) {
|
|
793
204
|
|
|
794
|
-
|
|
795
|
-
return val === void 0;
|
|
796
|
-
};
|
|
797
|
-
|
|
798
|
-
var isDefined = function isDefined(val) {
|
|
799
|
-
return val !== undefined && val !== null;
|
|
800
|
-
};
|
|
205
|
+
module.exports = require("element-ui/lib/utils/vdom");
|
|
801
206
|
|
|
802
207
|
/***/ }),
|
|
803
208
|
|
|
804
209
|
/***/ 7:
|
|
805
|
-
/***/ (function(module,
|
|
806
|
-
|
|
807
|
-
"use strict";
|
|
808
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (target) {
|
|
809
|
-
for (var i = 1, j = arguments.length; i < j; i++) {
|
|
810
|
-
var source = arguments[i] || {};
|
|
811
|
-
for (var prop in source) {
|
|
812
|
-
if (source.hasOwnProperty(prop)) {
|
|
813
|
-
var value = source[prop];
|
|
814
|
-
if (value !== undefined) {
|
|
815
|
-
target[prop] = value;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
return target;
|
|
822
|
-
});;
|
|
823
|
-
|
|
824
|
-
/***/ }),
|
|
825
|
-
|
|
826
|
-
/***/ 8:
|
|
827
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
828
|
-
|
|
829
|
-
"use strict";
|
|
830
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
831
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
var scrollBarWidth = void 0;
|
|
835
|
-
|
|
836
|
-
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
|
837
|
-
if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
|
|
838
|
-
if (scrollBarWidth !== undefined) return scrollBarWidth;
|
|
839
|
-
|
|
840
|
-
var outer = document.createElement('div');
|
|
841
|
-
outer.className = 'el-scrollbar__wrap';
|
|
842
|
-
outer.style.visibility = 'hidden';
|
|
843
|
-
outer.style.width = '100px';
|
|
844
|
-
outer.style.position = 'absolute';
|
|
845
|
-
outer.style.top = '-9999px';
|
|
846
|
-
document.body.appendChild(outer);
|
|
847
|
-
|
|
848
|
-
var widthNoScroll = outer.offsetWidth;
|
|
849
|
-
outer.style.overflow = 'scroll';
|
|
850
|
-
|
|
851
|
-
var inner = document.createElement('div');
|
|
852
|
-
inner.style.width = '100%';
|
|
853
|
-
outer.appendChild(inner);
|
|
854
|
-
|
|
855
|
-
var widthWithScroll = inner.offsetWidth;
|
|
856
|
-
outer.parentNode.removeChild(outer);
|
|
857
|
-
scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
210
|
+
/***/ (function(module, exports) {
|
|
858
211
|
|
|
859
|
-
|
|
860
|
-
});;
|
|
212
|
+
module.exports = require("vue");
|
|
861
213
|
|
|
862
214
|
/***/ }),
|
|
863
215
|
|
|
864
|
-
/***/
|
|
216
|
+
/***/ 84:
|
|
865
217
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
866
218
|
|
|
867
219
|
"use strict";
|
|
@@ -869,7 +221,7 @@ var scrollBarWidth = void 0;
|
|
|
869
221
|
__webpack_require__.r(__webpack_exports__);
|
|
870
222
|
|
|
871
223
|
// EXTERNAL MODULE: external "vue"
|
|
872
|
-
var external_vue_ = __webpack_require__(
|
|
224
|
+
var external_vue_ = __webpack_require__(7);
|
|
873
225
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
874
226
|
|
|
875
227
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/notification/src/main.vue?vue&type=template&id=2fc0bc52
|
|
@@ -1089,7 +441,7 @@ var typeMap = {
|
|
|
1089
441
|
// CONCATENATED MODULE: ./packages/notification/src/main.vue?vue&type=script&lang=js
|
|
1090
442
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
1091
443
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
1092
|
-
var componentNormalizer = __webpack_require__(
|
|
444
|
+
var componentNormalizer = __webpack_require__(0);
|
|
1093
445
|
|
|
1094
446
|
// CONCATENATED MODULE: ./packages/notification/src/main.vue
|
|
1095
447
|
|
|
@@ -1111,14 +463,15 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
1111
463
|
)
|
|
1112
464
|
|
|
1113
465
|
/* harmony default export */ var main = (component.exports);
|
|
1114
|
-
// EXTERNAL MODULE:
|
|
1115
|
-
var
|
|
466
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/merge"
|
|
467
|
+
var merge_ = __webpack_require__(9);
|
|
468
|
+
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
|
1116
469
|
|
|
1117
|
-
// EXTERNAL MODULE:
|
|
1118
|
-
var
|
|
470
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/popup"
|
|
471
|
+
var popup_ = __webpack_require__(14);
|
|
1119
472
|
|
|
1120
|
-
// EXTERNAL MODULE:
|
|
1121
|
-
var
|
|
473
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/vdom"
|
|
474
|
+
var vdom_ = __webpack_require__(23);
|
|
1122
475
|
|
|
1123
476
|
// CONCATENATED MODULE: ./packages/notification/src/main.js
|
|
1124
477
|
|
|
@@ -1134,7 +487,7 @@ var seed = 1;
|
|
|
1134
487
|
|
|
1135
488
|
var main_Notification = function Notification(options) {
|
|
1136
489
|
if (external_vue_default.a.prototype.$isServer) return;
|
|
1137
|
-
options =
|
|
490
|
+
options = merge_default()({}, options);
|
|
1138
491
|
var userOnClose = options.onClose;
|
|
1139
492
|
var id = 'notification_' + seed++;
|
|
1140
493
|
var position = options.position || 'top-right';
|
|
@@ -1147,7 +500,7 @@ var main_Notification = function Notification(options) {
|
|
|
1147
500
|
data: options
|
|
1148
501
|
});
|
|
1149
502
|
|
|
1150
|
-
if (Object(
|
|
503
|
+
if (Object(vdom_["isVNode"])(options.message)) {
|
|
1151
504
|
instance.$slots.default = [options.message];
|
|
1152
505
|
options.message = 'REPLACED_BY_VNODE';
|
|
1153
506
|
}
|
|
@@ -1156,7 +509,7 @@ var main_Notification = function Notification(options) {
|
|
|
1156
509
|
document.body.appendChild(instance.$el);
|
|
1157
510
|
instance.visible = true;
|
|
1158
511
|
instance.dom = instance.$el;
|
|
1159
|
-
instance.dom.style.zIndex =
|
|
512
|
+
instance.dom.style.zIndex = popup_["PopupManager"].nextZIndex();
|
|
1160
513
|
|
|
1161
514
|
var verticalOffset = options.offset || 0;
|
|
1162
515
|
instances.filter(function (item) {
|
|
@@ -1172,7 +525,7 @@ var main_Notification = function Notification(options) {
|
|
|
1172
525
|
|
|
1173
526
|
['success', 'warning', 'info', 'error'].forEach(function (type) {
|
|
1174
527
|
main_Notification[type] = function (options) {
|
|
1175
|
-
if (typeof options === 'string' || Object(
|
|
528
|
+
if (typeof options === 'string' || Object(vdom_["isVNode"])(options)) {
|
|
1176
529
|
options = {
|
|
1177
530
|
message: options
|
|
1178
531
|
};
|
|
@@ -1223,439 +576,9 @@ main_Notification.closeAll = function () {
|
|
|
1223
576
|
/***/ }),
|
|
1224
577
|
|
|
1225
578
|
/***/ 9:
|
|
1226
|
-
/***/ (function(module,
|
|
1227
|
-
|
|
1228
|
-
"use strict";
|
|
1229
|
-
|
|
1230
|
-
// EXPORTS
|
|
1231
|
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
|
|
1232
|
-
|
|
1233
|
-
// EXTERNAL MODULE: external "vue"
|
|
1234
|
-
var external_vue_ = __webpack_require__(0);
|
|
1235
|
-
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
1236
|
-
|
|
1237
|
-
// EXTERNAL MODULE: ./src/utils/merge.js
|
|
1238
|
-
var merge = __webpack_require__(7);
|
|
1239
|
-
|
|
1240
|
-
// EXTERNAL MODULE: ./src/utils/dom.js
|
|
1241
|
-
var utils_dom = __webpack_require__(1);
|
|
1242
|
-
|
|
1243
|
-
// CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
var hasModal = false;
|
|
1248
|
-
var hasInitZIndex = false;
|
|
1249
|
-
var popup_manager_zIndex = void 0;
|
|
1250
|
-
|
|
1251
|
-
var popup_manager_getModal = function getModal() {
|
|
1252
|
-
if (external_vue_default.a.prototype.$isServer) return;
|
|
1253
|
-
var modalDom = PopupManager.modalDom;
|
|
1254
|
-
if (modalDom) {
|
|
1255
|
-
hasModal = true;
|
|
1256
|
-
} else {
|
|
1257
|
-
hasModal = false;
|
|
1258
|
-
modalDom = document.createElement('div');
|
|
1259
|
-
PopupManager.modalDom = modalDom;
|
|
1260
|
-
|
|
1261
|
-
modalDom.addEventListener('touchmove', function (event) {
|
|
1262
|
-
event.preventDefault();
|
|
1263
|
-
event.stopPropagation();
|
|
1264
|
-
});
|
|
1265
|
-
|
|
1266
|
-
modalDom.addEventListener('click', function () {
|
|
1267
|
-
PopupManager.doOnModalClick && PopupManager.doOnModalClick();
|
|
1268
|
-
});
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
return modalDom;
|
|
1272
|
-
};
|
|
1273
|
-
|
|
1274
|
-
var instances = {};
|
|
1275
|
-
|
|
1276
|
-
var PopupManager = {
|
|
1277
|
-
modalFade: true,
|
|
1278
|
-
|
|
1279
|
-
getInstance: function getInstance(id) {
|
|
1280
|
-
return instances[id];
|
|
1281
|
-
},
|
|
1282
|
-
|
|
1283
|
-
register: function register(id, instance) {
|
|
1284
|
-
if (id && instance) {
|
|
1285
|
-
instances[id] = instance;
|
|
1286
|
-
}
|
|
1287
|
-
},
|
|
1288
|
-
|
|
1289
|
-
deregister: function deregister(id) {
|
|
1290
|
-
if (id) {
|
|
1291
|
-
instances[id] = null;
|
|
1292
|
-
delete instances[id];
|
|
1293
|
-
}
|
|
1294
|
-
},
|
|
1295
|
-
|
|
1296
|
-
nextZIndex: function nextZIndex() {
|
|
1297
|
-
return PopupManager.zIndex++;
|
|
1298
|
-
},
|
|
1299
|
-
|
|
1300
|
-
modalStack: [],
|
|
1301
|
-
|
|
1302
|
-
doOnModalClick: function doOnModalClick() {
|
|
1303
|
-
var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
|
1304
|
-
if (!topItem) return;
|
|
1305
|
-
|
|
1306
|
-
var instance = PopupManager.getInstance(topItem.id);
|
|
1307
|
-
if (instance && instance.closeOnClickModal) {
|
|
1308
|
-
instance.close();
|
|
1309
|
-
}
|
|
1310
|
-
},
|
|
1311
|
-
|
|
1312
|
-
openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
|
|
1313
|
-
if (external_vue_default.a.prototype.$isServer) return;
|
|
1314
|
-
if (!id || zIndex === undefined) return;
|
|
1315
|
-
this.modalFade = modalFade;
|
|
1316
|
-
|
|
1317
|
-
var modalStack = this.modalStack;
|
|
1318
|
-
|
|
1319
|
-
for (var i = 0, j = modalStack.length; i < j; i++) {
|
|
1320
|
-
var item = modalStack[i];
|
|
1321
|
-
if (item.id === id) {
|
|
1322
|
-
return;
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
var modalDom = popup_manager_getModal();
|
|
1327
|
-
|
|
1328
|
-
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
|
|
1329
|
-
if (this.modalFade && !hasModal) {
|
|
1330
|
-
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
|
|
1331
|
-
}
|
|
1332
|
-
if (modalClass) {
|
|
1333
|
-
var classArr = modalClass.trim().split(/\s+/);
|
|
1334
|
-
classArr.forEach(function (item) {
|
|
1335
|
-
return Object(utils_dom["a" /* addClass */])(modalDom, item);
|
|
1336
|
-
});
|
|
1337
|
-
}
|
|
1338
|
-
setTimeout(function () {
|
|
1339
|
-
Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
|
|
1340
|
-
}, 200);
|
|
1341
|
-
|
|
1342
|
-
if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
|
|
1343
|
-
dom.parentNode.appendChild(modalDom);
|
|
1344
|
-
} else {
|
|
1345
|
-
document.body.appendChild(modalDom);
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
if (zIndex) {
|
|
1349
|
-
modalDom.style.zIndex = zIndex;
|
|
1350
|
-
}
|
|
1351
|
-
modalDom.tabIndex = 0;
|
|
1352
|
-
modalDom.style.display = '';
|
|
1353
|
-
|
|
1354
|
-
this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
|
|
1355
|
-
},
|
|
1356
|
-
|
|
1357
|
-
closeModal: function closeModal(id) {
|
|
1358
|
-
var modalStack = this.modalStack;
|
|
1359
|
-
var modalDom = popup_manager_getModal();
|
|
1360
|
-
|
|
1361
|
-
if (modalStack.length > 0) {
|
|
1362
|
-
var topItem = modalStack[modalStack.length - 1];
|
|
1363
|
-
if (topItem.id === id) {
|
|
1364
|
-
if (topItem.modalClass) {
|
|
1365
|
-
var classArr = topItem.modalClass.trim().split(/\s+/);
|
|
1366
|
-
classArr.forEach(function (item) {
|
|
1367
|
-
return Object(utils_dom["i" /* removeClass */])(modalDom, item);
|
|
1368
|
-
});
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
modalStack.pop();
|
|
1372
|
-
if (modalStack.length > 0) {
|
|
1373
|
-
modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
|
|
1374
|
-
}
|
|
1375
|
-
} else {
|
|
1376
|
-
for (var i = modalStack.length - 1; i >= 0; i--) {
|
|
1377
|
-
if (modalStack[i].id === id) {
|
|
1378
|
-
modalStack.splice(i, 1);
|
|
1379
|
-
break;
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
if (modalStack.length === 0) {
|
|
1386
|
-
if (this.modalFade) {
|
|
1387
|
-
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
|
|
1388
|
-
}
|
|
1389
|
-
setTimeout(function () {
|
|
1390
|
-
if (modalStack.length === 0) {
|
|
1391
|
-
if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
|
|
1392
|
-
modalDom.style.display = 'none';
|
|
1393
|
-
PopupManager.modalDom = undefined;
|
|
1394
|
-
}
|
|
1395
|
-
Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
|
|
1396
|
-
}, 200);
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
};
|
|
1400
|
-
|
|
1401
|
-
Object.defineProperty(PopupManager, 'zIndex', {
|
|
1402
|
-
configurable: true,
|
|
1403
|
-
get: function get() {
|
|
1404
|
-
if (!hasInitZIndex) {
|
|
1405
|
-
popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
|
|
1406
|
-
hasInitZIndex = true;
|
|
1407
|
-
}
|
|
1408
|
-
return popup_manager_zIndex;
|
|
1409
|
-
},
|
|
1410
|
-
set: function set(value) {
|
|
1411
|
-
popup_manager_zIndex = value;
|
|
1412
|
-
}
|
|
1413
|
-
});
|
|
1414
|
-
|
|
1415
|
-
var popup_manager_getTopPopup = function getTopPopup() {
|
|
1416
|
-
if (external_vue_default.a.prototype.$isServer) return;
|
|
1417
|
-
if (PopupManager.modalStack.length > 0) {
|
|
1418
|
-
var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
|
1419
|
-
if (!topPopup) return;
|
|
1420
|
-
var instance = PopupManager.getInstance(topPopup.id);
|
|
1421
|
-
|
|
1422
|
-
return instance;
|
|
1423
|
-
}
|
|
1424
|
-
};
|
|
1425
|
-
|
|
1426
|
-
if (!external_vue_default.a.prototype.$isServer) {
|
|
1427
|
-
// handle `esc` key when the popup is shown
|
|
1428
|
-
window.addEventListener('keydown', function (event) {
|
|
1429
|
-
if (event.keyCode === 27) {
|
|
1430
|
-
var topPopup = popup_manager_getTopPopup();
|
|
1431
|
-
|
|
1432
|
-
if (topPopup && topPopup.closeOnPressEscape) {
|
|
1433
|
-
topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
|
|
1434
|
-
}
|
|
1435
|
-
}
|
|
1436
|
-
});
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
/* harmony default export */ var popup_manager = (PopupManager);
|
|
1440
|
-
// EXTERNAL MODULE: ./src/utils/scrollbar-width.js
|
|
1441
|
-
var scrollbar_width = __webpack_require__(8);
|
|
1442
|
-
|
|
1443
|
-
// CONCATENATED MODULE: ./src/utils/popup/index.js
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
var idSeed = 1;
|
|
1451
|
-
|
|
1452
|
-
var scrollBarWidth = void 0;
|
|
1453
|
-
|
|
1454
|
-
/* harmony default export */ var popup = __webpack_exports__["b"] = ({
|
|
1455
|
-
props: {
|
|
1456
|
-
visible: {
|
|
1457
|
-
type: Boolean,
|
|
1458
|
-
default: false
|
|
1459
|
-
},
|
|
1460
|
-
openDelay: {},
|
|
1461
|
-
closeDelay: {},
|
|
1462
|
-
zIndex: {},
|
|
1463
|
-
modal: {
|
|
1464
|
-
type: Boolean,
|
|
1465
|
-
default: false
|
|
1466
|
-
},
|
|
1467
|
-
modalFade: {
|
|
1468
|
-
type: Boolean,
|
|
1469
|
-
default: true
|
|
1470
|
-
},
|
|
1471
|
-
modalClass: {},
|
|
1472
|
-
modalAppendToBody: {
|
|
1473
|
-
type: Boolean,
|
|
1474
|
-
default: false
|
|
1475
|
-
},
|
|
1476
|
-
lockScroll: {
|
|
1477
|
-
type: Boolean,
|
|
1478
|
-
default: true
|
|
1479
|
-
},
|
|
1480
|
-
closeOnPressEscape: {
|
|
1481
|
-
type: Boolean,
|
|
1482
|
-
default: false
|
|
1483
|
-
},
|
|
1484
|
-
closeOnClickModal: {
|
|
1485
|
-
type: Boolean,
|
|
1486
|
-
default: false
|
|
1487
|
-
}
|
|
1488
|
-
},
|
|
1489
|
-
|
|
1490
|
-
beforeMount: function beforeMount() {
|
|
1491
|
-
this._popupId = 'popup-' + idSeed++;
|
|
1492
|
-
popup_manager.register(this._popupId, this);
|
|
1493
|
-
},
|
|
1494
|
-
beforeDestroy: function beforeDestroy() {
|
|
1495
|
-
popup_manager.deregister(this._popupId);
|
|
1496
|
-
popup_manager.closeModal(this._popupId);
|
|
1497
|
-
|
|
1498
|
-
this.restoreBodyStyle();
|
|
1499
|
-
},
|
|
1500
|
-
data: function data() {
|
|
1501
|
-
return {
|
|
1502
|
-
opened: false,
|
|
1503
|
-
bodyPaddingRight: null,
|
|
1504
|
-
computedBodyPaddingRight: 0,
|
|
1505
|
-
withoutHiddenClass: true,
|
|
1506
|
-
rendered: false
|
|
1507
|
-
};
|
|
1508
|
-
},
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
watch: {
|
|
1512
|
-
visible: function visible(val) {
|
|
1513
|
-
var _this = this;
|
|
1514
|
-
|
|
1515
|
-
if (val) {
|
|
1516
|
-
if (this._opening) return;
|
|
1517
|
-
if (!this.rendered) {
|
|
1518
|
-
this.rendered = true;
|
|
1519
|
-
external_vue_default.a.nextTick(function () {
|
|
1520
|
-
_this.open();
|
|
1521
|
-
});
|
|
1522
|
-
} else {
|
|
1523
|
-
this.open();
|
|
1524
|
-
}
|
|
1525
|
-
} else {
|
|
1526
|
-
this.close();
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
},
|
|
1530
|
-
|
|
1531
|
-
methods: {
|
|
1532
|
-
open: function open(options) {
|
|
1533
|
-
var _this2 = this;
|
|
1534
|
-
|
|
1535
|
-
if (!this.rendered) {
|
|
1536
|
-
this.rendered = true;
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
var props = Object(merge["a" /* default */])({}, this.$props || this, options);
|
|
1540
|
-
|
|
1541
|
-
if (this._closeTimer) {
|
|
1542
|
-
clearTimeout(this._closeTimer);
|
|
1543
|
-
this._closeTimer = null;
|
|
1544
|
-
}
|
|
1545
|
-
clearTimeout(this._openTimer);
|
|
1546
|
-
|
|
1547
|
-
var openDelay = Number(props.openDelay);
|
|
1548
|
-
if (openDelay > 0) {
|
|
1549
|
-
this._openTimer = setTimeout(function () {
|
|
1550
|
-
_this2._openTimer = null;
|
|
1551
|
-
_this2.doOpen(props);
|
|
1552
|
-
}, openDelay);
|
|
1553
|
-
} else {
|
|
1554
|
-
this.doOpen(props);
|
|
1555
|
-
}
|
|
1556
|
-
},
|
|
1557
|
-
doOpen: function doOpen(props) {
|
|
1558
|
-
if (this.$isServer) return;
|
|
1559
|
-
if (this.willOpen && !this.willOpen()) return;
|
|
1560
|
-
if (this.opened) return;
|
|
1561
|
-
|
|
1562
|
-
this._opening = true;
|
|
1563
|
-
|
|
1564
|
-
var dom = this.$el;
|
|
1565
|
-
|
|
1566
|
-
var modal = props.modal;
|
|
1567
|
-
|
|
1568
|
-
var zIndex = props.zIndex;
|
|
1569
|
-
if (zIndex) {
|
|
1570
|
-
popup_manager.zIndex = zIndex;
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
if (modal) {
|
|
1574
|
-
if (this._closing) {
|
|
1575
|
-
popup_manager.closeModal(this._popupId);
|
|
1576
|
-
this._closing = false;
|
|
1577
|
-
}
|
|
1578
|
-
popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
|
|
1579
|
-
if (props.lockScroll) {
|
|
1580
|
-
this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
|
|
1581
|
-
if (this.withoutHiddenClass) {
|
|
1582
|
-
this.bodyPaddingRight = document.body.style.paddingRight;
|
|
1583
|
-
this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
|
|
1584
|
-
}
|
|
1585
|
-
scrollBarWidth = Object(scrollbar_width["a" /* default */])();
|
|
1586
|
-
var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
|
|
1587
|
-
var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
|
|
1588
|
-
if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
|
|
1589
|
-
document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
|
|
1590
|
-
}
|
|
1591
|
-
Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
if (getComputedStyle(dom).position === 'static') {
|
|
1596
|
-
dom.style.position = 'absolute';
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
dom.style.zIndex = popup_manager.nextZIndex();
|
|
1600
|
-
this.opened = true;
|
|
1601
|
-
|
|
1602
|
-
this.onOpen && this.onOpen();
|
|
1603
|
-
|
|
1604
|
-
this.doAfterOpen();
|
|
1605
|
-
},
|
|
1606
|
-
doAfterOpen: function doAfterOpen() {
|
|
1607
|
-
this._opening = false;
|
|
1608
|
-
},
|
|
1609
|
-
close: function close() {
|
|
1610
|
-
var _this3 = this;
|
|
1611
|
-
|
|
1612
|
-
if (this.willClose && !this.willClose()) return;
|
|
1613
|
-
|
|
1614
|
-
if (this._openTimer !== null) {
|
|
1615
|
-
clearTimeout(this._openTimer);
|
|
1616
|
-
this._openTimer = null;
|
|
1617
|
-
}
|
|
1618
|
-
clearTimeout(this._closeTimer);
|
|
1619
|
-
|
|
1620
|
-
var closeDelay = Number(this.closeDelay);
|
|
1621
|
-
|
|
1622
|
-
if (closeDelay > 0) {
|
|
1623
|
-
this._closeTimer = setTimeout(function () {
|
|
1624
|
-
_this3._closeTimer = null;
|
|
1625
|
-
_this3.doClose();
|
|
1626
|
-
}, closeDelay);
|
|
1627
|
-
} else {
|
|
1628
|
-
this.doClose();
|
|
1629
|
-
}
|
|
1630
|
-
},
|
|
1631
|
-
doClose: function doClose() {
|
|
1632
|
-
this._closing = true;
|
|
1633
|
-
|
|
1634
|
-
this.onClose && this.onClose();
|
|
1635
|
-
|
|
1636
|
-
if (this.lockScroll) {
|
|
1637
|
-
setTimeout(this.restoreBodyStyle, 200);
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
this.opened = false;
|
|
1641
|
-
|
|
1642
|
-
this.doAfterClose();
|
|
1643
|
-
},
|
|
1644
|
-
doAfterClose: function doAfterClose() {
|
|
1645
|
-
popup_manager.closeModal(this._popupId);
|
|
1646
|
-
this._closing = false;
|
|
1647
|
-
},
|
|
1648
|
-
restoreBodyStyle: function restoreBodyStyle() {
|
|
1649
|
-
if (this.modal && this.withoutHiddenClass) {
|
|
1650
|
-
document.body.style.paddingRight = this.bodyPaddingRight;
|
|
1651
|
-
Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
|
|
1652
|
-
}
|
|
1653
|
-
this.withoutHiddenClass = true;
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
});
|
|
1657
|
-
|
|
579
|
+
/***/ (function(module, exports) {
|
|
1658
580
|
|
|
581
|
+
module.exports = require("element-ui/lib/utils/merge");
|
|
1659
582
|
|
|
1660
583
|
/***/ })
|
|
1661
584
|
|