cy-element-ui 1.1.19 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/lib/index.js +1 -1
  2. package/package.json +1 -1
  3. package/src/index.js +1 -1
  4. package/lib/Alert.js +0 -420
  5. package/lib/Aside.js +0 -277
  6. package/lib/Autocomplete.js +0 -2051
  7. package/lib/Avatar.js +0 -363
  8. package/lib/Backtop.js +0 -404
  9. package/lib/Badge.js +0 -334
  10. package/lib/Breadcrumb.js +0 -293
  11. package/lib/BreadcrumbItem.js +0 -322
  12. package/lib/Button.js +0 -357
  13. package/lib/ButtonGroup.js +0 -262
  14. package/lib/Calendar.js +0 -1146
  15. package/lib/Card.js +0 -297
  16. package/lib/Carousel.js +0 -707
  17. package/lib/CarouselItem.js +0 -434
  18. package/lib/Cascader.js +0 -4641
  19. package/lib/CascaderPanel.js +0 -2602
  20. package/lib/Checkbox.js +0 -627
  21. package/lib/CheckboxButton.js +0 -583
  22. package/lib/CheckboxGroup.js +0 -313
  23. package/lib/Col.js +0 -177
  24. package/lib/Collapse.js +0 -329
  25. package/lib/CollapseItem.js +0 -497
  26. package/lib/ColorPicker.js +0 -2885
  27. package/lib/Container.js +0 -288
  28. package/lib/CySelectDisplayInput.js +0 -367
  29. package/lib/CySubTitle.js +0 -295
  30. package/lib/CyTabDialog.js +0 -1184
  31. package/lib/CyTreeSelect.js +0 -4422
  32. package/lib/DatePicker.js +0 -7574
  33. package/lib/Descriptions.js +0 -457
  34. package/lib/DescriptionsItem.js +0 -140
  35. package/lib/Dialog.js +0 -598
  36. package/lib/Divider.js +0 -313
  37. package/lib/Drawer.js +0 -592
  38. package/lib/Dropdown.js +0 -856
  39. package/lib/DropdownItem.js +0 -316
  40. package/lib/DropdownMenu.js +0 -351
  41. package/lib/Empty.js +0 -730
  42. package/lib/Footer.js +0 -277
  43. package/lib/Form.js +0 -466
  44. package/lib/FormItem.js +0 -826
  45. package/lib/Header.js +0 -277
  46. package/lib/Icon.js +0 -265
  47. package/lib/Image.js +0 -1138
  48. package/lib/InfiniteScroll.js +0 -301
  49. package/lib/Input.js +0 -999
  50. package/lib/InputNumber.js +0 -1552
  51. package/lib/Link.js +0 -332
  52. package/lib/Loading.js +0 -631
  53. package/lib/Main.js +0 -264
  54. package/lib/Menu.js +0 -865
  55. package/lib/MenuItem.js +0 -818
  56. package/lib/MenuItemGroup.js +0 -308
  57. package/lib/Message.js +0 -548
  58. package/lib/MessageBox.js +0 -2134
  59. package/lib/Notification.js +0 -615
  60. package/lib/Option.js +0 -474
  61. package/lib/OptionGroup.js +0 -344
  62. package/lib/PageHeader.js +0 -319
  63. package/lib/Pagination.js +0 -4123
  64. package/lib/Popconfirm.js +0 -1025
  65. package/lib/Popover.js +0 -617
  66. package/lib/Progress.js +0 -595
  67. package/lib/Radio.js +0 -497
  68. package/lib/RadioButton.js +0 -463
  69. package/lib/RadioGroup.js +0 -391
  70. package/lib/Rate.js +0 -670
  71. package/lib/Result.js +0 -578
  72. package/lib/Row.js +0 -149
  73. package/lib/Scrollbar.js +0 -423
  74. package/lib/Select.js +0 -3368
  75. package/lib/Skeleton.js +0 -372
  76. package/lib/SkeletonItem.js +0 -342
  77. package/lib/Slider.js +0 -2854
  78. package/lib/Spinner.js +0 -301
  79. package/lib/Statistic.js +0 -533
  80. package/lib/Step.js +0 -522
  81. package/lib/Steps.js +0 -342
  82. package/lib/Submenu.js +0 -700
  83. package/lib/Switch.js +0 -554
  84. package/lib/TabPane.js +0 -332
  85. package/lib/Table.js +0 -6125
  86. package/lib/TableColumn.js +0 -1481
  87. package/lib/Tabs.js +0 -920
  88. package/lib/Tag.js +0 -304
  89. package/lib/TimePicker.js +0 -4059
  90. package/lib/TimeSelect.js +0 -2871
  91. package/lib/Timeline.js +0 -275
  92. package/lib/TimelineItem.js +0 -371
  93. package/lib/Tooltip.js +0 -425
  94. package/lib/Transfer.js +0 -2557
  95. package/lib/Tree.js +0 -2680
  96. package/lib/Upload.js +0 -1782
@@ -1,1184 +0,0 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
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
- /******/ // define __esModule on exports
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
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
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
- /******/ // getDefaultExport function for compatibility with non-harmony modules
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
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "/dist/";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 70);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ 0:
91
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
-
93
- "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
- /* globals __VUE_SSR_CONTEXT__ */
96
-
97
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
98
- // This module is a runtime utility for cleaner component module output and will
99
- // be included in the final webpack user bundle.
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
- // Vue.extend constructor export interop
112
- var options =
113
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
114
-
115
- // render functions
116
- if (render) {
117
- options.render = render
118
- options.staticRenderFns = staticRenderFns
119
- options._compiled = true
120
- }
121
-
122
- // functional template
123
- if (functionalTemplate) {
124
- options.functional = true
125
- }
126
-
127
- // scopedId
128
- if (scopeId) {
129
- options._scopeId = 'data-v-' + scopeId
130
- }
131
-
132
- var hook
133
- if (moduleIdentifier) {
134
- // server build
135
- hook = function (context) {
136
- // 2.3 injection
137
- context =
138
- context || // cached call
139
- (this.$vnode && this.$vnode.ssrContext) || // stateful
140
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
141
- // 2.2 with runInNewContext: true
142
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
143
- context = __VUE_SSR_CONTEXT__
144
- }
145
- // inject component styles
146
- if (injectStyles) {
147
- injectStyles.call(this, context)
148
- }
149
- // register component module identifier for async chunk inferrence
150
- if (context && context._registeredComponents) {
151
- context._registeredComponents.add(moduleIdentifier)
152
- }
153
- }
154
- // used by ssr in case component is cached and beforeCreate
155
- // never gets called
156
- options._ssrRegister = hook
157
- } else if (injectStyles) {
158
- hook = shadowMode
159
- ? function () {
160
- injectStyles.call(
161
- this,
162
- (options.functional ? this.parent : this).$root.$options.shadowRoot
163
- )
164
- }
165
- : injectStyles
166
- }
167
-
168
- if (hook) {
169
- if (options.functional) {
170
- // for template-only hot-reload because in that case the render fn doesn't
171
- // go through the normalizer
172
- options._injectStyles = hook
173
- // register for functional component in vue file
174
- var originalRender = options.render
175
- options.render = function renderWithStyleInjection(h, context) {
176
- hook.call(context)
177
- return originalRender(h, context)
178
- }
179
- } else {
180
- // inject component registration as beforeCreate hook
181
- var existing = options.beforeCreate
182
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
183
- }
184
- }
185
-
186
- return {
187
- exports: scriptExports,
188
- options: options
189
- }
190
- }
191
-
192
-
193
- /***/ }),
194
-
195
- /***/ 19:
196
- /***/ (function(module, exports) {
197
-
198
- module.exports = require("element-ui/lib/utils/popup");
199
-
200
- /***/ }),
201
-
202
- /***/ 4:
203
- /***/ (function(module, exports) {
204
-
205
- module.exports = require("element-ui/lib/mixins/emitter");
206
-
207
- /***/ }),
208
-
209
- /***/ 49:
210
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
211
-
212
- "use strict";
213
- // ESM COMPAT FLAG
214
- __webpack_require__.r(__webpack_exports__);
215
-
216
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/component.vue?vue&type=template&id=9f7c876a
217
- var render = function () {
218
- var _vm = this
219
- var _h = _vm.$createElement
220
- var _c = _vm._self._c || _h
221
- return _c(
222
- "transition",
223
- {
224
- attrs: { name: "dialog-fade" },
225
- on: { "after-enter": _vm.afterEnter, "after-leave": _vm.afterLeave },
226
- },
227
- [
228
- _c(
229
- "div",
230
- {
231
- directives: [
232
- {
233
- name: "show",
234
- rawName: "v-show",
235
- value: _vm.visible,
236
- expression: "visible",
237
- },
238
- ],
239
- staticClass: "el-dialog__wrapper",
240
- on: {
241
- click: function ($event) {
242
- if ($event.target !== $event.currentTarget) {
243
- return null
244
- }
245
- return _vm.handleWrapperClick($event)
246
- },
247
- },
248
- },
249
- [
250
- _c(
251
- "div",
252
- {
253
- key: _vm.key,
254
- ref: "dialog",
255
- class: [
256
- "el-dialog",
257
- {
258
- "is-fullscreen": _vm.fullscreen,
259
- "el-dialog--center": _vm.center,
260
- },
261
- _vm.customClass,
262
- ],
263
- style: _vm.style,
264
- attrs: {
265
- role: "dialog",
266
- "aria-modal": "true",
267
- "aria-label": _vm.title || "dialog",
268
- },
269
- },
270
- [
271
- _c(
272
- "div",
273
- { staticClass: "el-dialog__header" },
274
- [
275
- _vm._t("title", [
276
- _c("span", { staticClass: "el-dialog__title" }, [
277
- _vm._v(_vm._s(_vm.title)),
278
- ]),
279
- ]),
280
- _vm.showClose
281
- ? _c(
282
- "button",
283
- {
284
- staticClass: "el-dialog__headerbtn",
285
- attrs: { type: "button", "aria-label": "Close" },
286
- on: { click: _vm.handleClose },
287
- },
288
- [
289
- _c("i", {
290
- staticClass:
291
- "el-dialog__close el-icon el-icon-close",
292
- }),
293
- ]
294
- )
295
- : _vm._e(),
296
- ],
297
- 2
298
- ),
299
- _vm.rendered
300
- ? _c(
301
- "div",
302
- { staticClass: "el-dialog__body" },
303
- [_vm._t("default")],
304
- 2
305
- )
306
- : _vm._e(),
307
- _vm.$slots.footer
308
- ? _c(
309
- "div",
310
- { staticClass: "el-dialog__footer" },
311
- [_vm._t("footer")],
312
- 2
313
- )
314
- : _vm._e(),
315
- ]
316
- ),
317
- ]
318
- ),
319
- ]
320
- )
321
- }
322
- var staticRenderFns = []
323
- render._withStripped = true
324
-
325
-
326
- // CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=template&id=9f7c876a
327
-
328
- // EXTERNAL MODULE: external "element-ui/lib/utils/popup"
329
- var popup_ = __webpack_require__(19);
330
- var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
331
-
332
- // EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
333
- var migrating_ = __webpack_require__(7);
334
- var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
335
-
336
- // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
337
- var emitter_ = __webpack_require__(4);
338
- var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
339
-
340
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/component.vue?vue&type=script&lang=js
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
-
385
- /* harmony default export */ var componentvue_type_script_lang_js = ({
386
- name: 'ElDialog',
387
-
388
- mixins: [popup_default.a, emitter_default.a, migrating_default.a],
389
-
390
- props: {
391
- title: {
392
- type: String,
393
- default: ''
394
- },
395
-
396
- modal: {
397
- type: Boolean,
398
- default: true
399
- },
400
-
401
- modalAppendToBody: {
402
- type: Boolean,
403
- default: true
404
- },
405
-
406
- appendToBody: {
407
- type: Boolean,
408
- default: false
409
- },
410
-
411
- lockScroll: {
412
- type: Boolean,
413
- default: true
414
- },
415
-
416
- closeOnClickModal: {
417
- type: Boolean,
418
- default: true
419
- },
420
-
421
- closeOnPressEscape: {
422
- type: Boolean,
423
- default: true
424
- },
425
-
426
- showClose: {
427
- type: Boolean,
428
- default: true
429
- },
430
-
431
- width: String,
432
-
433
- fullscreen: Boolean,
434
-
435
- customClass: {
436
- type: String,
437
- default: ''
438
- },
439
-
440
- top: {
441
- type: String,
442
- default: '15vh'
443
- },
444
- beforeClose: Function,
445
- center: {
446
- type: Boolean,
447
- default: false
448
- },
449
-
450
- destroyOnClose: Boolean
451
- },
452
-
453
- data: function data() {
454
- return {
455
- closed: false,
456
- key: 0
457
- };
458
- },
459
-
460
-
461
- watch: {
462
- visible: function visible(val) {
463
- var _this = this;
464
-
465
- if (val) {
466
- this.closed = false;
467
- this.$emit('open');
468
- this.$el.addEventListener('scroll', this.updatePopper);
469
- this.$nextTick(function () {
470
- _this.$refs.dialog.scrollTop = 0;
471
- });
472
- if (this.appendToBody) {
473
- document.body.appendChild(this.$el);
474
- }
475
- } else {
476
- this.$el.removeEventListener('scroll', this.updatePopper);
477
- if (!this.closed) this.$emit('close');
478
- if (this.destroyOnClose) {
479
- this.$nextTick(function () {
480
- _this.key++;
481
- });
482
- }
483
- }
484
- }
485
- },
486
-
487
- computed: {
488
- style: function style() {
489
- var style = {};
490
- if (!this.fullscreen) {
491
- style.marginTop = this.top;
492
- if (this.width) {
493
- style.width = this.width;
494
- }
495
- }
496
- return style;
497
- }
498
- },
499
-
500
- methods: {
501
- getMigratingConfig: function getMigratingConfig() {
502
- return {
503
- props: {
504
- 'size': 'size is removed.'
505
- }
506
- };
507
- },
508
- handleWrapperClick: function handleWrapperClick() {
509
- if (!this.closeOnClickModal) return;
510
- this.handleClose();
511
- },
512
- handleClose: function handleClose() {
513
- if (typeof this.beforeClose === 'function') {
514
- this.beforeClose(this.hide);
515
- } else {
516
- this.hide();
517
- }
518
- },
519
- hide: function hide(cancel) {
520
- if (cancel !== false) {
521
- this.$emit('update:visible', false);
522
- this.$emit('close');
523
- this.closed = true;
524
- }
525
- },
526
- updatePopper: function updatePopper() {
527
- this.broadcast('ElSelectDropdown', 'updatePopper');
528
- this.broadcast('ElDropdownMenu', 'updatePopper');
529
- },
530
- afterEnter: function afterEnter() {
531
- this.$emit('opened');
532
- },
533
- afterLeave: function afterLeave() {
534
- this.$emit('closed');
535
- }
536
- },
537
-
538
- mounted: function mounted() {
539
- if (this.visible) {
540
- this.rendered = true;
541
- this.open();
542
- if (this.appendToBody) {
543
- document.body.appendChild(this.$el);
544
- }
545
- }
546
- },
547
- destroyed: function destroyed() {
548
- // if appendToBody is true, remove DOM node after destroy
549
- if (this.appendToBody && this.$el && this.$el.parentNode) {
550
- this.$el.parentNode.removeChild(this.$el);
551
- }
552
- }
553
- });
554
- // CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=script&lang=js
555
- /* harmony default export */ var src_componentvue_type_script_lang_js = (componentvue_type_script_lang_js);
556
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
557
- var componentNormalizer = __webpack_require__(0);
558
-
559
- // CONCATENATED MODULE: ./packages/dialog/src/component.vue
560
-
561
-
562
-
563
-
564
-
565
- /* normalize component */
566
-
567
- var component = Object(componentNormalizer["a" /* default */])(
568
- src_componentvue_type_script_lang_js,
569
- render,
570
- staticRenderFns,
571
- false,
572
- null,
573
- null,
574
- null
575
-
576
- )
577
-
578
- /* harmony default export */ var src_component = (component.exports);
579
- // CONCATENATED MODULE: ./packages/dialog/index.js
580
-
581
-
582
- /* istanbul ignore next */
583
- src_component.install = function (Vue) {
584
- Vue.component(src_component.name, src_component);
585
- };
586
-
587
- /* harmony default export */ var dialog = __webpack_exports__["default"] = (src_component);
588
-
589
- /***/ }),
590
-
591
- /***/ 7:
592
- /***/ (function(module, exports) {
593
-
594
- module.exports = require("element-ui/lib/mixins/migrating");
595
-
596
- /***/ }),
597
-
598
- /***/ 70:
599
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
600
-
601
- "use strict";
602
- // ESM COMPAT FLAG
603
- __webpack_require__.r(__webpack_exports__);
604
-
605
- // EXPORTS
606
- __webpack_require__.d(__webpack_exports__, "TabDialogDirective", function() { return /* binding */ tabDialog_TabDialogDirective; });
607
-
608
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cy/tabDialog/src/main.vue?vue&type=template&id=1a478a44
609
- var render = function () {
610
- var _vm = this
611
- var _h = _vm.$createElement
612
- var _c = _vm._self._c || _h
613
- return _c(
614
- "div",
615
- { staticClass: "cy-tab-dialog" },
616
- [
617
- _c("div", {
618
- directives: [
619
- {
620
- name: "show",
621
- rawName: "v-show",
622
- value: _vm.visible && _vm.modal,
623
- expression: "visible && modal",
624
- },
625
- ],
626
- staticClass: "cy-tab-dialog-modal",
627
- style: {
628
- zIndex: _vm.modelZIndex,
629
- height: _vm.modelHeight ? _vm.modelHeight : "100%",
630
- },
631
- attrs: { contenteditable: "false" },
632
- on: {
633
- click: function ($event) {
634
- _vm.closeOnClickModal && _vm.handleClose
635
- },
636
- },
637
- }),
638
- _c(
639
- "el-dialog",
640
- {
641
- directives: [
642
- {
643
- name: "dialog-drag",
644
- rawName: "v-dialog-drag",
645
- value: _vm.isDrag,
646
- expression: "isDrag",
647
- },
648
- {
649
- name: "dialog-drag-width",
650
- rawName: "v-dialog-drag-width",
651
- value: _vm.isDrag,
652
- expression: "isDrag",
653
- },
654
- {
655
- name: "dialog-drag-height",
656
- rawName: "v-dialog-drag-height",
657
- value: _vm.isDrag,
658
- expression: "isDrag",
659
- },
660
- ],
661
- attrs: {
662
- visible: _vm.visible,
663
- title: _vm.title,
664
- width: _vm.width,
665
- fullscreen: _vm.fullscreen,
666
- modal: false,
667
- "modal-append-to-body": false,
668
- "append-to-body": false,
669
- "lock-scroll": true,
670
- "custom-class": _vm.customClass,
671
- "close-on-click-modal": _vm.appendToTagsView
672
- ? false
673
- : _vm.closeOnClickModal,
674
- "close-on-press-escape": _vm.appendToTagsView
675
- ? false
676
- : _vm.closeOnPressEscape,
677
- "show-close": _vm.showClose,
678
- center: _vm.center,
679
- "destroy-on-close": _vm.destroyOnClose,
680
- contenteditable: "false",
681
- "before-close": _vm.beforeClose,
682
- },
683
- on: {
684
- open: _vm.handleOpen,
685
- opened: _vm.handleOpened,
686
- close: _vm.handleClose,
687
- closed: _vm.handleClosed,
688
- },
689
- },
690
- [
691
- _vm.$slots.title
692
- ? _c("template", { slot: "title" }, [_vm._t("title")], 2)
693
- : _vm._e(),
694
- _vm._t("default"),
695
- _vm.$slots.footer
696
- ? _c("template", { slot: "footer" }, [_vm._t("footer")], 2)
697
- : _vm._e(),
698
- ],
699
- 2
700
- ),
701
- ],
702
- 1
703
- )
704
- }
705
- var staticRenderFns = []
706
- render._withStripped = true
707
-
708
-
709
- // CONCATENATED MODULE: ./packages/cy/tabDialog/src/main.vue?vue&type=template&id=1a478a44
710
-
711
- // EXTERNAL MODULE: ./packages/dialog/index.js + 5 modules
712
- var dialog = __webpack_require__(49);
713
-
714
- // EXTERNAL MODULE: external "vue"
715
- var external_vue_ = __webpack_require__(8);
716
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
717
-
718
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cy/tabDialog/src/main.vue?vue&type=script&lang=js
719
- //
720
- //
721
- //
722
- //
723
- //
724
- //
725
- //
726
- //
727
- //
728
- //
729
- //
730
- //
731
- //
732
- //
733
- //
734
- //
735
- //
736
- //
737
- //
738
- //
739
- //
740
- //
741
- //
742
- //
743
- //
744
- //
745
- //
746
- //
747
- //
748
- //
749
- //
750
- //
751
- //
752
- //
753
- //
754
- //
755
- //
756
- //
757
- //
758
- //
759
- //
760
- //
761
- //
762
- //
763
- //
764
- //
765
- //
766
- //
767
-
768
-
769
-
770
-
771
- /* harmony default export */ var mainvue_type_script_lang_js = ({
772
- name: 'CyTabDialog',
773
- components: {
774
- ElDialog: dialog["default"]
775
- },
776
- props: {
777
- // 是否显示 Dialog,支持 .sync 修饰符
778
- visible: {
779
- type: Boolean,
780
- default: false
781
- },
782
- // Dialog 的标题,也可通过具名 slot
783
- title: {
784
- type: String,
785
- default: ''
786
- },
787
- // Dialog 的宽度
788
- width: {
789
- type: String,
790
- default: '50%'
791
- },
792
- // 是否为全屏 Dialog
793
- fullscreen: {
794
- type: Boolean,
795
- default: false
796
- },
797
- // Dialog CSS 中的 margin-top 值
798
- top: {
799
- type: String,
800
- default: '6vh'
801
- },
802
- // 是否需要遮罩层
803
- modal: {
804
- type: Boolean,
805
- default: true
806
- },
807
- // 遮罩层是否插入至 body 元素上,若为 false,则遮罩层会插入至 Dialog 的父元素上
808
- appendToBody: {
809
- type: Boolean,
810
- default: false
811
- },
812
- // 是否在 Dialog 出现时将 body或上层 滚动锁定
813
- lockScroll: {
814
- type: Boolean,
815
- default: true
816
- },
817
- // Dialog 的自定义类名
818
- customClass: {
819
- type: String,
820
- default: ''
821
- },
822
- // 是否可以通过点击 modal 关闭 Dialog
823
- closeOnClickModal: {
824
- type: Boolean,
825
- default: false
826
- },
827
- // 是否可以通过按下 ESC 关闭 Dialog
828
- closeOnPressEscape: {
829
- type: Boolean,
830
- default: true
831
- },
832
- // 是否显示关闭按钮
833
- showClose: {
834
- type: Boolean,
835
- default: true
836
- },
837
- // 是否对头部和底部采用居中布局
838
- center: {
839
- type: Boolean,
840
- default: false
841
- },
842
- // 关闭时销毁 Dialog 中的元素
843
- destroyOnClose: {
844
- type: Boolean,
845
- default: false
846
- },
847
- // 是否放到tagsView中,即当前app-views下面,此属性true时,appendToBody无效
848
- appendToTagsView: {
849
- type: Boolean,
850
- default: false
851
- },
852
- // 对话框是否可拖拽
853
- isDrag: {
854
- type: Boolean,
855
- default: true
856
- },
857
- // 关闭前的回调,会暂停 Dialog 的关闭
858
- beforeClose: {
859
- type: Function
860
- }
861
- },
862
- data: function data() {
863
- return {
864
- // 判断dialog是否已经放到对应的div下
865
- rendered: false,
866
- modelZIndex: 1000,
867
- modelHeight: 0,
868
- // 当前app-views的dom元素
869
- parentDom: null,
870
- // 当前el-dialog的dom元素
871
- elDialogDom: null
872
- };
873
- },
874
-
875
- watch: {
876
- visible: {
877
- immediate: true,
878
- handler: function handler(val) {
879
- var _this = this;
880
-
881
- if (val) {
882
- this.$emit('open');
883
- external_vue_default.a.nextTick(function () {
884
- var dom = _this.$el;
885
- // 首次打开
886
- if (!_this.rendered) {
887
- _this.rendered = true;
888
- if (_this.appendToTagsView) {
889
- // 将当前dialog挪到当前app-views里面 app-container
890
- _this.parentDom = dom.closest('.app-container');
891
- if (!_this.parentDom) _this.parentDom = document.body;
892
- _this.parentDom.append(dom);
893
- } else if (_this.appendToBody) {
894
- // 将当前dialog挪到当前body里面
895
- _this.parentDom = document.body;
896
- _this.parentDom.append(dom);
897
- }
898
- // 添加键盘监听事件
899
- if (_this.closeOnPressEscape) {
900
- document.addEventListener('keydown', _this.escKeyDown);
901
- }
902
- }
903
-
904
- setTimeout(function () {
905
- if (_this.parentDom) _this.modelHeight = _this.parentDom.scrollHeight + 'px';
906
- // 当前VDialog不在body中时
907
- if (!_this.parentDom || _this.parentDom.tagName.toUpperCase() !== 'BODY') {
908
- // 获取el-dialog的宽度,如果大于app-views的宽度,则el-dialog不居中显示
909
- var elDialogWidth = dom.getElementsByClassName('el-dialog')[0].clientWidth;
910
- if (!_this.parentDom || elDialogWidth < _this.parentDom.clientWidth) {
911
- dom.getElementsByClassName('el-dialog')[0].style.left = '50%';
912
- dom.getElementsByClassName('el-dialog')[0].style.transform = 'translateX(-50%)';
913
- } else {
914
- dom.getElementsByClassName('el-dialog')[0].style.left = '0';
915
- }
916
- }
917
- dom.getElementsByClassName('el-dialog')[0].style.marginTop = _this.top;
918
- }, 50);
919
-
920
- // 获取el-dialog的z-index,赋值给model,用于处理model的层级问题
921
- _this.elDialogDom = dom.children[1];
922
- setTimeout(function () {
923
- _this.modelZIndex = _this.elDialogDom.style.zIndex;
924
- }, 50);
925
- });
926
- } else {
927
- // immediate=true时,首次打开不需要触发close事件
928
- if (this.rendered) this.$emit('close');
929
- }
930
- }
931
- }
932
- },
933
- methods: {
934
- handleOpen: function handleOpen() {
935
- this.$emit('open');
936
- },
937
- handleOpened: function handleOpened() {
938
- this.$emit('opened');
939
- },
940
- handleClose: function handleClose() {
941
- this.$emit('update:visible', false);
942
- this.$emit('close');
943
- },
944
- handleClosed: function handleClosed() {
945
- this.$emit('closed');
946
- },
947
-
948
-
949
- /**
950
- * 监听esc键
951
- */
952
- escKeyDown: function escKeyDown(event) {
953
- if (event.keyCode === 27) {
954
- // 获取body下的直接子节点中的已打开的vDialog
955
- var bodyVDialogDomArr = [];
956
- var bodyChildrenArr = document.body.childNodes;
957
- for (var i = 0; i < bodyChildrenArr.length; i++) {
958
- var item = bodyChildrenArr[i];
959
- if (item.tagName && item.tagName.toUpperCase() === 'DIV' && item.className && item.className.split(' ').includes('cy-tab-dialog-opened')) {
960
- bodyVDialogDomArr.push(item);
961
- }
962
- }
963
- // 判断body中是否有已打开的vDialog,如果有,优先关闭body下的vDialog
964
- if (bodyVDialogDomArr.length > 0) {
965
- // 获取当前cy-tab-dialog在当前body中的下标
966
- var curDomIndex = [].indexOf.call(bodyVDialogDomArr, this.$el);
967
- if (curDomIndex === bodyVDialogDomArr.length - 1) {
968
- this.handleClose();
969
- }
970
- } else if (document.getElementById('tags-view-container') && this.parentDom.parentElement.getAttribute('include_name')) {
971
- // 获取当前app-views对应的include_name值
972
- var includeName = this.parentDom.parentElement.getAttribute('include_name');
973
- // 根据includeName获取tagsView中的tag标签页
974
- var tagDom = document.getElementById('tags-view-container').querySelectorAll('[include_name=' + includeName + ']');
975
- if (tagDom && tagDom[0]) {
976
- // 判断此标签页是否为选中状态,只有选中状态中的vDialog才可以进行关闭
977
- if (tagDom[0].className.split(' ').includes('active')) {
978
- var vDialogList = this.parentDom.getElementsByClassName('cy-tab-dialog-opened');
979
- // 获取当前cy-tab-dialog在当前app-views中的下标
980
- var _curDomIndex = [].indexOf.call(vDialogList, this.$el);
981
- if (_curDomIndex === vDialogList.length - 1) {
982
- this.handleClose();
983
- }
984
- }
985
- }
986
- } else {
987
- this.handleClose();
988
- }
989
- }
990
- }
991
- },
992
- beforeDestroy: function beforeDestroy() {
993
- document.removeEventListener('keydown', this.escKeyDown);
994
- }
995
- });
996
- // CONCATENATED MODULE: ./packages/cy/tabDialog/src/main.vue?vue&type=script&lang=js
997
- /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
998
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
999
- var componentNormalizer = __webpack_require__(0);
1000
-
1001
- // CONCATENATED MODULE: ./packages/cy/tabDialog/src/main.vue
1002
-
1003
-
1004
-
1005
-
1006
-
1007
- /* normalize component */
1008
-
1009
- var component = Object(componentNormalizer["a" /* default */])(
1010
- src_mainvue_type_script_lang_js,
1011
- render,
1012
- staticRenderFns,
1013
- false,
1014
- null,
1015
- null,
1016
- null
1017
-
1018
- )
1019
-
1020
- /* harmony default export */ var main = (component.exports);
1021
- // CONCATENATED MODULE: ./packages/cy/tabDialog/src/dialog/drag.js
1022
- /**
1023
- * v-dialogDrag 弹窗拖拽
1024
- * Copyright (c) 2019 ruoyi
1025
- */
1026
-
1027
- /* harmony default export */ var drag = ({
1028
- bind: function bind(el, binding, vnode, oldVnode) {
1029
- var value = binding.value;
1030
- if (value === false) return;
1031
- // 获取拖拽内容头部
1032
- var dialogHeaderEl = el.querySelector('.el-dialog__header');
1033
- var dragDom = el.querySelector('.el-dialog');
1034
- dialogHeaderEl.style.cursor = 'move';
1035
- // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
1036
- var sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
1037
- dragDom.style.position = 'absolute';
1038
- dragDom.style.marginTop = 0;
1039
- var width = dragDom.style.width;
1040
- if (width.includes('%')) {
1041
- width = +document.body.clientWidth * (+width.replace(/\%/g, '') / 100);
1042
- } else {
1043
- width = +width.replace(/\px/g, '');
1044
- }
1045
- dragDom.style.left = (document.body.clientWidth - width) / 2 + 'px';
1046
- // 鼠标按下事件
1047
- dialogHeaderEl.onmousedown = function (e) {
1048
- // 鼠标按下,计算当前元素距离可视区的距离 (鼠标点击位置距离可视窗口的距离)
1049
- var disX = e.clientX - dialogHeaderEl.offsetLeft;
1050
- var disY = e.clientY - dialogHeaderEl.offsetTop;
1051
-
1052
- // 获取到的值带px 正则匹配替换
1053
- var styL = void 0,
1054
- styT = void 0;
1055
-
1056
- // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
1057
- if (sty.left.includes('%')) {
1058
- styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
1059
- styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
1060
- } else {
1061
- styL = +sty.left.replace(/\px/g, '');
1062
- styT = +sty.top.replace(/\px/g, '');
1063
- }
1064
-
1065
- // 鼠标拖拽事件
1066
- document.onmousemove = function (e) {
1067
- // 通过事件委托,计算移动的距离 (开始拖拽至结束拖拽的距离)
1068
- var l = e.clientX - disX;
1069
- var t = e.clientY - disY;
1070
-
1071
- var finallyL = l + styL;
1072
- var finallyT = t + styT;
1073
-
1074
- // 移动当前元素
1075
- dragDom.style.left = finallyL + 'px';
1076
- dragDom.style.top = finallyT + 'px';
1077
- };
1078
-
1079
- document.onmouseup = function (e) {
1080
- document.onmousemove = null;
1081
- document.onmouseup = null;
1082
- };
1083
- };
1084
- }
1085
- });
1086
- // CONCATENATED MODULE: ./packages/cy/tabDialog/src/dialog/dragWidth.js
1087
- /**
1088
- * v-dialogDragWidth 可拖动弹窗宽度(右侧边)
1089
- * Copyright (c) 2019 ruoyi
1090
- */
1091
-
1092
- /* harmony default export */ var dragWidth = ({
1093
- bind: function bind(el) {
1094
- var dragDom = el.querySelector('.el-dialog');
1095
- var lineEl = document.createElement('div');
1096
- lineEl.style = 'width: 5px; background: inherit; height: 80%; position: absolute; right: 0; top: 0; bottom: 0; margin: auto; z-index: 1; cursor: w-resize;';
1097
- lineEl.addEventListener('mousedown', function (e) {
1098
- // 鼠标按下,计算当前元素距离可视区的距离
1099
- var disX = e.clientX - el.offsetLeft;
1100
- // 当前宽度
1101
- var curWidth = dragDom.offsetWidth;
1102
- document.onmousemove = function (e) {
1103
- e.preventDefault(); // 移动时禁用默认事件
1104
- // 通过事件委托,计算移动的距离
1105
- var l = e.clientX - disX;
1106
- dragDom.style.width = curWidth + l + 'px';
1107
- };
1108
- document.onmouseup = function (e) {
1109
- document.onmousemove = null;
1110
- document.onmouseup = null;
1111
- };
1112
- }, false);
1113
- dragDom.appendChild(lineEl);
1114
- }
1115
- });
1116
- // CONCATENATED MODULE: ./packages/cy/tabDialog/src/dialog/dragHeight.js
1117
- /**
1118
- * v-dialogDragWidth 可拖动弹窗高度(右下角)
1119
- * Copyright (c) 2019 ruoyi
1120
- */
1121
-
1122
- /* harmony default export */ var dragHeight = ({
1123
- bind: function bind(el) {
1124
- var dragDom = el.querySelector('.el-dialog');
1125
- var lineEl = document.createElement('div');
1126
- lineEl.style = 'width: 6px; background: inherit; height: 10px; position: absolute; right: 0; bottom: 0; margin: auto; z-index: 1; cursor: nwse-resize;';
1127
- lineEl.addEventListener('mousedown', function (e) {
1128
- // 鼠标按下,计算当前元素距离可视区的距离
1129
- var disX = e.clientX - el.offsetLeft;
1130
- var disY = e.clientY - el.offsetTop;
1131
- // 当前宽度 高度
1132
- var curWidth = dragDom.offsetWidth;
1133
- var curHeight = dragDom.offsetHeight;
1134
- document.onmousemove = function (e) {
1135
- e.preventDefault(); // 移动时禁用默认事件
1136
- // 通过事件委托,计算移动的距离
1137
- var xl = e.clientX - disX;
1138
- var yl = e.clientY - disY;
1139
- dragDom.style.width = curWidth + xl + 'px';
1140
- dragDom.style.height = curHeight + yl + 'px';
1141
- };
1142
- document.onmouseup = function (e) {
1143
- document.onmousemove = null;
1144
- document.onmouseup = null;
1145
- };
1146
- }, false);
1147
- dragDom.appendChild(lineEl);
1148
- }
1149
- });
1150
- // CONCATENATED MODULE: ./packages/cy/tabDialog/index.js
1151
-
1152
-
1153
-
1154
-
1155
-
1156
- var tabDialog_TabDialogDirective = function TabDialogDirective(Vue) {
1157
- // 注册指令
1158
- Vue.directive('dialogDrag', drag);
1159
- Vue.directive('dialogDragWidth', dragWidth);
1160
- Vue.directive('dialogDragHeight', dragHeight);
1161
- };
1162
-
1163
- /* istanbul ignore next */
1164
- main.install = function (Vue) {
1165
- // 注册组件
1166
- Vue.component(main.name, main);
1167
- // 注册指令
1168
- Vue.directive('dialogDrag', drag);
1169
- Vue.directive('dialogDragWidth', dragWidth);
1170
- Vue.directive('dialogDragHeight', dragHeight);
1171
- };
1172
-
1173
- /* harmony default export */ var tabDialog = __webpack_exports__["default"] = (main);
1174
-
1175
- /***/ }),
1176
-
1177
- /***/ 8:
1178
- /***/ (function(module, exports) {
1179
-
1180
- module.exports = require("vue");
1181
-
1182
- /***/ })
1183
-
1184
- /******/ });