iov-design 2.15.44 → 2.15.46

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.
@@ -791,11 +791,20 @@ var render = function() {
791
791
  false
792
792
  )
793
793
  ),
794
- _vm._t("range-separator", [
795
- _c("span", { staticClass: "el-range-separator" }, [
796
- _vm._v(_vm._s(_vm.rangeSeparator))
797
- ])
798
- ]),
794
+ _vm.$slots["range-separator"]
795
+ ? _c(
796
+ "span",
797
+ { staticClass: "el-range-separator" },
798
+ [_vm._t("range-separator")],
799
+ 2
800
+ )
801
+ : _vm.rangeSeparator
802
+ ? _c("span", { staticClass: "el-range-separator" }, [
803
+ _vm._v("\n " + _vm._s(_vm.rangeSeparator) + "\n ")
804
+ ])
805
+ : _c("span", { staticClass: "el-range-separator" }, [
806
+ _c("i", { staticClass: "iov-icon-arrow-half-right" })
807
+ ]),
799
808
  _c(
800
809
  "input",
801
810
  _vm._b(
@@ -832,8 +841,7 @@ var render = function() {
832
841
  class: ["el-input__icon", "el-range__icon", _vm.triggerClass]
833
842
  })
834
843
  : _vm._e()
835
- ],
836
- 2
844
+ ]
837
845
  )
838
846
  }
839
847
  var staticRenderFns = []
@@ -960,6 +968,12 @@ var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
960
968
  //
961
969
  //
962
970
  //
971
+ //
972
+ //
973
+ //
974
+ //
975
+ //
976
+ //
963
977
 
964
978
 
965
979
 
@@ -1267,7 +1281,7 @@ var validator = function validator(val) {
1267
1281
  defaultValue: {},
1268
1282
  defaultTime: {},
1269
1283
  rangeSeparator: {
1270
- default: '-'
1284
+ default: ''
1271
1285
  },
1272
1286
  pickerOptions: {},
1273
1287
  unlinkPanels: Boolean,
package/lib/dialog.js CHANGED
@@ -291,6 +291,7 @@ var render = function() {
291
291
  ? _c(
292
292
  "div",
293
293
  {
294
+ ref: "body",
294
295
  staticClass: "el-dialog__body",
295
296
  class:
296
297
  _vm.type === "form"
@@ -304,7 +305,7 @@ var render = function() {
304
305
  _vm.$slots.footer
305
306
  ? _c(
306
307
  "div",
307
- { staticClass: "el-dialog__footer" },
308
+ { ref: "footer", staticClass: "el-dialog__footer" },
308
309
  [_vm._t("footer")],
309
310
  2
310
311
  )
@@ -440,7 +441,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
440
441
 
441
442
  top: {
442
443
  type: String,
443
- default: '15vh'
444
+ default: '50%'
444
445
  },
445
446
  beforeClose: Function,
446
447
  center: {
@@ -489,7 +490,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
489
490
  style: function style() {
490
491
  var style = {};
491
492
  if (!this.fullscreen) {
492
- style.marginTop = this.top;
493
+ style.top = this.top;
493
494
  if (this.width) {
494
495
  style.width = this.width;
495
496
  }
@@ -529,10 +530,52 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
529
530
  this.broadcast('ElDropdownMenu', 'updatePopper');
530
531
  },
531
532
  afterEnter: function afterEnter() {
533
+ this.onDialogOpened();
532
534
  this.$emit('opened');
533
535
  },
534
536
  afterLeave: function afterLeave() {
535
537
  this.$emit('closed');
538
+ },
539
+ onDialogOpened: function onDialogOpened() {
540
+ var _this2 = this;
541
+
542
+ this.$nextTick(function () {
543
+ _this2.checkOverflow();
544
+ _this2.observeContentChanges();
545
+ });
546
+ },
547
+
548
+
549
+ // 检查内容是否超过body高度
550
+ checkOverflow: function checkOverflow() {
551
+ var body = this.$refs.body;
552
+ var footer = this.$refs.footer;
553
+ if (!body || !footer) return;
554
+ if (body.scrollHeight > body.clientHeight) {
555
+ footer.classList.add('el-dialog__footer--shadow');
556
+ } else {
557
+ footer.classList.remove('el-dialog__footer--shadow');
558
+ }
559
+ },
560
+
561
+ // 监听节点变化
562
+ observeContentChanges: function observeContentChanges() {
563
+ var _this3 = this;
564
+
565
+ var body = this.$refs.body;
566
+ if (!body) return;
567
+ if (this._mutationObserver) {
568
+ this._mutationObserver.disconnect();
569
+ }
570
+ this._mutationObserver = new MutationObserver(function () {
571
+ _this3.checkOverflow();
572
+ });
573
+ // 监听子节点及文本节点的内容变化
574
+ this._mutationObserver.observe(body, {
575
+ childList: true,
576
+ subtree: true,
577
+ characterData: true
578
+ });
536
579
  }
537
580
  },
538
581
 
@@ -550,6 +593,9 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
550
593
  if (this.appendToBody && this.$el && this.$el.parentNode) {
551
594
  this.$el.parentNode.removeChild(this.$el);
552
595
  }
596
+ if (this._mutationObserver) {
597
+ this._mutationObserver.disconnect();
598
+ }
553
599
  }
554
600
  });
555
601
  // CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=script&lang=js&
package/lib/empty.js CHANGED
@@ -296,7 +296,10 @@ var IMG = {
296
296
  type: Number,
297
297
  default: 1
298
298
  },
299
- imageSize: Number,
299
+ imageSize: {
300
+ type: Number,
301
+ default: 140
302
+ },
300
303
  description: {
301
304
  type: String,
302
305
  default: ''