iov-design 2.15.16 → 2.15.18

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.
@@ -4268,8 +4268,6 @@ var inputvue_type_template_id_343dd774_render = function() {
4268
4268
  _vm.$slots.suffixLabel,
4269
4269
  "el-input-group--append": _vm.$slots.append,
4270
4270
  "el-input-group--prepend": _vm.$slots.prepend,
4271
- "el-input-group--prefix-label": _vm.$slots.prefixLabel,
4272
- "el-input-group--suffix-label": _vm.$slots.suffixLabel,
4273
4271
  "is-focus":
4274
4272
  (_vm.$slots.suffixLabel || _vm.$slots.prefixLabel) && _vm.focused,
4275
4273
  "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
@@ -4300,141 +4298,156 @@ var inputvue_type_template_id_343dd774_render = function() {
4300
4298
  2
4301
4299
  )
4302
4300
  : _vm._e(),
4303
- _vm.$slots.prefixLabel
4304
- ? _c(
4305
- "div",
4306
- { staticClass: "el-input-group__prefix-label" },
4307
- [_vm._t("prefixLabel")],
4308
- 2
4309
- )
4310
- : _vm._e(),
4311
- _vm.type !== "textarea"
4312
- ? _c(
4313
- "input",
4314
- _vm._b(
4315
- {
4316
- ref: "input",
4317
- staticClass: "el-input__inner",
4318
- attrs: {
4319
- tabindex: _vm.tabindex,
4320
- type: _vm.showPassword
4321
- ? _vm.passwordVisible
4322
- ? "text"
4323
- : "password"
4324
- : _vm.type,
4325
- disabled: _vm.inputDisabled,
4326
- readonly: _vm.readonly,
4327
- autocomplete: _vm.autoComplete || _vm.autocomplete,
4328
- "aria-label": _vm.label
4329
- },
4330
- on: {
4331
- compositionstart: _vm.handleCompositionStart,
4332
- compositionupdate: _vm.handleCompositionUpdate,
4333
- compositionend: _vm.handleCompositionEnd,
4334
- input: _vm.handleInput,
4335
- focus: _vm.handleFocus,
4336
- blur: _vm.handleBlur,
4337
- change: _vm.handleChange
4338
- }
4339
- },
4340
- "input",
4341
- _vm.$attrs,
4342
- false
4343
- )
4344
- )
4345
- : _vm._e(),
4346
- _vm.$slots.prefix || _vm.prefixIcon
4347
- ? _c(
4348
- "span",
4349
- { staticClass: "el-input__prefix" },
4350
- [
4351
- _vm._t("prefix"),
4352
- _vm.prefixIcon
4353
- ? _c("i", {
4354
- staticClass: "el-input__icon",
4355
- class: _vm.prefixIcon
4356
- })
4357
- : _vm._e()
4358
- ],
4359
- 2
4360
- )
4361
- : _vm._e(),
4362
- _vm.getSuffixVisible()
4363
- ? _c("span", { staticClass: "el-input__suffix" }, [
4364
- _c(
4365
- "span",
4366
- { staticClass: "el-input__suffix-inner" },
4367
- [
4368
- _vm.showClear
4369
- ? _c("i", {
4370
- staticClass:
4371
- "el-input__icon iov-icon-close-mini el-input__clear",
4372
- on: {
4373
- mousedown: function($event) {
4374
- $event.preventDefault()
4375
- },
4376
- click: _vm.clear
4377
- }
4378
- })
4379
- : _vm._e(),
4380
- _vm.$slots.suffixLabel
4381
- ? _c(
4382
- "span",
4383
- { staticClass: "el-input-group__suffix-label" },
4384
- [_vm._t("suffixLabel")],
4385
- 2
4386
- )
4387
- : _vm._e(),
4388
- !_vm.showClear ||
4389
- !_vm.showPwdVisible ||
4390
- !_vm.isWordLimitVisible
4391
- ? [
4392
- _vm._t("suffix"),
4393
- _vm.suffixIcon
4394
- ? _c("i", {
4395
- staticClass: "el-input__icon",
4396
- class: _vm.suffixIcon
4397
- })
4398
- : _vm._e()
4399
- ]
4400
- : _vm._e(),
4401
- _vm.showPwdVisible
4301
+ _c(
4302
+ "div",
4303
+ {
4304
+ staticClass: "el-input-group__inner",
4305
+ class: {
4306
+ "el-input-group--prefix": _vm.$slots.prefixLabel,
4307
+ "el-input-group--suffix": _vm.$slots.suffixLabel,
4308
+ "is-focus":
4309
+ (_vm.$slots.suffixLabel || _vm.$slots.prefixLabel) &&
4310
+ _vm.focused
4311
+ }
4312
+ },
4313
+ [
4314
+ _vm.$slots.prefixLabel
4315
+ ? _c(
4316
+ "div",
4317
+ { staticClass: "el-input-group__prefix-label" },
4318
+ [_vm._t("prefixLabel")],
4319
+ 2
4320
+ )
4321
+ : _vm._e(),
4322
+ _vm.type !== "textarea"
4323
+ ? _c(
4324
+ "input",
4325
+ _vm._b(
4326
+ {
4327
+ ref: "input",
4328
+ staticClass: "el-input__inner",
4329
+ attrs: {
4330
+ tabindex: _vm.tabindex,
4331
+ type: _vm.showPassword
4332
+ ? _vm.passwordVisible
4333
+ ? "text"
4334
+ : "password"
4335
+ : _vm.type,
4336
+ disabled: _vm.inputDisabled,
4337
+ readonly: _vm.readonly,
4338
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
4339
+ "aria-label": _vm.label
4340
+ },
4341
+ on: {
4342
+ compositionstart: _vm.handleCompositionStart,
4343
+ compositionupdate: _vm.handleCompositionUpdate,
4344
+ compositionend: _vm.handleCompositionEnd,
4345
+ input: _vm.handleInput,
4346
+ focus: _vm.handleFocus,
4347
+ blur: _vm.handleBlur,
4348
+ change: _vm.handleChange
4349
+ }
4350
+ },
4351
+ "input",
4352
+ _vm.$attrs,
4353
+ false
4354
+ )
4355
+ )
4356
+ : _vm._e(),
4357
+ _vm.$slots.prefix || _vm.prefixIcon
4358
+ ? _c(
4359
+ "span",
4360
+ { staticClass: "el-input__prefix" },
4361
+ [
4362
+ _vm._t("prefix"),
4363
+ _vm.prefixIcon
4364
+ ? _c("i", {
4365
+ staticClass: "el-input__icon",
4366
+ class: _vm.prefixIcon
4367
+ })
4368
+ : _vm._e()
4369
+ ],
4370
+ 2
4371
+ )
4372
+ : _vm._e(),
4373
+ _vm.getSuffixVisible()
4374
+ ? _c("span", { staticClass: "el-input__suffix" }, [
4375
+ _c(
4376
+ "span",
4377
+ { staticClass: "el-input__suffix-inner" },
4378
+ [
4379
+ _vm.showClear
4380
+ ? _c("i", {
4381
+ staticClass:
4382
+ "el-input__icon iov-icon-close-mini el-input__clear",
4383
+ on: {
4384
+ mousedown: function($event) {
4385
+ $event.preventDefault()
4386
+ },
4387
+ click: _vm.clear
4388
+ }
4389
+ })
4390
+ : _vm._e(),
4391
+ _vm.$slots.suffixLabel
4392
+ ? _c(
4393
+ "span",
4394
+ { staticClass: "el-input-group__suffix-label" },
4395
+ [_vm._t("suffixLabel")],
4396
+ 2
4397
+ )
4398
+ : _vm._e(),
4399
+ !_vm.showClear ||
4400
+ !_vm.showPwdVisible ||
4401
+ !_vm.isWordLimitVisible
4402
+ ? [
4403
+ _vm._t("suffix"),
4404
+ _vm.suffixIcon
4405
+ ? _c("i", {
4406
+ staticClass: "el-input__icon",
4407
+ class: _vm.suffixIcon
4408
+ })
4409
+ : _vm._e()
4410
+ ]
4411
+ : _vm._e(),
4412
+ _vm.showPwdVisible
4413
+ ? _c("i", {
4414
+ staticClass: "el-input__icon",
4415
+ class: _vm.passwordVisible
4416
+ ? "iov-icon-eye"
4417
+ : "iov-icon-eye-close",
4418
+ on: { click: _vm.handlePasswordVisible }
4419
+ })
4420
+ : _vm._e(),
4421
+ _vm.isWordLimitVisible
4422
+ ? _c("span", { staticClass: "el-input__count" }, [
4423
+ _c(
4424
+ "span",
4425
+ { staticClass: "el-input__count-inner" },
4426
+ [
4427
+ _vm._v(
4428
+ "\n " +
4429
+ _vm._s(_vm.textLength) +
4430
+ "/" +
4431
+ _vm._s(_vm.upperLimit) +
4432
+ "\n "
4433
+ )
4434
+ ]
4435
+ )
4436
+ ])
4437
+ : _vm._e()
4438
+ ],
4439
+ 2
4440
+ ),
4441
+ _vm.validateState
4402
4442
  ? _c("i", {
4403
4443
  staticClass: "el-input__icon",
4404
- class: _vm.passwordVisible
4405
- ? "iov-icon-eye"
4406
- : "iov-icon-eye-close",
4407
- on: { click: _vm.handlePasswordVisible }
4444
+ class: ["el-input__validateIcon", _vm.validateIcon]
4408
4445
  })
4409
- : _vm._e(),
4410
- _vm.isWordLimitVisible
4411
- ? _c("span", { staticClass: "el-input__count" }, [
4412
- _c(
4413
- "span",
4414
- { staticClass: "el-input__count-inner" },
4415
- [
4416
- _vm._v(
4417
- "\n " +
4418
- _vm._s(_vm.textLength) +
4419
- "/" +
4420
- _vm._s(_vm.upperLimit) +
4421
- "\n "
4422
- )
4423
- ]
4424
- )
4425
- ])
4426
4446
  : _vm._e()
4427
- ],
4428
- 2
4429
- ),
4430
- _vm.validateState
4431
- ? _c("i", {
4432
- staticClass: "el-input__icon",
4433
- class: ["el-input__validateIcon", _vm.validateIcon]
4434
- })
4435
- : _vm._e()
4436
- ])
4437
- : _vm._e(),
4447
+ ])
4448
+ : _vm._e()
4449
+ ]
4450
+ ),
4438
4451
  _vm.$slots.append
4439
4452
  ? _c(
4440
4453
  "div",
@@ -4671,6 +4684,10 @@ var shared_ = __webpack_require__(19);
4671
4684
  //
4672
4685
  //
4673
4686
  //
4687
+ //
4688
+ //
4689
+ //
4690
+ //
4674
4691
 
4675
4692
 
4676
4693
 
@@ -4941,10 +4958,10 @@ var shared_ = __webpack_require__(19);
4941
4958
  var isSelect = pendantEl.querySelector('.el-select');
4942
4959
  var isButton = pendantEl.querySelector('.el-button');
4943
4960
  if (isSelect) {
4944
- Object(dom_["addClass"])(pendantEl, 'has-select');
4961
+ Object(dom_["addClass"])(pendantEl, 'is-select');
4945
4962
  }
4946
4963
  if (isButton) {
4947
- Object(dom_["addClass"])(pendantEl, 'has-button');
4964
+ Object(dom_["addClass"])(pendantEl, 'is-button');
4948
4965
  }
4949
4966
  },
4950
4967
  calcIconOffset: function calcIconOffset(place) {
@@ -4952,7 +4969,7 @@ var shared_ = __webpack_require__(19);
4952
4969
  if (!elList.length) return;
4953
4970
  var el = null;
4954
4971
  for (var i = 0; i < elList.length; i++) {
4955
- if (elList[i].parentNode === this.$el) {
4972
+ if (elList[i].parentNode.parentNode === this.$el) {
4956
4973
  el = elList[i];
4957
4974
  break;
4958
4975
  }
@@ -4974,9 +4991,9 @@ var shared_ = __webpack_require__(19);
4974
4991
  var embedEl = this.$el.querySelector('.el-input-group__' + place + '-label');
4975
4992
 
4976
4993
  if (this.$slots[pendant] && this.$slots[embed]) {
4977
- el.style.transform = place === 'prefix' ? 'translateX(' + (pendantEl.offsetWidth + embedEl.offsetWidth) + 'px)' : 'translateX(-' + pendantEl.offsetWidth + 'px)';
4994
+ el.style.transform = place === 'prefix' ? 'translateX(' + (pendantEl.offsetWidth + embedEl.offsetWidth) + 'px)' : '';
4978
4995
  } else if (this.$slots[pendant]) {
4979
- el.style.transform = place === 'prefix' ? 'translateX(' + pendantEl.offsetWidth + 'px)' : 'translateX(-' + pendantEl.offsetWidth + 'px)';
4996
+ el.style.transform = place === 'prefix' ? 'translateX(' + pendantEl.offsetWidth + 'px)' : '';
4980
4997
  } else if (this.$slots[embed]) {
4981
4998
  el.style.transform = place === 'prefix' ? 'translateX(' + embedEl.offsetWidth + 'px)' : '';
4982
4999
  } else {
@@ -7524,7 +7541,11 @@ var selectvue_type_template_id_0e4aade6_render = function() {
7524
7541
  {
7525
7542
  ref: "tags",
7526
7543
  staticClass: "el-select__tags",
7527
- style: { "max-width": _vm.inputWidth - 32 + "px", width: "100%" }
7544
+ style: {
7545
+ "max-width": _vm.inputWidth - 32 + "px",
7546
+ width: "100%",
7547
+ left: _vm.tagsLeft
7548
+ }
7528
7549
  },
7529
7550
  [
7530
7551
  _vm.collapseTags && _vm.selected.length
@@ -8767,7 +8788,8 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
8767
8788
  currentPlaceholder: '',
8768
8789
  menuVisibleOnFocus: false,
8769
8790
  isOnComposition: false,
8770
- isSilentBlur: false
8791
+ isSilentBlur: false,
8792
+ tagsLeft: 0
8771
8793
  };
8772
8794
  },
8773
8795
 
@@ -9071,49 +9093,69 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9071
9093
  this.currentPlaceholder = this.$refs.input.value ? '' : this.cachedPlaceHolder;
9072
9094
  }
9073
9095
  },
9096
+ resetTagsLeft: function resetTagsLeft() {
9097
+ var _this10 = this;
9098
+
9099
+ this.$nextTick(function () {
9100
+ var prefixLabel = _this10.$el.querySelector('.el-input-group__prefix-label');
9101
+ if (prefixLabel) {
9102
+ var style = prefixLabel && window.getComputedStyle(prefixLabel);
9103
+ var width = +style.width.replace(/px/, '');
9104
+ var paddingLeft = +style.paddingLeft.replace(/px/, '');
9105
+ var paddingRight = +style.paddingRight.replace(/px/, '');
9106
+ _this10.tagsLeft = width + paddingLeft + paddingRight + 'px';
9107
+ }
9108
+ });
9109
+ },
9074
9110
  resetInputState: function resetInputState(e) {
9075
9111
  if (e.keyCode !== 8) this.toggleLastOptionHitState(false);
9076
9112
  this.inputLength = this.$refs.input.value.length * 15 + 20;
9077
9113
  this.resetInputHeight();
9078
9114
  },
9079
9115
  resetInputHeight: function resetInputHeight() {
9080
- var _this10 = this;
9116
+ var _this11 = this;
9081
9117
 
9082
9118
  if (this.collapseTags && !this.filterable) return;
9083
9119
  this.$nextTick(function () {
9084
- if (!_this10.$refs.reference) return;
9085
- var inputChildNodes = _this10.$refs.reference.$el.childNodes;
9120
+ if (!_this11.$refs.reference) return;
9121
+ var inputChildNodes = _this11.$refs.reference.$el.childNodes;
9122
+ // 兼容input组件多加了一层el-input-group__inner
9123
+ Array.from(inputChildNodes).find(function (child) {
9124
+ if (child && child.classList && child.classList.contains('el-input-group__inner')) {
9125
+ inputChildNodes = child.childNodes;
9126
+ }
9127
+ });
9086
9128
  var input = [].filter.call(inputChildNodes, function (item) {
9087
9129
  return item.tagName === 'INPUT';
9088
9130
  })[0];
9089
- var tags = _this10.$refs.tags;
9131
+ var tags = _this11.$refs.tags;
9090
9132
  var tagsHeight = tags ? Math.round(tags.getBoundingClientRect().height) : 0;
9091
- var sizeInMap = _this10.initialInputHeight || 40;
9092
- input.style.height = _this10.selected.length === 0 ? sizeInMap + 'px' : Math.max(tags ? tagsHeight + (tagsHeight > sizeInMap ? 6 : 0) : 0, sizeInMap) + 'px';
9093
- if (_this10.visible && _this10.emptyText !== false) {
9094
- _this10.broadcast('ElSelectDropdown', 'updatePopper');
9133
+ var sizeInMap = _this11.initialInputHeight || 40;
9134
+ input.style.height = _this11.selected.length === 0 ? sizeInMap + 'px' : Math.max(tags ? tagsHeight + (tagsHeight > sizeInMap ? 6 : 0) : 0, sizeInMap) + 'px';
9135
+ if (_this11.visible && _this11.emptyText !== false) {
9136
+ _this11.broadcast('ElSelectDropdown', 'updatePopper');
9095
9137
  }
9096
9138
  });
9097
9139
  },
9098
9140
  resetHoverIndex: function resetHoverIndex() {
9099
- var _this11 = this;
9141
+ var _this12 = this;
9100
9142
 
9101
9143
  setTimeout(function () {
9102
- if (!_this11.multiple) {
9103
- _this11.hoverIndex = _this11.options.indexOf(_this11.selected);
9144
+ if (!_this12.multiple) {
9145
+ _this12.hoverIndex = _this12.options.indexOf(_this12.selected);
9104
9146
  } else {
9105
- if (_this11.selected.length > 0) {
9106
- _this11.hoverIndex = Math.min.apply(null, _this11.selected.map(function (item) {
9107
- return _this11.options.indexOf(item);
9147
+ if (_this12.selected.length > 0) {
9148
+ _this12.hoverIndex = Math.min.apply(null, _this12.selected.map(function (item) {
9149
+ return _this12.options.indexOf(item);
9108
9150
  }));
9109
9151
  } else {
9110
- _this11.hoverIndex = -1;
9152
+ _this12.hoverIndex = -1;
9111
9153
  }
9112
9154
  }
9113
9155
  }, 300);
9114
9156
  },
9115
9157
  handleOptionSelect: function handleOptionSelect(option, byClick) {
9116
- var _this12 = this;
9158
+ var _this13 = this;
9117
9159
 
9118
9160
  if (this.multiple) {
9119
9161
  var value = (this.value || []).slice();
@@ -9140,7 +9182,7 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9140
9182
  this.setSoftFocus();
9141
9183
  if (this.visible) return;
9142
9184
  this.$nextTick(function () {
9143
- _this12.scrollToOption(option);
9185
+ _this13.scrollToOption(option);
9144
9186
  });
9145
9187
  },
9146
9188
  setSoftFocus: function setSoftFocus() {
@@ -9229,7 +9271,10 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9229
9271
  },
9230
9272
  handleResize: function handleResize() {
9231
9273
  this.resetInputWidth();
9232
- if (this.multiple) this.resetInputHeight();
9274
+ if (this.multiple) {
9275
+ this.resetInputHeight();
9276
+ this.resetTagsLeft();
9277
+ }
9233
9278
  },
9234
9279
  checkDefaultFirstOption: function checkDefaultFirstOption() {
9235
9280
  this.hoverIndex = -1;
@@ -9270,7 +9315,7 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9270
9315
  },
9271
9316
 
9272
9317
  created: function created() {
9273
- var _this13 = this;
9318
+ var _this14 = this;
9274
9319
 
9275
9320
  this.cachedPlaceHolder = this.currentPlaceholder = this.propPlaceholder;
9276
9321
  if (this.multiple && !Array.isArray(this.value)) {
@@ -9281,18 +9326,18 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9281
9326
  }
9282
9327
 
9283
9328
  this.debouncedOnInputChange = debounce_default()(this.debounce, function () {
9284
- _this13.onInputChange();
9329
+ _this14.onInputChange();
9285
9330
  });
9286
9331
 
9287
9332
  this.debouncedQueryChange = debounce_default()(this.debounce, function (e) {
9288
- _this13.handleQueryChange(e.target.value);
9333
+ _this14.handleQueryChange(e.target.value);
9289
9334
  });
9290
9335
 
9291
9336
  this.$on('handleOptionClick', this.handleOptionSelect);
9292
9337
  this.$on('setSelected', this.setSelected);
9293
9338
  },
9294
9339
  mounted: function mounted() {
9295
- var _this14 = this;
9340
+ var _this15 = this;
9296
9341
 
9297
9342
  if (this.multiple && Array.isArray(this.value) && this.value.length > 0) {
9298
9343
  this.currentPlaceholder = '';
@@ -9314,7 +9359,7 @@ var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_vi
9314
9359
  }
9315
9360
  this.$nextTick(function () {
9316
9361
  if (reference && reference.$el) {
9317
- _this14.inputWidth = reference.$el.getBoundingClientRect().width;
9362
+ _this15.inputWidth = reference.$el.getBoundingClientRect().width;
9318
9363
  }
9319
9364
  });
9320
9365
  this.setSelected();
@@ -44002,7 +44047,7 @@ if (typeof window !== 'undefined' && window.Vue) {
44002
44047
  }
44003
44048
 
44004
44049
  /* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
44005
- version: '2.15.14',
44050
+ version: '2.15.18',
44006
44051
  locale: lib_locale_default.a.use,
44007
44052
  i18n: lib_locale_default.a.i18n,
44008
44053
  install: src_install,