iov-design 2.15.56 → 2.15.58

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.
@@ -955,6 +955,7 @@ var util_ = __webpack_require__(2);
955
955
  'el-select',
956
956
  {
957
957
  attrs: {
958
+ fill: true,
958
959
  value: this.$parent.internalPageSize,
959
960
  popperClass: this.$parent.popperClass || '',
960
961
  size: this.$parent.small ? 'mini' : 'small',
@@ -5034,9 +5035,13 @@ var shared_ = __webpack_require__(19);
5034
5035
  var isButton = pendantEl.querySelector('.el-button');
5035
5036
  if (isSelect) {
5036
5037
  Object(dom_["addClass"])(pendantEl, 'is-select');
5038
+ } else {
5039
+ Object(dom_["removeClass"])(pendantEl, 'is-select');
5037
5040
  }
5038
5041
  if (isButton) {
5039
5042
  Object(dom_["addClass"])(pendantEl, 'is-button');
5043
+ } else {
5044
+ Object(dom_["removeClass"])(pendantEl, 'is-button');
5040
5045
  }
5041
5046
  },
5042
5047
  calcIconOffset: function calcIconOffset(place) {
@@ -7624,6 +7629,7 @@ var selectvue_type_template_id_0e4aade6_render = function() {
7624
7629
  ],
7625
7630
  staticClass: "el-select",
7626
7631
  class: [
7632
+ _vm.fill ? "is-fill" : "",
7627
7633
  _vm.selectSize ? "el-select--" + _vm.selectSize : "",
7628
7634
  _vm.selectDisabled ? "is-disabled" : ""
7629
7635
  ],
@@ -7641,6 +7647,7 @@ var selectvue_type_template_id_0e4aade6_render = function() {
7641
7647
  {
7642
7648
  ref: "tags",
7643
7649
  staticClass: "el-select__tags",
7650
+ class: { "is-focus": _vm.visible },
7644
7651
  style: {
7645
7652
  "max-width": _vm.inputWidth - 32 + "px",
7646
7653
  width: _vm.inputWidth - _vm.tagsLeft - 32 + "px",
@@ -7664,7 +7671,7 @@ var selectvue_type_template_id_0e4aade6_render = function() {
7664
7671
  closable: !_vm.selectDisabled,
7665
7672
  size: _vm.collapseTagSize,
7666
7673
  hit: item.hitState,
7667
- maxWidth: _vm.multipleTagMaxWidth,
7674
+ maxWidth: _vm.maxWidth,
7668
7675
  type: "info",
7669
7676
  "disable-transitions": ""
7670
7677
  },
@@ -7685,10 +7692,13 @@ var selectvue_type_template_id_0e4aade6_render = function() {
7685
7692
  : _vm._e()
7686
7693
  ]
7687
7694
  }),
7688
- _vm.selected.length > 1
7695
+ (_vm.selected.length > 1 &&
7696
+ _vm.selected.length > _vm.multipleLimitShow) ||
7697
+ (_vm.selected.length > 0 && _vm.collapseTagsFixed)
7689
7698
  ? _c(
7690
7699
  "el-tag",
7691
7700
  {
7701
+ ref: "tagsCount",
7692
7702
  staticClass: "el-select__tags-count",
7693
7703
  class: {
7694
7704
  "el-select__tags-count-fixed":
@@ -7708,7 +7718,12 @@ var selectvue_type_template_id_0e4aade6_render = function() {
7708
7718
  [
7709
7719
  _vm._v(
7710
7720
  _vm._s(_vm.collapseTagsFixed ? "" : "+") +
7711
- _vm._s(_vm.selected.length - 1) +
7721
+ _vm._s(
7722
+ _vm.collapseTagsFixed
7723
+ ? _vm.selected.length
7724
+ : _vm.selected.length -
7725
+ _vm.multipleLimitShow
7726
+ ) +
7712
7727
  _vm._s(_vm.collapseTagsSuffix)
7713
7728
  )
7714
7729
  ]
@@ -7736,7 +7751,7 @@ var selectvue_type_template_id_0e4aade6_render = function() {
7736
7751
  closable: !item.disabled && !_vm.selectDisabled,
7737
7752
  size: _vm.collapseTagSize,
7738
7753
  hit: item.hitState,
7739
- maxWidth: _vm.multipleTagMaxWidth,
7754
+ maxWidth: _vm.maxWidth,
7740
7755
  type: "info",
7741
7756
  "disable-transitions": ""
7742
7757
  },
@@ -8729,6 +8744,8 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
8729
8744
  //
8730
8745
  //
8731
8746
  //
8747
+ //
8748
+ //
8732
8749
 
8733
8750
 
8734
8751
 
@@ -8772,6 +8789,18 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
8772
8789
 
8773
8790
 
8774
8791
  computed: {
8792
+ // maxWidth() {
8793
+ // if (this.collapseTags) {
8794
+ // if (this.multipleTagMaxWidth && this.multipleTagMaxWidth !== 'none') {
8795
+ // return this.multipleTagMaxWidth;
8796
+ // }
8797
+ // const tagsCountWidth = this.$refs.tagsCount && this.$refs.tagsCount.$el.clientWidth || 0;
8798
+ // const count = this.selected.length <= this.multipleLimitShow ? this.selected.length : this.multipleLimitShow;
8799
+ // return Math.floor((this.inputWidth - this.tagsLeft - 32 - tagsCountWidth - 20 - count * 16) / count) + 'px';
8800
+ // } else {
8801
+ // return this.multipleTagMaxWidth || 'none';
8802
+ // }
8803
+ // },
8775
8804
  _elFormItemSize: function _elFormItemSize() {
8776
8805
  return (this.elFormItem || {}).elFormItemSize;
8777
8806
  },
@@ -8911,7 +8940,8 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
8911
8940
  popperAppendToBody: {
8912
8941
  type: Boolean,
8913
8942
  default: true
8914
- }
8943
+ },
8944
+ fill: Boolean
8915
8945
  },
8916
8946
 
8917
8947
  data: function data() {
@@ -8938,7 +8968,8 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
8938
8968
  menuVisibleOnFocus: false,
8939
8969
  isOnComposition: false,
8940
8970
  isSilentBlur: false,
8941
- tagsLeft: 0
8971
+ tagsLeft: 0,
8972
+ maxWidth: 'none'
8942
8973
  };
8943
8974
  },
8944
8975
 
@@ -8966,6 +8997,7 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
8966
8997
  this.query = '';
8967
8998
  this.handleQueryChange(this.query);
8968
8999
  }
9000
+ this.getMaxWidth();
8969
9001
  }
8970
9002
  this.setSelected();
8971
9003
  if (this.filterable && !this.multiple) {
@@ -9051,19 +9083,35 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9051
9083
  },
9052
9084
 
9053
9085
  methods: {
9086
+ getMaxWidth: function getMaxWidth() {
9087
+ var _this5 = this;
9088
+
9089
+ this.$nextTick(function () {
9090
+ if (_this5.collapseTags) {
9091
+ if (_this5.multipleTagMaxWidth && _this5.multipleTagMaxWidth !== 'none') {
9092
+ _this5.maxWidth = _this5.multipleTagMaxWidth;
9093
+ }
9094
+ var tagsCountWidth = _this5.$refs.tagsCount && _this5.$refs.tagsCount.$el.clientWidth || 0;
9095
+ var count = _this5.selected.length <= _this5.multipleLimitShow ? _this5.selected.length : _this5.multipleLimitShow;
9096
+ _this5.maxWidth = Math.floor((_this5.inputWidth - _this5.tagsLeft - 32 - tagsCountWidth - 20 - count * 16) / count) + 'px';
9097
+ } else {
9098
+ _this5.maxWidth = _this5.multipleTagMaxWidth || 'none';
9099
+ }
9100
+ });
9101
+ },
9054
9102
  handleNavigate: function handleNavigate(direction) {
9055
9103
  if (this.isOnComposition) return;
9056
9104
 
9057
9105
  this.navigateOptions(direction);
9058
9106
  },
9059
9107
  handleComposition: function handleComposition(event) {
9060
- var _this5 = this;
9108
+ var _this6 = this;
9061
9109
 
9062
9110
  var text = event.target.value;
9063
9111
  if (event.type === 'compositionend') {
9064
9112
  this.isOnComposition = false;
9065
9113
  this.$nextTick(function (_) {
9066
- return _this5.handleQueryChange(text);
9114
+ return _this6.handleQueryChange(text);
9067
9115
  });
9068
9116
  } else {
9069
9117
  var lastCharacter = text[text.length - 1] || '';
@@ -9071,7 +9119,7 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9071
9119
  }
9072
9120
  },
9073
9121
  handleQueryChange: function handleQueryChange(val) {
9074
- var _this6 = this;
9122
+ var _this7 = this;
9075
9123
 
9076
9124
  if (this.previousQuery === val || this.isOnComposition) return;
9077
9125
  if (this.previousQuery === null && (typeof this.filterMethod === 'function' || typeof this.remoteMethod === 'function')) {
@@ -9080,15 +9128,15 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9080
9128
  }
9081
9129
  this.previousQuery = val;
9082
9130
  this.$nextTick(function () {
9083
- if (_this6.visible) _this6.broadcast('ElSelectDropdown', 'updatePopper');
9131
+ if (_this7.visible) _this7.broadcast('ElSelectDropdown', 'updatePopper');
9084
9132
  });
9085
9133
  this.hoverIndex = -1;
9086
9134
  if (this.multiple && this.filterable) {
9087
9135
  this.$nextTick(function () {
9088
- var length = _this6.$refs.input.value.length * 15 + 20;
9089
- _this6.inputLength = _this6.collapseTags ? Math.min(50, length) : length;
9090
- _this6.managePlaceholder();
9091
- _this6.resetInputHeight();
9136
+ var length = _this7.$refs.input.value.length * 15 + 20;
9137
+ _this7.inputLength = _this7.collapseTags ? Math.min(50, length) : length;
9138
+ _this7.managePlaceholder();
9139
+ _this7.resetInputHeight();
9092
9140
  });
9093
9141
  }
9094
9142
  if (this.remote && typeof this.remoteMethod === 'function') {
@@ -9115,10 +9163,10 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9115
9163
  this.$refs.scrollbar && this.$refs.scrollbar.handleScroll();
9116
9164
  },
9117
9165
  handleMenuEnter: function handleMenuEnter() {
9118
- var _this7 = this;
9166
+ var _this8 = this;
9119
9167
 
9120
9168
  this.$nextTick(function () {
9121
- return _this7.scrollToOption(_this7.selected);
9169
+ return _this8.scrollToOption(_this8.selected);
9122
9170
  });
9123
9171
  },
9124
9172
  emitChange: function emitChange(val) {
@@ -9152,7 +9200,7 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9152
9200
  return newOption;
9153
9201
  },
9154
9202
  setSelected: function setSelected() {
9155
- var _this8 = this;
9203
+ var _this9 = this;
9156
9204
 
9157
9205
  if (!this.multiple) {
9158
9206
  var option = this.getOption(this.value);
@@ -9170,12 +9218,12 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9170
9218
  var result = [];
9171
9219
  if (Array.isArray(this.value)) {
9172
9220
  this.value.forEach(function (value) {
9173
- result.push(_this8.getOption(value));
9221
+ result.push(_this9.getOption(value));
9174
9222
  });
9175
9223
  }
9176
9224
  this.selected = result;
9177
9225
  this.$nextTick(function () {
9178
- _this8.resetInputHeight();
9226
+ _this9.resetInputHeight();
9179
9227
  });
9180
9228
  },
9181
9229
  handleFocus: function handleFocus(event) {
@@ -9196,13 +9244,13 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9196
9244
  this.$refs.reference.blur();
9197
9245
  },
9198
9246
  handleBlur: function handleBlur(event) {
9199
- var _this9 = this;
9247
+ var _this10 = this;
9200
9248
 
9201
9249
  setTimeout(function () {
9202
- if (_this9.isSilentBlur) {
9203
- _this9.isSilentBlur = false;
9250
+ if (_this10.isSilentBlur) {
9251
+ _this10.isSilentBlur = false;
9204
9252
  } else {
9205
- _this9.$emit('blur', event);
9253
+ _this10.$emit('blur', event);
9206
9254
  }
9207
9255
  }, 50);
9208
9256
  this.softFocus = false;
@@ -9243,15 +9291,15 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9243
9291
  }
9244
9292
  },
9245
9293
  resetTagsLeft: function resetTagsLeft() {
9246
- var _this10 = this;
9294
+ var _this11 = this;
9247
9295
 
9248
9296
  this.$nextTick(function () {
9249
- var prefixLabel = _this10.$el.querySelector('.el-input-group__prefix-label');
9250
- var prefix = _this10.$el.querySelector('.el-input__prefix');
9251
- var inputInner = _this10.$el.querySelector('.el-input__inner');
9297
+ var prefixLabel = _this11.$el.querySelector('.el-input-group__prefix-label');
9298
+ var prefix = _this11.$el.querySelector('.el-input__prefix');
9299
+ var inputInner = _this11.$el.querySelector('.el-input__inner');
9252
9300
  var prefixLabelWidth = prefixLabel && Math.round(prefixLabel.getBoundingClientRect().width) || 0;
9253
9301
  var inputPaddingLeft = prefixLabel || prefix ? Math.round(window.getComputedStyle(inputInner).paddingLeft.replace(/px/, '')) : 0;
9254
- _this10.tagsLeft = prefixLabelWidth + inputPaddingLeft;
9302
+ _this11.tagsLeft = prefixLabel ? prefixLabelWidth + inputPaddingLeft - 4 : 0;
9255
9303
  });
9256
9304
  },
9257
9305
  resetInputState: function resetInputState(e) {
@@ -9260,42 +9308,42 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9260
9308
  this.resetInputHeight();
9261
9309
  },
9262
9310
  resetInputHeight: function resetInputHeight() {
9263
- var _this11 = this;
9311
+ var _this12 = this;
9264
9312
 
9265
9313
  if (this.collapseTags && !this.filterable) return;
9266
9314
  this.$nextTick(function () {
9267
- if (!_this11.$refs.reference) return;
9268
- var inputInner = _this11.$el.querySelector('.el-input__inner');
9269
- var groupPrefix = _this11.$el.querySelector('.el-input-group--prefix');
9315
+ if (!_this12.$refs.reference) return;
9316
+ var inputInner = _this12.$el.querySelector('.el-input__inner');
9317
+ var groupPrefix = _this12.$el.querySelector('.el-input-group--prefix');
9270
9318
  var input = groupPrefix || inputInner;
9271
- var tags = _this11.$refs.tags;
9319
+ var tags = _this12.$refs.tags;
9272
9320
  var tagsHeight = tags ? Math.round(tags.getBoundingClientRect().height) : 0;
9273
- var sizeInMap = _this11.initialInputHeight || 36;
9274
- input.style.height = _this11.selected.length === 0 ? sizeInMap + 'px' : Math.max(tags ? tagsHeight + (tagsHeight > sizeInMap ? 6 : 0) : 0, sizeInMap) + 'px';
9275
- if (_this11.visible && _this11.emptyText !== false) {
9276
- _this11.broadcast('ElSelectDropdown', 'updatePopper');
9321
+ var sizeInMap = _this12.initialInputHeight || 36;
9322
+ input.style.height = _this12.selected.length === 0 ? sizeInMap + 'px' : Math.max(tags ? tagsHeight + (tagsHeight > sizeInMap ? 6 : 0) : 0, sizeInMap) + 'px';
9323
+ if (_this12.visible && _this12.emptyText !== false) {
9324
+ _this12.broadcast('ElSelectDropdown', 'updatePopper');
9277
9325
  }
9278
9326
  });
9279
9327
  },
9280
9328
  resetHoverIndex: function resetHoverIndex() {
9281
- var _this12 = this;
9329
+ var _this13 = this;
9282
9330
 
9283
9331
  setTimeout(function () {
9284
- if (!_this12.multiple) {
9285
- _this12.hoverIndex = _this12.options.indexOf(_this12.selected);
9332
+ if (!_this13.multiple) {
9333
+ _this13.hoverIndex = _this13.options.indexOf(_this13.selected);
9286
9334
  } else {
9287
- if (_this12.selected.length > 0) {
9288
- _this12.hoverIndex = Math.min.apply(null, _this12.selected.map(function (item) {
9289
- return _this12.options.indexOf(item);
9335
+ if (_this13.selected.length > 0) {
9336
+ _this13.hoverIndex = Math.min.apply(null, _this13.selected.map(function (item) {
9337
+ return _this13.options.indexOf(item);
9290
9338
  }));
9291
9339
  } else {
9292
- _this12.hoverIndex = -1;
9340
+ _this13.hoverIndex = -1;
9293
9341
  }
9294
9342
  }
9295
9343
  }, 300);
9296
9344
  },
9297
9345
  handleOptionSelect: function handleOptionSelect(option, byClick) {
9298
- var _this13 = this;
9346
+ var _this14 = this;
9299
9347
 
9300
9348
  if (this.multiple) {
9301
9349
  var value = (this.value || []).slice();
@@ -9322,7 +9370,7 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9322
9370
  // this.setSoftFocus();
9323
9371
  if (this.visible) return;
9324
9372
  this.$nextTick(function () {
9325
- _this13.scrollToOption(option);
9373
+ _this14.scrollToOption(option);
9326
9374
  });
9327
9375
  },
9328
9376
  setSoftFocus: function setSoftFocus() {
@@ -9455,7 +9503,7 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9455
9503
  },
9456
9504
 
9457
9505
  created: function created() {
9458
- var _this14 = this;
9506
+ var _this15 = this;
9459
9507
 
9460
9508
  this.cachedPlaceHolder = this.currentPlaceholder = this.propPlaceholder;
9461
9509
  if (this.multiple && !Array.isArray(this.value)) {
@@ -9466,18 +9514,18 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9466
9514
  }
9467
9515
 
9468
9516
  this.debouncedOnInputChange = debounce_default()(this.debounce, function () {
9469
- _this14.onInputChange();
9517
+ _this15.onInputChange();
9470
9518
  });
9471
9519
 
9472
9520
  this.debouncedQueryChange = debounce_default()(this.debounce, function (e) {
9473
- _this14.handleQueryChange(e.target.value);
9521
+ _this15.handleQueryChange(e.target.value);
9474
9522
  });
9475
9523
 
9476
9524
  this.$on('handleOptionClick', this.handleOptionSelect);
9477
9525
  this.$on('setSelected', this.setSelected);
9478
9526
  },
9479
9527
  mounted: function mounted() {
9480
- var _this15 = this;
9528
+ var _this16 = this;
9481
9529
 
9482
9530
  if (this.multiple && Array.isArray(this.value) && this.value.length > 0) {
9483
9531
  this.currentPlaceholder = '';
@@ -9499,7 +9547,7 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9499
9547
  }
9500
9548
  this.$nextTick(function () {
9501
9549
  if (reference && reference.$el) {
9502
- _this15.inputWidth = reference.$el.getBoundingClientRect().width;
9550
+ _this16.inputWidth = reference.$el.getBoundingClientRect().width;
9503
9551
  }
9504
9552
  });
9505
9553
  this.setSelected();
@@ -12505,7 +12553,7 @@ var table_body_extends = Object.assign || function (target) { for (var i = 1; i
12505
12553
  return cellStyle;
12506
12554
  },
12507
12555
  getCellClass: function getCellClass(rowIndex, columnIndex, row, column) {
12508
- var classes = [column.id, column.align, column.className];
12556
+ var classes = [column.id, column.align, column.verticalAlign, column.className];
12509
12557
 
12510
12558
  if (this.isColumnHidden(columnIndex)) {
12511
12559
  classes.push('is-hidden');
@@ -15026,6 +15074,7 @@ var columnIdSeed = 1;
15026
15074
  },
15027
15075
  columnKey: String,
15028
15076
  align: String,
15077
+ verticalAlign: String,
15029
15078
  headerAlign: String,
15030
15079
  showTooltipWhenOverflow: Boolean,
15031
15080
  showOverflowTooltip: Boolean,
@@ -15088,6 +15137,9 @@ var columnIdSeed = 1;
15088
15137
  realAlign: function realAlign() {
15089
15138
  return this.align ? 'is-' + this.align : null;
15090
15139
  },
15140
+ realVerticalAlign: function realVerticalAlign() {
15141
+ return this.verticalAlign ? 'is-' + this.verticalAlign : null;
15142
+ },
15091
15143
  realHeaderAlign: function realHeaderAlign() {
15092
15144
  return this.headerAlign ? 'is-' + this.headerAlign : this.realAlign;
15093
15145
  }
@@ -15203,6 +15255,7 @@ var columnIdSeed = 1;
15203
15255
  var aliases = {
15204
15256
  prop: 'property',
15205
15257
  realAlign: 'align',
15258
+ realVerticalAlign: 'verticalAlign',
15206
15259
  realHeaderAlign: 'headerAlign',
15207
15260
  realWidth: 'width'
15208
15261
  };
@@ -15266,6 +15319,7 @@ var columnIdSeed = 1;
15266
15319
  type: type,
15267
15320
  property: this.prop || this.property,
15268
15321
  align: this.realAlign,
15322
+ verticalAlign: this.realVerticalAlign,
15269
15323
  headerAlign: this.realHeaderAlign,
15270
15324
  showOverflowTooltip: this.showOverflowTooltip || this.showTooltipWhenOverflow,
15271
15325
  // filter 相关属性
@@ -34987,32 +35041,169 @@ var cascadervue_type_template_id_032537a6_render = function() {
34987
35041
  ],
34988
35042
  2
34989
35043
  ),
34990
- _vm.multiple
35044
+ _vm.multiple && _vm.collapseTags && _vm.checkedNodes.length
34991
35045
  ? _c(
34992
- "div",
34993
- { staticClass: "el-cascader__tags" },
35046
+ "transition-group",
35047
+ {
35048
+ staticClass: "el-cascader__tags",
35049
+ on: { "after-leave": _vm.updateStyle }
35050
+ },
34994
35051
  [
34995
- _vm._l(_vm.presentTags, function(tag) {
34996
- return _c(
34997
- "el-tag",
34998
- {
34999
- key: tag.key,
35000
- class: { "is-disabled": !tag.closable && tag.key !== -1 },
35052
+ _vm._l(_vm.presentTags, function(tag, index) {
35053
+ return [
35054
+ _vm.collapseTags && index <= _vm.multipleLimitShow - 1
35055
+ ? _c(
35056
+ "el-tag",
35057
+ {
35058
+ key: tag.key,
35059
+ class: {
35060
+ "is-disabled": !tag.closable && tag.key !== -1
35061
+ },
35062
+ attrs: {
35063
+ type: "info",
35064
+ size: _vm.tagSize,
35065
+ hit: tag.hitState,
35066
+ maxWidth: _vm.maxWidth,
35067
+ closable: tag.closable,
35068
+ "disable-transitions": ""
35069
+ },
35070
+ on: {
35071
+ close: function($event) {
35072
+ _vm.deleteTag(tag)
35073
+ }
35074
+ }
35075
+ },
35076
+ [_c("span", [_vm._v(_vm._s(tag.text))])]
35077
+ )
35078
+ : _vm._e()
35079
+ ]
35080
+ }),
35081
+ _vm.collapseTags &&
35082
+ ((_vm.checkedNodes.length > 1 &&
35083
+ _vm.checkedNodes.length > _vm.multipleLimitShow) ||
35084
+ (_vm.checkedNodes.length > 0 && _vm.collapseTagsFixed))
35085
+ ? _c(
35086
+ "el-tag",
35087
+ {
35088
+ key: "count",
35089
+ ref: "tagsCount",
35090
+ staticClass: "el-cascader__tags-count",
35091
+ class: {
35092
+ "el-cascader__tags-count-fixed": _vm.collapseTagsFixed
35093
+ },
35094
+ attrs: {
35095
+ closable: false,
35096
+ size: _vm.tagSize,
35097
+ type: "info",
35098
+ "disable-transitions": ""
35099
+ }
35100
+ },
35101
+ [
35102
+ _c("span", { staticClass: "el-cascader__tags-text" }, [
35103
+ _vm._v(
35104
+ _vm._s(_vm.collapseTagsFixed ? "" : "+") +
35105
+ _vm._s(
35106
+ _vm.collapseTagsFixed
35107
+ ? _vm.checkedNodes.length
35108
+ : _vm.checkedNodes.length -
35109
+ _vm.multipleLimitShow
35110
+ ) +
35111
+ _vm._s(_vm.collapseTagsSuffix)
35112
+ )
35113
+ ])
35114
+ ]
35115
+ )
35116
+ : _vm._e(),
35117
+ _vm.filterable && !_vm.isDisabled
35118
+ ? _c("input", {
35119
+ directives: [
35120
+ {
35121
+ name: "model",
35122
+ rawName: "v-model.trim",
35123
+ value: _vm.inputValue,
35124
+ expression: "inputValue",
35125
+ modifiers: { trim: true }
35126
+ }
35127
+ ],
35128
+ staticClass: "el-cascader__search-input",
35001
35129
  attrs: {
35002
- type: "info",
35003
- size: _vm.tagSize,
35004
- hit: tag.hitState,
35005
- closable: tag.closable,
35006
- "disable-transitions": ""
35130
+ type: "text",
35131
+ placeholder: _vm.presentTags.length ? "" : _vm.placeholder
35007
35132
  },
35133
+ domProps: { value: _vm.inputValue },
35008
35134
  on: {
35009
- close: function($event) {
35010
- _vm.deleteTag(tag)
35135
+ input: [
35136
+ function($event) {
35137
+ if ($event.target.composing) {
35138
+ return
35139
+ }
35140
+ _vm.inputValue = $event.target.value.trim()
35141
+ },
35142
+ function(e) {
35143
+ return _vm.handleInput(_vm.inputValue, e)
35144
+ }
35145
+ ],
35146
+ click: function($event) {
35147
+ $event.stopPropagation()
35148
+ _vm.toggleDropDownVisible(true)
35149
+ },
35150
+ keydown: function($event) {
35151
+ if (
35152
+ !("button" in $event) &&
35153
+ _vm._k(
35154
+ $event.keyCode,
35155
+ "delete",
35156
+ [8, 46],
35157
+ $event.key,
35158
+ ["Backspace", "Delete", "Del"]
35159
+ )
35160
+ ) {
35161
+ return null
35162
+ }
35163
+ return _vm.handleDelete($event)
35164
+ },
35165
+ blur: function($event) {
35166
+ _vm.$forceUpdate()
35011
35167
  }
35012
35168
  }
35013
- },
35014
- [_c("span", [_vm._v(_vm._s(tag.text))])]
35015
- )
35169
+ })
35170
+ : _vm._e()
35171
+ ],
35172
+ 2
35173
+ )
35174
+ : _vm._e(),
35175
+ !_vm.collapseTags
35176
+ ? _c(
35177
+ "transition-group",
35178
+ {
35179
+ staticClass: "el-cascader__tags",
35180
+ on: { "after-leave": _vm.updateStyle }
35181
+ },
35182
+ [
35183
+ _vm._l(_vm.presentTags, function(tag) {
35184
+ return [
35185
+ _c(
35186
+ "el-tag",
35187
+ {
35188
+ key: tag.key,
35189
+ class: { "is-disabled": !tag.closable && tag.key !== -1 },
35190
+ attrs: {
35191
+ type: "info",
35192
+ size: _vm.tagSize,
35193
+ hit: tag.hitState,
35194
+ maxWidth: _vm.maxWidth,
35195
+ closable: tag.closable,
35196
+ "disable-transitions": ""
35197
+ },
35198
+ on: {
35199
+ close: function($event) {
35200
+ _vm.deleteTag(tag)
35201
+ }
35202
+ }
35203
+ },
35204
+ [_c("span", [_vm._v(_vm._s(tag.text))])]
35205
+ )
35206
+ ]
35016
35207
  }),
35017
35208
  _vm.filterable && !_vm.isDisabled
35018
35209
  ? _c("input", {
@@ -35324,6 +35515,47 @@ var aria_utils_default = /*#__PURE__*/__webpack_require__.n(aria_utils_);
35324
35515
  //
35325
35516
  //
35326
35517
  //
35518
+ //
35519
+ //
35520
+ //
35521
+ //
35522
+ //
35523
+ //
35524
+ //
35525
+ //
35526
+ //
35527
+ //
35528
+ //
35529
+ //
35530
+ //
35531
+ //
35532
+ //
35533
+ //
35534
+ //
35535
+ //
35536
+ //
35537
+ //
35538
+ //
35539
+ //
35540
+ //
35541
+ //
35542
+ //
35543
+ //
35544
+ //
35545
+ //
35546
+ //
35547
+ //
35548
+ //
35549
+ //
35550
+ //
35551
+ //
35552
+ //
35553
+ //
35554
+ //
35555
+ //
35556
+ //
35557
+ //
35558
+ //
35327
35559
 
35328
35560
 
35329
35561
 
@@ -35434,6 +35666,22 @@ var InputSizeMap = {
35434
35666
  default: true
35435
35667
  },
35436
35668
  collapseTags: Boolean,
35669
+ multipleLimitShow: {
35670
+ type: Number,
35671
+ default: 1
35672
+ },
35673
+ multipleTagMaxWidth: {
35674
+ type: String,
35675
+ default: 'none'
35676
+ },
35677
+ collapseTagsSuffix: {
35678
+ type: String,
35679
+ default: ''
35680
+ },
35681
+ collapseTagsFixed: {
35682
+ type: Boolean,
35683
+ default: false
35684
+ },
35437
35685
  debounce: {
35438
35686
  type: Number,
35439
35687
  default: 300
@@ -35459,7 +35707,10 @@ var InputSizeMap = {
35459
35707
  filtering: false,
35460
35708
  suggestions: [],
35461
35709
  inputInitialHeight: 0,
35462
- pressDeleteCount: 0
35710
+ pressDeleteCount: 0,
35711
+ inputWidth: 0,
35712
+ tagsLeft: 0,
35713
+ maxWidth: 'none'
35463
35714
  };
35464
35715
  },
35465
35716
 
@@ -35579,6 +35830,8 @@ var InputSizeMap = {
35579
35830
 
35580
35831
  if (input && input.$el) {
35581
35832
  this.inputInitialHeight = Math.max(input.$el.offsetHeight, InputSizeMap[this.realSize]) || 36;
35833
+ this.resetInputWidth();
35834
+ this.resetTagsLeft();
35582
35835
  }
35583
35836
 
35584
35837
  if (!this.isEmptyValue(this.value)) {
@@ -35612,6 +35865,37 @@ var InputSizeMap = {
35612
35865
 
35613
35866
 
35614
35867
  methods: {
35868
+ resetInputWidth: function resetInputWidth() {
35869
+ this.inputWidth = this.$refs.input.$el.getBoundingClientRect().width;
35870
+ },
35871
+ resetTagsLeft: function resetTagsLeft() {
35872
+ var _this2 = this;
35873
+
35874
+ this.$nextTick(function () {
35875
+ var prefixLabel = _this2.$el.querySelector('.el-input-group__prefix-label');
35876
+ var prefix = _this2.$el.querySelector('.el-input__prefix');
35877
+ var inputInner = _this2.$el.querySelector('.el-input__inner');
35878
+ var prefixLabelWidth = prefixLabel && Math.round(prefixLabel.getBoundingClientRect().width) || 0;
35879
+ var inputPaddingLeft = prefixLabel || prefix ? Math.round(window.getComputedStyle(inputInner).paddingLeft.replace(/px/, '')) : 0;
35880
+ _this2.tagsLeft = prefixLabelWidth + inputPaddingLeft;
35881
+ });
35882
+ },
35883
+ getMaxWidth: function getMaxWidth() {
35884
+ var _this3 = this;
35885
+
35886
+ this.$nextTick(function () {
35887
+ if (_this3.collapseTags) {
35888
+ if (_this3.multipleTagMaxWidth && _this3.multipleTagMaxWidth !== 'none') {
35889
+ _this3.maxWidth = _this3.multipleTagMaxWidth;
35890
+ }
35891
+ var tagsCountWidth = _this3.$refs.tagsCount && _this3.$refs.tagsCount.$el.clientWidth || 0;
35892
+ var count = _this3.checkedNodes.length <= _this3.multipleLimitShow ? _this3.checkedNodes.length : _this3.multipleLimitShow;
35893
+ _this3.maxWidth = Math.floor((_this3.inputWidth - _this3.tagsLeft - 32 - tagsCountWidth - 20 - count * 16) / count) + 'px';
35894
+ } else {
35895
+ _this3.maxWidth = _this3.multipleTagMaxWidth || 'none';
35896
+ }
35897
+ });
35898
+ },
35615
35899
  getMigratingConfig: function getMigratingConfig() {
35616
35900
  return {
35617
35901
  props: {
@@ -35625,7 +35909,7 @@ var InputSizeMap = {
35625
35909
  };
35626
35910
  },
35627
35911
  toggleDropDownVisible: function toggleDropDownVisible(visible) {
35628
- var _this2 = this;
35912
+ var _this4 = this;
35629
35913
 
35630
35914
  if (this.isDisabled) return;
35631
35915
 
@@ -35637,8 +35921,8 @@ var InputSizeMap = {
35637
35921
  this.dropDownVisible = visible;
35638
35922
  if (visible) {
35639
35923
  this.$nextTick(function () {
35640
- _this2.updatePopper();
35641
- _this2.panel.scrollIntoView();
35924
+ _this4.updatePopper();
35925
+ _this4.panel.scrollIntoView();
35642
35926
  });
35643
35927
  }
35644
35928
  input.$refs.input.setAttribute('aria-expanded', visible);
@@ -35692,11 +35976,11 @@ var InputSizeMap = {
35692
35976
  this.$emit('active-item-change', value); // Deprecated
35693
35977
  },
35694
35978
  focusFirstNode: function focusFirstNode() {
35695
- var _this3 = this;
35979
+ var _this5 = this;
35696
35980
 
35697
35981
  this.$nextTick(function () {
35698
- var filtering = _this3.filtering;
35699
- var _$refs = _this3.$refs,
35982
+ var filtering = _this5.filtering;
35983
+ var _$refs = _this5.$refs,
35700
35984
  popper = _$refs.popper,
35701
35985
  suggestionPanel = _$refs.suggestionPanel;
35702
35986
 
@@ -35716,15 +36000,15 @@ var InputSizeMap = {
35716
36000
  });
35717
36001
  },
35718
36002
  computePresentContent: function computePresentContent() {
35719
- var _this4 = this;
36003
+ var _this6 = this;
35720
36004
 
35721
36005
  // nextTick is required, because checked nodes may not change right now
35722
36006
  this.$nextTick(function () {
35723
- if (_this4.config.multiple) {
35724
- _this4.computePresentTags();
35725
- _this4.presentText = _this4.presentTags.length ? ' ' : null;
36007
+ if (_this6.config.multiple) {
36008
+ _this6.computePresentTags();
36009
+ _this6.presentText = _this6.presentTags.length ? ' ' : null;
35726
36010
  } else {
35727
- _this4.computePresentText();
36011
+ _this6.computePresentText();
35728
36012
  }
35729
36013
  });
35730
36014
  },
@@ -35754,8 +36038,7 @@ var InputSizeMap = {
35754
36038
  var isDisabled = this.isDisabled,
35755
36039
  leafOnly = this.leafOnly,
35756
36040
  showAllLevels = this.showAllLevels,
35757
- separator = this.separator,
35758
- collapseTags = this.collapseTags;
36041
+ separator = this.separator;
35759
36042
 
35760
36043
  var checkedNodes = this.getCheckedNodes(leafOnly);
35761
36044
  var tags = [];
@@ -35771,32 +36054,34 @@ var InputSizeMap = {
35771
36054
  };
35772
36055
 
35773
36056
  if (checkedNodes.length) {
35774
- var first = checkedNodes[0],
35775
- rest = checkedNodes.slice(1);
35776
-
35777
- var restCount = rest.length;
35778
- tags.push(genTag(first));
35779
-
35780
- if (restCount) {
35781
- if (collapseTags) {
35782
- tags.push({
35783
- key: -1,
35784
- text: '+' + restCount,
35785
- closable: false
35786
- });
35787
- } else {
35788
- rest.forEach(function (node) {
35789
- return tags.push(genTag(node));
35790
- });
35791
- }
35792
- }
36057
+ checkedNodes.forEach(function (node) {
36058
+ return tags.push(genTag(node));
36059
+ });
36060
+ // const [first, ...rest] = checkedNodes;
36061
+ // const restCount = rest.length;
36062
+ // tags.push(genTag(first));
36063
+
36064
+ // console.log(restCount, 'restCount============');
36065
+ // this.restCount = restCount;
36066
+ // if (restCount) {
36067
+ // if (collapseTags) {
36068
+ // tags.push({
36069
+ // key: -1,
36070
+ // text: `+${restCount}`,
36071
+ // closable: false
36072
+ // });
36073
+ // } else {
36074
+ // rest.forEach(node => tags.push(genTag(node)));
36075
+ // }
36076
+ // }
35793
36077
  }
35794
36078
 
35795
36079
  this.checkedNodes = checkedNodes;
35796
36080
  this.presentTags = tags;
36081
+ this.getMaxWidth();
35797
36082
  },
35798
36083
  getSuggestions: function getSuggestions() {
35799
- var _this5 = this;
36084
+ var _this7 = this;
35800
36085
 
35801
36086
  var filterMethod = this.filterMethod;
35802
36087
 
@@ -35809,8 +36094,8 @@ var InputSizeMap = {
35809
36094
 
35810
36095
  var suggestions = this.panel.getFlattedNodes(this.leafOnly).filter(function (node) {
35811
36096
  if (node.isDisabled) return false;
35812
- node.text = node.getText(_this5.showAllLevels, _this5.separator) || '';
35813
- return filterMethod(node, _this5.inputValue);
36097
+ node.text = node.getText(_this7.showAllLevels, _this7.separator) || '';
36098
+ return filterMethod(node, _this7.inputValue);
35814
36099
  });
35815
36100
 
35816
36101
  if (this.multiple) {
@@ -35819,7 +36104,7 @@ var InputSizeMap = {
35819
36104
  });
35820
36105
  } else {
35821
36106
  suggestions.forEach(function (node) {
35822
- node.checked = Object(util_["isEqual"])(_this5.checkedValue, node.getValueByOption());
36107
+ node.checked = Object(util_["isEqual"])(_this7.checkedValue, node.getValueByOption());
35823
36108
  });
35824
36109
  }
35825
36110
 
@@ -35927,7 +36212,10 @@ var InputSizeMap = {
35927
36212
  } else {
35928
36213
  inputInner.style.height = height;
35929
36214
  }
35930
- tags.style.left = prefixLabelWidth + inputPaddingLeft + 'px';
36215
+ tags.style.left = prefixLabel ? prefixLabelWidth + inputPaddingLeft - 4 + 'px' : '0px';
36216
+ if (this.checkedNodes.length === 0 && !prefixLabel) {
36217
+ tags.style.left = '12px';
36218
+ }
35931
36219
  if (this.dropDownVisible) {
35932
36220
  this.updatePopper();
35933
36221
  }
@@ -45032,7 +45320,7 @@ if (typeof window !== 'undefined' && window.Vue) {
45032
45320
  }
45033
45321
 
45034
45322
  /* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
45035
- version: '2.15.56',
45323
+ version: '2.15.58',
45036
45324
  locale: lib_locale_default.a.use,
45037
45325
  i18n: lib_locale_default.a.i18n,
45038
45326
  install: src_install,