@liuzengwei/element-ui 2.15.5-xn.50 → 2.15.5-xn.52
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/lib/affix.js +2 -2
- package/lib/alert.js +2 -2
- package/lib/area-loading.js +2 -2
- package/lib/area-picker.js +4 -4
- package/lib/aside.js +2 -2
- package/lib/autocomplete.js +2 -2
- package/lib/avatar.js +2 -2
- package/lib/backtop.js +2 -2
- package/lib/badge.js +2 -2
- package/lib/breadcrumb-item.js +2 -2
- package/lib/breadcrumb.js +2 -2
- package/lib/button-group.js +2 -2
- package/lib/button.js +2 -2
- package/lib/calendar.js +2 -2
- package/lib/card.js +2 -2
- package/lib/carousel-item.js +2 -2
- package/lib/carousel.js +2 -2
- package/lib/cascader-panel.js +4 -4
- package/lib/cascader.js +11 -11
- package/lib/checkbox-button.js +9 -9
- package/lib/checkbox-group.js +9 -9
- package/lib/checkbox.js +9 -9
- package/lib/col.js +2 -2
- package/lib/collapse-item.js +2 -2
- package/lib/collapse.js +2 -2
- package/lib/color-picker.js +9 -9
- package/lib/container.js +2 -2
- package/lib/date-picker.js +69 -91
- package/lib/descriptions-item.js +2 -2
- package/lib/descriptions.js +2 -2
- package/lib/dialog.js +2 -2
- package/lib/divider.js +2 -2
- package/lib/drawer.js +159 -11
- package/lib/dropdown-item.js +2 -2
- package/lib/dropdown-menu.js +2 -2
- package/lib/dropdown.js +2 -2
- package/lib/element-ui.common.js +884 -41
- package/lib/empty.js +2 -2
- package/lib/file-preview.js +905 -0
- package/lib/footer.js +2 -2
- package/lib/form-item.js +4 -4
- package/lib/form.js +2 -2
- package/lib/header.js +2 -2
- package/lib/icon.js +2 -2
- package/lib/image.js +2 -2
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +2 -2
- package/lib/input-number.js +2 -2
- package/lib/input.js +2 -2
- package/lib/lazy-load.js +2 -2
- package/lib/link.js +2 -2
- package/lib/loading.js +2 -2
- package/lib/main.js +2 -2
- package/lib/menu-item-group.js +2 -2
- package/lib/menu-item.js +2 -2
- package/lib/menu.js +2 -2
- package/lib/message-box.js +4 -4
- package/lib/message.js +2 -2
- package/lib/notification.js +9 -9
- package/lib/option-group.js +9 -9
- package/lib/option.js +2 -2
- package/lib/page-header.js +2 -2
- package/lib/pagination.js +6 -6
- package/lib/popconfirm.js +4 -4
- package/lib/popover.js +2 -2
- package/lib/progress.js +2 -2
- package/lib/radio-button.js +9 -9
- package/lib/radio-group.js +9 -9
- package/lib/radio.js +2 -2
- package/lib/rate.js +2 -2
- package/lib/result.js +2 -2
- package/lib/row.js +2 -2
- package/lib/scrollbar.js +9 -9
- package/lib/segmented.js +2 -2
- package/lib/select.js +2 -2
- package/lib/selectable-tag-group.js +2 -2
- package/lib/selectable-tag.js +2 -2
- package/lib/skeleton-item.js +2 -2
- package/lib/skeleton.js +2 -2
- package/lib/slider.js +4 -4
- package/lib/spinner.js +2 -2
- package/lib/statistic.js +2 -2
- package/lib/step.js +2 -2
- package/lib/steps.js +2 -2
- package/lib/submenu.js +2 -2
- package/lib/switch.js +23 -23
- package/lib/tab-pane.js +2 -2
- package/lib/table-column.js +2 -2
- package/lib/table.js +14 -6
- package/lib/tabs.js +2 -2
- package/lib/tag.js +2 -2
- package/lib/text.js +2 -2
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/drawer.css +1 -1
- package/lib/theme-chalk/file-preview.css +1 -0
- package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
- package/lib/theme-chalk/fonts/iconfont.woff +0 -0
- package/lib/theme-chalk/icon.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/time-picker.js +2 -2
- package/lib/time-select.js +2 -2
- package/lib/timeline-item.js +2 -2
- package/lib/timeline.js +2 -2
- package/lib/tooltip.js +2 -2
- package/lib/transfer.js +2 -2
- package/lib/tree.js +2 -2
- package/lib/trigger.js +11 -11
- package/lib/upload.js +2 -2
- package/package.json +1 -1
- package/packages/drawer/src/main.vue +144 -7
- package/packages/file-preview/index.js +8 -0
- package/packages/file-preview/src/icons/audio.svg +1 -0
- package/packages/file-preview/src/icons/excel.svg +1 -0
- package/packages/file-preview/src/icons/image.svg +1 -0
- package/packages/file-preview/src/icons/pdf.svg +1 -0
- package/packages/file-preview/src/icons/ppt.svg +1 -0
- package/packages/file-preview/src/icons/video.svg +1 -0
- package/packages/file-preview/src/icons/word.svg +1 -0
- package/packages/file-preview/src/icons/zip.svg +1 -0
- package/packages/file-preview/src/main.vue +330 -0
- package/packages/theme-chalk/lib/base.css +1 -1
- package/packages/theme-chalk/lib/drawer.css +1 -1
- package/packages/theme-chalk/lib/file-preview.css +1 -0
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/icon.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/src/drawer.scss +31 -0
- package/packages/theme-chalk/src/file-preview.scss +138 -0
- package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/src/icon.scss +36 -0
- package/packages/theme-chalk/src/index.scss +1 -0
- package/src/index.js +5 -2
- package/types/drawer.d.ts +16 -0
- package/types/element-ui.d.ts +4 -0
- package/types/file-preview.d.ts +32 -0
package/lib/date-picker.js
CHANGED
|
@@ -82,11 +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 = 66);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
|
-
/******/ (
|
|
89
|
-
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ 0:
|
|
90
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
91
92
|
|
|
92
93
|
"use strict";
|
|
@@ -187,93 +188,50 @@ function normalizeComponent (
|
|
|
187
188
|
|
|
188
189
|
|
|
189
190
|
/***/ }),
|
|
190
|
-
|
|
191
|
+
|
|
192
|
+
/***/ 1:
|
|
191
193
|
/***/ (function(module, exports) {
|
|
192
194
|
|
|
193
195
|
module.exports = require("@liuzengwei/element-ui/lib/utils/date-util");
|
|
194
196
|
|
|
195
197
|
/***/ }),
|
|
196
|
-
/* 2 */
|
|
197
|
-
/***/ (function(module, exports) {
|
|
198
|
-
|
|
199
|
-
module.exports = require("@liuzengwei/element-ui/lib/utils/dom");
|
|
200
198
|
|
|
201
|
-
/***/
|
|
202
|
-
/* 3 */
|
|
199
|
+
/***/ 10:
|
|
203
200
|
/***/ (function(module, exports) {
|
|
204
201
|
|
|
205
|
-
module.exports = require("@liuzengwei/element-ui/lib/
|
|
202
|
+
module.exports = require("@liuzengwei/element-ui/lib/input");
|
|
206
203
|
|
|
207
204
|
/***/ }),
|
|
208
|
-
/* 4 */
|
|
209
|
-
/***/ (function(module, exports) {
|
|
210
|
-
|
|
211
|
-
module.exports = require("@liuzengwei/element-ui/lib/mixins/emitter");
|
|
212
205
|
|
|
213
|
-
/***/
|
|
214
|
-
/* 5 */
|
|
206
|
+
/***/ 12:
|
|
215
207
|
/***/ (function(module, exports) {
|
|
216
208
|
|
|
217
|
-
module.exports = require("@liuzengwei/element-ui/lib/utils/
|
|
209
|
+
module.exports = require("@liuzengwei/element-ui/lib/utils/clickoutside");
|
|
218
210
|
|
|
219
211
|
/***/ }),
|
|
220
|
-
/* 6 */
|
|
221
|
-
/***/ (function(module, exports) {
|
|
222
212
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
/***/ }),
|
|
226
|
-
/* 7 */
|
|
213
|
+
/***/ 16:
|
|
227
214
|
/***/ (function(module, exports) {
|
|
228
215
|
|
|
229
|
-
module.exports = require("
|
|
216
|
+
module.exports = require("@liuzengwei/element-ui/lib/button");
|
|
230
217
|
|
|
231
218
|
/***/ }),
|
|
232
|
-
/* 8 */,
|
|
233
|
-
/* 9 */
|
|
234
|
-
/***/ (function(module, exports) {
|
|
235
|
-
|
|
236
|
-
module.exports = require("@liuzengwei/element-ui/lib/utils/merge");
|
|
237
219
|
|
|
238
|
-
/***/
|
|
239
|
-
/* 10 */
|
|
220
|
+
/***/ 17:
|
|
240
221
|
/***/ (function(module, exports) {
|
|
241
222
|
|
|
242
|
-
module.exports = require("@liuzengwei/element-ui/lib/
|
|
223
|
+
module.exports = require("@liuzengwei/element-ui/lib/scrollbar");
|
|
243
224
|
|
|
244
225
|
/***/ }),
|
|
245
|
-
/* 11 */,
|
|
246
|
-
/* 12 */
|
|
247
|
-
/***/ (function(module, exports) {
|
|
248
226
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
/***/ }),
|
|
252
|
-
/* 13 */,
|
|
253
|
-
/* 14 */,
|
|
254
|
-
/* 15 */,
|
|
255
|
-
/* 16 */
|
|
227
|
+
/***/ 2:
|
|
256
228
|
/***/ (function(module, exports) {
|
|
257
229
|
|
|
258
|
-
module.exports = require("@liuzengwei/element-ui/lib/
|
|
230
|
+
module.exports = require("@liuzengwei/element-ui/lib/utils/dom");
|
|
259
231
|
|
|
260
232
|
/***/ }),
|
|
261
|
-
/* 17 */
|
|
262
|
-
/***/ (function(module, exports) {
|
|
263
|
-
|
|
264
|
-
module.exports = require("@liuzengwei/element-ui/lib/scrollbar");
|
|
265
233
|
|
|
266
|
-
/***/
|
|
267
|
-
/* 18 */,
|
|
268
|
-
/* 19 */,
|
|
269
|
-
/* 20 */,
|
|
270
|
-
/* 21 */,
|
|
271
|
-
/* 22 */,
|
|
272
|
-
/* 23 */,
|
|
273
|
-
/* 24 */,
|
|
274
|
-
/* 25 */,
|
|
275
|
-
/* 26 */,
|
|
276
|
-
/* 27 */
|
|
234
|
+
/***/ 27:
|
|
277
235
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
278
236
|
|
|
279
237
|
"use strict";
|
|
@@ -600,9 +558,15 @@ component.options.__file = "packages/date-picker/src/panel/time.vue"
|
|
|
600
558
|
/* harmony default export */ var time = __webpack_exports__["a"] = (component.exports);
|
|
601
559
|
|
|
602
560
|
/***/ }),
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
561
|
+
|
|
562
|
+
/***/ 3:
|
|
563
|
+
/***/ (function(module, exports) {
|
|
564
|
+
|
|
565
|
+
module.exports = require("@liuzengwei/element-ui/lib/utils/util");
|
|
566
|
+
|
|
567
|
+
/***/ }),
|
|
568
|
+
|
|
569
|
+
/***/ 30:
|
|
606
570
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
607
571
|
|
|
608
572
|
"use strict";
|
|
@@ -640,8 +604,8 @@ component.options.__file = "packages/date-picker/src/panel/time.vue"
|
|
|
640
604
|
});
|
|
641
605
|
|
|
642
606
|
/***/ }),
|
|
643
|
-
|
|
644
|
-
|
|
607
|
+
|
|
608
|
+
/***/ 32:
|
|
645
609
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
646
610
|
|
|
647
611
|
"use strict";
|
|
@@ -1807,8 +1771,8 @@ component.options.__file = "packages/date-picker/src/picker.vue"
|
|
|
1807
1771
|
/* harmony default export */ var picker = __webpack_exports__["a"] = (component.exports);
|
|
1808
1772
|
|
|
1809
1773
|
/***/ }),
|
|
1810
|
-
|
|
1811
|
-
|
|
1774
|
+
|
|
1775
|
+
/***/ 34:
|
|
1812
1776
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1813
1777
|
|
|
1814
1778
|
"use strict";
|
|
@@ -2508,30 +2472,29 @@ component.options.__file = "packages/date-picker/src/basic/time-spinner.vue"
|
|
|
2508
2472
|
/* harmony default export */ var time_spinner = __webpack_exports__["a"] = (component.exports);
|
|
2509
2473
|
|
|
2510
2474
|
/***/ }),
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
/* 58 */
|
|
2475
|
+
|
|
2476
|
+
/***/ 4:
|
|
2477
|
+
/***/ (function(module, exports) {
|
|
2478
|
+
|
|
2479
|
+
module.exports = require("@liuzengwei/element-ui/lib/mixins/emitter");
|
|
2480
|
+
|
|
2481
|
+
/***/ }),
|
|
2482
|
+
|
|
2483
|
+
/***/ 5:
|
|
2484
|
+
/***/ (function(module, exports) {
|
|
2485
|
+
|
|
2486
|
+
module.exports = require("@liuzengwei/element-ui/lib/utils/vue-popper");
|
|
2487
|
+
|
|
2488
|
+
/***/ }),
|
|
2489
|
+
|
|
2490
|
+
/***/ 6:
|
|
2491
|
+
/***/ (function(module, exports) {
|
|
2492
|
+
|
|
2493
|
+
module.exports = require("@liuzengwei/element-ui/lib/mixins/locale");
|
|
2494
|
+
|
|
2495
|
+
/***/ }),
|
|
2496
|
+
|
|
2497
|
+
/***/ 66:
|
|
2535
2498
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2536
2499
|
|
|
2537
2500
|
"use strict";
|
|
@@ -6356,5 +6319,20 @@ date_picker.install = function install(Vue) {
|
|
|
6356
6319
|
|
|
6357
6320
|
/* harmony default export */ var packages_date_picker = __webpack_exports__["default"] = (date_picker);
|
|
6358
6321
|
|
|
6322
|
+
/***/ }),
|
|
6323
|
+
|
|
6324
|
+
/***/ 7:
|
|
6325
|
+
/***/ (function(module, exports) {
|
|
6326
|
+
|
|
6327
|
+
module.exports = require("vue");
|
|
6328
|
+
|
|
6329
|
+
/***/ }),
|
|
6330
|
+
|
|
6331
|
+
/***/ 9:
|
|
6332
|
+
/***/ (function(module, exports) {
|
|
6333
|
+
|
|
6334
|
+
module.exports = require("@liuzengwei/element-ui/lib/utils/merge");
|
|
6335
|
+
|
|
6359
6336
|
/***/ })
|
|
6360
|
-
|
|
6337
|
+
|
|
6338
|
+
/******/ });
|
package/lib/descriptions-item.js
CHANGED
|
@@ -82,12 +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 = 162);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
89
89
|
|
|
90
|
-
/***/
|
|
90
|
+
/***/ 162:
|
|
91
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
92
|
|
|
93
93
|
"use strict";
|
package/lib/descriptions.js
CHANGED
|
@@ -82,7 +82,7 @@ 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 = 157);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -94,7 +94,7 @@ module.exports = require("@liuzengwei/element-ui/lib/utils/types");
|
|
|
94
94
|
|
|
95
95
|
/***/ }),
|
|
96
96
|
|
|
97
|
-
/***/
|
|
97
|
+
/***/ 157:
|
|
98
98
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
99
99
|
|
|
100
100
|
"use strict";
|
package/lib/dialog.js
CHANGED
|
@@ -82,7 +82,7 @@ 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 = 93);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -210,7 +210,7 @@ module.exports = require("@liuzengwei/element-ui/lib/mixins/emitter");
|
|
|
210
210
|
|
|
211
211
|
/***/ }),
|
|
212
212
|
|
|
213
|
-
/***/
|
|
213
|
+
/***/ 93:
|
|
214
214
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
215
215
|
|
|
216
216
|
"use strict";
|
package/lib/divider.js
CHANGED
|
@@ -82,7 +82,7 @@ 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 = 134);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -189,7 +189,7 @@ function normalizeComponent (
|
|
|
189
189
|
|
|
190
190
|
/***/ }),
|
|
191
191
|
|
|
192
|
-
/***/
|
|
192
|
+
/***/ 134:
|
|
193
193
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
194
194
|
|
|
195
195
|
"use strict";
|
package/lib/drawer.js
CHANGED
|
@@ -82,7 +82,7 @@ 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 = 137);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -189,7 +189,7 @@ function normalizeComponent (
|
|
|
189
189
|
|
|
190
190
|
/***/ }),
|
|
191
191
|
|
|
192
|
-
/***/
|
|
192
|
+
/***/ 137:
|
|
193
193
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
194
194
|
|
|
195
195
|
"use strict";
|
|
@@ -218,7 +218,9 @@ var render = function() {
|
|
|
218
218
|
expression: "visible"
|
|
219
219
|
}
|
|
220
220
|
],
|
|
221
|
-
|
|
221
|
+
class: _vm.referenceMode
|
|
222
|
+
? "el-drawer__wrapper-reference"
|
|
223
|
+
: "el-drawer__wrapper",
|
|
222
224
|
attrs: { tabindex: "-1" }
|
|
223
225
|
},
|
|
224
226
|
[
|
|
@@ -226,7 +228,10 @@ var render = function() {
|
|
|
226
228
|
"div",
|
|
227
229
|
{
|
|
228
230
|
staticClass: "el-drawer__container",
|
|
229
|
-
class:
|
|
231
|
+
class: [
|
|
232
|
+
_vm.visible && "el-drawer__open",
|
|
233
|
+
_vm.referenceMode && "el-drawer__reference-mode"
|
|
234
|
+
],
|
|
230
235
|
attrs: { role: "document", tabindex: "-1" },
|
|
231
236
|
on: {
|
|
232
237
|
click: function($event) {
|
|
@@ -243,10 +248,12 @@ var render = function() {
|
|
|
243
248
|
{
|
|
244
249
|
ref: "drawer",
|
|
245
250
|
staticClass: "el-drawer",
|
|
246
|
-
class: [
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
251
|
+
class: [
|
|
252
|
+
_vm.effectiveDirection,
|
|
253
|
+
_vm.customClass,
|
|
254
|
+
_vm.referenceMode && "is-reference"
|
|
255
|
+
],
|
|
256
|
+
style: _vm.drawerStyle,
|
|
250
257
|
attrs: {
|
|
251
258
|
"aria-modal": "true",
|
|
252
259
|
"aria-labelledby": "el-drawer__title",
|
|
@@ -327,6 +334,8 @@ var emitter_ = __webpack_require__(4);
|
|
|
327
334
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
328
335
|
|
|
329
336
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/drawer/src/main.vue?vue&type=script&lang=js&
|
|
337
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
338
|
+
|
|
330
339
|
//
|
|
331
340
|
//
|
|
332
341
|
//
|
|
@@ -439,6 +448,21 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
439
448
|
withHeader: {
|
|
440
449
|
type: Boolean,
|
|
441
450
|
default: true
|
|
451
|
+
},
|
|
452
|
+
reference: {
|
|
453
|
+
type: [String, Object],
|
|
454
|
+
default: null
|
|
455
|
+
},
|
|
456
|
+
placement: {
|
|
457
|
+
type: String,
|
|
458
|
+
default: 'right',
|
|
459
|
+
validator: function validator(val) {
|
|
460
|
+
return ['top', 'bottom', 'left', 'right'].indexOf(val) !== -1;
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
offset: {
|
|
464
|
+
type: Number,
|
|
465
|
+
default: 0
|
|
442
466
|
}
|
|
443
467
|
},
|
|
444
468
|
computed: {
|
|
@@ -447,12 +471,42 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
447
471
|
},
|
|
448
472
|
drawerSize: function drawerSize() {
|
|
449
473
|
return typeof this.size === 'number' ? this.size + 'px' : this.size;
|
|
474
|
+
},
|
|
475
|
+
referenceMode: function referenceMode() {
|
|
476
|
+
return !!this.reference;
|
|
477
|
+
},
|
|
478
|
+
effectiveDirection: function effectiveDirection() {
|
|
479
|
+
// 在 reference 模式下,根据 placement 映射到对应的 direction
|
|
480
|
+
if (this.referenceMode) {
|
|
481
|
+
var placementToDirection = {
|
|
482
|
+
'top': 'btt',
|
|
483
|
+
'bottom': 'ttb',
|
|
484
|
+
'left': 'ltr',
|
|
485
|
+
'right': 'rtl'
|
|
486
|
+
};
|
|
487
|
+
return placementToDirection[this.placement] || 'rtl';
|
|
488
|
+
}
|
|
489
|
+
return this.direction;
|
|
490
|
+
},
|
|
491
|
+
drawerStyle: function drawerStyle() {
|
|
492
|
+
if (this.referenceMode) {
|
|
493
|
+
var style = _extends({}, this.position);
|
|
494
|
+
if (this.placement === 'left' || this.placement === 'right') {
|
|
495
|
+
style.width = this.drawerSize;
|
|
496
|
+
} else {
|
|
497
|
+
style.height = this.drawerSize;
|
|
498
|
+
}
|
|
499
|
+
return style;
|
|
500
|
+
} else {
|
|
501
|
+
return this.isHorizontal ? 'width: ' + this.drawerSize : 'height: ' + this.drawerSize;
|
|
502
|
+
}
|
|
450
503
|
}
|
|
451
504
|
},
|
|
452
505
|
data: function data() {
|
|
453
506
|
return {
|
|
454
507
|
closed: false,
|
|
455
|
-
prevActiveElement: null
|
|
508
|
+
prevActiveElement: null,
|
|
509
|
+
position: {}
|
|
456
510
|
};
|
|
457
511
|
},
|
|
458
512
|
|
|
@@ -463,10 +517,20 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
463
517
|
if (val) {
|
|
464
518
|
this.closed = false;
|
|
465
519
|
this.$emit('open');
|
|
466
|
-
if (this.
|
|
520
|
+
if (this.referenceMode) {
|
|
521
|
+
var referenceEl = this.getReferenceElement();
|
|
522
|
+
if (referenceEl) {
|
|
523
|
+
referenceEl.appendChild(this.$el);
|
|
524
|
+
}
|
|
525
|
+
} else if (this.appendToBody) {
|
|
467
526
|
document.body.appendChild(this.$el);
|
|
468
527
|
}
|
|
469
528
|
this.prevActiveElement = document.activeElement;
|
|
529
|
+
if (this.referenceMode) {
|
|
530
|
+
this.$nextTick(function () {
|
|
531
|
+
_this.updatePosition();
|
|
532
|
+
});
|
|
533
|
+
}
|
|
470
534
|
} else {
|
|
471
535
|
if (!this.closed) {
|
|
472
536
|
this.$emit('close');
|
|
@@ -516,22 +580,106 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
516
580
|
// pressing `ESC` will call this method, and also close the drawer.
|
|
517
581
|
// This method also calls `beforeClose` if there was one.
|
|
518
582
|
this.closeDrawer();
|
|
583
|
+
},
|
|
584
|
+
getReferenceElement: function getReferenceElement() {
|
|
585
|
+
if (typeof this.reference === 'string') {
|
|
586
|
+
return document.querySelector(this.reference);
|
|
587
|
+
} else if (this.reference && this.reference.$el) {
|
|
588
|
+
return this.reference.$el;
|
|
589
|
+
} else {
|
|
590
|
+
return this.reference;
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
updatePosition: function updatePosition() {
|
|
594
|
+
if (!this.referenceMode) return;
|
|
595
|
+
|
|
596
|
+
var referenceEl = this.getReferenceElement();
|
|
597
|
+
if (!referenceEl) {
|
|
598
|
+
console.warn('[ElDrawer] Reference element not found');
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
// 确保参考元素有 position 样式
|
|
603
|
+
var computedStyle = window.getComputedStyle(referenceEl);
|
|
604
|
+
if (computedStyle.position === 'static') {
|
|
605
|
+
referenceEl.style.position = 'relative';
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
var placement = this.placement,
|
|
609
|
+
offset = this.offset;
|
|
610
|
+
|
|
611
|
+
var position = {};
|
|
612
|
+
|
|
613
|
+
switch (placement) {
|
|
614
|
+
case 'top':
|
|
615
|
+
position.left = '0';
|
|
616
|
+
position.bottom = offset + 'px';
|
|
617
|
+
position.top = 'auto';
|
|
618
|
+
position.right = '0';
|
|
619
|
+
break;
|
|
620
|
+
case 'bottom':
|
|
621
|
+
position.left = '0';
|
|
622
|
+
position.top = offset + 'px';
|
|
623
|
+
position.bottom = 'auto';
|
|
624
|
+
position.right = '0';
|
|
625
|
+
break;
|
|
626
|
+
case 'left':
|
|
627
|
+
position.top = '0';
|
|
628
|
+
position.right = 'auto';
|
|
629
|
+
position.left = offset + 'px';
|
|
630
|
+
position.bottom = '0';
|
|
631
|
+
break;
|
|
632
|
+
case 'right':
|
|
633
|
+
position.top = '0';
|
|
634
|
+
position.left = 'auto';
|
|
635
|
+
position.right = offset + 'px';
|
|
636
|
+
position.bottom = '0';
|
|
637
|
+
break;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
this.position = position;
|
|
641
|
+
},
|
|
642
|
+
handleScroll: function handleScroll() {
|
|
643
|
+
if (this.referenceMode && this.visible) {
|
|
644
|
+
this.updatePosition();
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
handleResize: function handleResize() {
|
|
648
|
+
if (this.referenceMode && this.visible) {
|
|
649
|
+
this.updatePosition();
|
|
650
|
+
}
|
|
519
651
|
}
|
|
520
652
|
},
|
|
521
653
|
mounted: function mounted() {
|
|
522
654
|
if (this.visible) {
|
|
523
655
|
this.rendered = true;
|
|
524
656
|
this.open();
|
|
525
|
-
if (this.
|
|
657
|
+
if (this.referenceMode) {
|
|
658
|
+
var referenceEl = this.getReferenceElement();
|
|
659
|
+
if (referenceEl) {
|
|
660
|
+
referenceEl.appendChild(this.$el);
|
|
661
|
+
}
|
|
662
|
+
} else if (this.appendToBody) {
|
|
526
663
|
document.body.appendChild(this.$el);
|
|
527
664
|
}
|
|
528
665
|
}
|
|
666
|
+
if (this.referenceMode) {
|
|
667
|
+
window.addEventListener('scroll', this.handleScroll, true);
|
|
668
|
+
window.addEventListener('resize', this.handleResize);
|
|
669
|
+
}
|
|
529
670
|
},
|
|
530
671
|
destroyed: function destroyed() {
|
|
531
672
|
// if appendToBody is true, remove DOM node after destroy
|
|
532
673
|
if (this.appendToBody && this.$el && this.$el.parentNode) {
|
|
533
674
|
this.$el.parentNode.removeChild(this.$el);
|
|
534
675
|
}
|
|
676
|
+
if (this.referenceMode && this.$el && this.$el.parentNode) {
|
|
677
|
+
this.$el.parentNode.removeChild(this.$el);
|
|
678
|
+
}
|
|
679
|
+
if (this.referenceMode) {
|
|
680
|
+
window.removeEventListener('scroll', this.handleScroll, true);
|
|
681
|
+
window.removeEventListener('resize', this.handleResize);
|
|
682
|
+
}
|
|
535
683
|
}
|
|
536
684
|
});
|
|
537
685
|
// CONCATENATED MODULE: ./packages/drawer/src/main.vue?vue&type=script&lang=js&
|
package/lib/dropdown-item.js
CHANGED
|
@@ -82,7 +82,7 @@ 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 = 95);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -196,7 +196,7 @@ module.exports = require("@liuzengwei/element-ui/lib/mixins/emitter");
|
|
|
196
196
|
|
|
197
197
|
/***/ }),
|
|
198
198
|
|
|
199
|
-
/***/
|
|
199
|
+
/***/ 95:
|
|
200
200
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
201
201
|
|
|
202
202
|
"use strict";
|
package/lib/dropdown-menu.js
CHANGED
|
@@ -82,7 +82,7 @@ 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 = 94);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -196,7 +196,7 @@ module.exports = require("@liuzengwei/element-ui/lib/utils/vue-popper");
|
|
|
196
196
|
|
|
197
197
|
/***/ }),
|
|
198
198
|
|
|
199
|
-
/***/
|
|
199
|
+
/***/ 94:
|
|
200
200
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
201
201
|
|
|
202
202
|
"use strict";
|
package/lib/dropdown.js
CHANGED
|
@@ -82,7 +82,7 @@ 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 = 150);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -203,7 +203,7 @@ module.exports = require("@liuzengwei/element-ui/lib/utils/clickoutside");
|
|
|
203
203
|
|
|
204
204
|
/***/ }),
|
|
205
205
|
|
|
206
|
-
/***/
|
|
206
|
+
/***/ 150:
|
|
207
207
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
208
208
|
|
|
209
209
|
"use strict";
|