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.
package/lib/input.js CHANGED
@@ -244,8 +244,6 @@ var render = function() {
244
244
  _vm.$slots.suffixLabel,
245
245
  "el-input-group--append": _vm.$slots.append,
246
246
  "el-input-group--prepend": _vm.$slots.prepend,
247
- "el-input-group--prefix-label": _vm.$slots.prefixLabel,
248
- "el-input-group--suffix-label": _vm.$slots.suffixLabel,
249
247
  "is-focus":
250
248
  (_vm.$slots.suffixLabel || _vm.$slots.prefixLabel) && _vm.focused,
251
249
  "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
@@ -276,141 +274,156 @@ var render = function() {
276
274
  2
277
275
  )
278
276
  : _vm._e(),
279
- _vm.$slots.prefixLabel
280
- ? _c(
281
- "div",
282
- { staticClass: "el-input-group__prefix-label" },
283
- [_vm._t("prefixLabel")],
284
- 2
285
- )
286
- : _vm._e(),
287
- _vm.type !== "textarea"
288
- ? _c(
289
- "input",
290
- _vm._b(
291
- {
292
- ref: "input",
293
- staticClass: "el-input__inner",
294
- attrs: {
295
- tabindex: _vm.tabindex,
296
- type: _vm.showPassword
297
- ? _vm.passwordVisible
298
- ? "text"
299
- : "password"
300
- : _vm.type,
301
- disabled: _vm.inputDisabled,
302
- readonly: _vm.readonly,
303
- autocomplete: _vm.autoComplete || _vm.autocomplete,
304
- "aria-label": _vm.label
305
- },
306
- on: {
307
- compositionstart: _vm.handleCompositionStart,
308
- compositionupdate: _vm.handleCompositionUpdate,
309
- compositionend: _vm.handleCompositionEnd,
310
- input: _vm.handleInput,
311
- focus: _vm.handleFocus,
312
- blur: _vm.handleBlur,
313
- change: _vm.handleChange
314
- }
315
- },
316
- "input",
317
- _vm.$attrs,
318
- false
319
- )
320
- )
321
- : _vm._e(),
322
- _vm.$slots.prefix || _vm.prefixIcon
323
- ? _c(
324
- "span",
325
- { staticClass: "el-input__prefix" },
326
- [
327
- _vm._t("prefix"),
328
- _vm.prefixIcon
329
- ? _c("i", {
330
- staticClass: "el-input__icon",
331
- class: _vm.prefixIcon
332
- })
333
- : _vm._e()
334
- ],
335
- 2
336
- )
337
- : _vm._e(),
338
- _vm.getSuffixVisible()
339
- ? _c("span", { staticClass: "el-input__suffix" }, [
340
- _c(
341
- "span",
342
- { staticClass: "el-input__suffix-inner" },
343
- [
344
- _vm.showClear
345
- ? _c("i", {
346
- staticClass:
347
- "el-input__icon iov-icon-close-mini el-input__clear",
348
- on: {
349
- mousedown: function($event) {
350
- $event.preventDefault()
351
- },
352
- click: _vm.clear
353
- }
354
- })
355
- : _vm._e(),
356
- _vm.$slots.suffixLabel
357
- ? _c(
358
- "span",
359
- { staticClass: "el-input-group__suffix-label" },
360
- [_vm._t("suffixLabel")],
361
- 2
362
- )
363
- : _vm._e(),
364
- !_vm.showClear ||
365
- !_vm.showPwdVisible ||
366
- !_vm.isWordLimitVisible
367
- ? [
368
- _vm._t("suffix"),
369
- _vm.suffixIcon
370
- ? _c("i", {
371
- staticClass: "el-input__icon",
372
- class: _vm.suffixIcon
373
- })
374
- : _vm._e()
375
- ]
376
- : _vm._e(),
377
- _vm.showPwdVisible
277
+ _c(
278
+ "div",
279
+ {
280
+ staticClass: "el-input-group__inner",
281
+ class: {
282
+ "el-input-group--prefix": _vm.$slots.prefixLabel,
283
+ "el-input-group--suffix": _vm.$slots.suffixLabel,
284
+ "is-focus":
285
+ (_vm.$slots.suffixLabel || _vm.$slots.prefixLabel) &&
286
+ _vm.focused
287
+ }
288
+ },
289
+ [
290
+ _vm.$slots.prefixLabel
291
+ ? _c(
292
+ "div",
293
+ { staticClass: "el-input-group__prefix-label" },
294
+ [_vm._t("prefixLabel")],
295
+ 2
296
+ )
297
+ : _vm._e(),
298
+ _vm.type !== "textarea"
299
+ ? _c(
300
+ "input",
301
+ _vm._b(
302
+ {
303
+ ref: "input",
304
+ staticClass: "el-input__inner",
305
+ attrs: {
306
+ tabindex: _vm.tabindex,
307
+ type: _vm.showPassword
308
+ ? _vm.passwordVisible
309
+ ? "text"
310
+ : "password"
311
+ : _vm.type,
312
+ disabled: _vm.inputDisabled,
313
+ readonly: _vm.readonly,
314
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
315
+ "aria-label": _vm.label
316
+ },
317
+ on: {
318
+ compositionstart: _vm.handleCompositionStart,
319
+ compositionupdate: _vm.handleCompositionUpdate,
320
+ compositionend: _vm.handleCompositionEnd,
321
+ input: _vm.handleInput,
322
+ focus: _vm.handleFocus,
323
+ blur: _vm.handleBlur,
324
+ change: _vm.handleChange
325
+ }
326
+ },
327
+ "input",
328
+ _vm.$attrs,
329
+ false
330
+ )
331
+ )
332
+ : _vm._e(),
333
+ _vm.$slots.prefix || _vm.prefixIcon
334
+ ? _c(
335
+ "span",
336
+ { staticClass: "el-input__prefix" },
337
+ [
338
+ _vm._t("prefix"),
339
+ _vm.prefixIcon
340
+ ? _c("i", {
341
+ staticClass: "el-input__icon",
342
+ class: _vm.prefixIcon
343
+ })
344
+ : _vm._e()
345
+ ],
346
+ 2
347
+ )
348
+ : _vm._e(),
349
+ _vm.getSuffixVisible()
350
+ ? _c("span", { staticClass: "el-input__suffix" }, [
351
+ _c(
352
+ "span",
353
+ { staticClass: "el-input__suffix-inner" },
354
+ [
355
+ _vm.showClear
356
+ ? _c("i", {
357
+ staticClass:
358
+ "el-input__icon iov-icon-close-mini el-input__clear",
359
+ on: {
360
+ mousedown: function($event) {
361
+ $event.preventDefault()
362
+ },
363
+ click: _vm.clear
364
+ }
365
+ })
366
+ : _vm._e(),
367
+ _vm.$slots.suffixLabel
368
+ ? _c(
369
+ "span",
370
+ { staticClass: "el-input-group__suffix-label" },
371
+ [_vm._t("suffixLabel")],
372
+ 2
373
+ )
374
+ : _vm._e(),
375
+ !_vm.showClear ||
376
+ !_vm.showPwdVisible ||
377
+ !_vm.isWordLimitVisible
378
+ ? [
379
+ _vm._t("suffix"),
380
+ _vm.suffixIcon
381
+ ? _c("i", {
382
+ staticClass: "el-input__icon",
383
+ class: _vm.suffixIcon
384
+ })
385
+ : _vm._e()
386
+ ]
387
+ : _vm._e(),
388
+ _vm.showPwdVisible
389
+ ? _c("i", {
390
+ staticClass: "el-input__icon",
391
+ class: _vm.passwordVisible
392
+ ? "iov-icon-eye"
393
+ : "iov-icon-eye-close",
394
+ on: { click: _vm.handlePasswordVisible }
395
+ })
396
+ : _vm._e(),
397
+ _vm.isWordLimitVisible
398
+ ? _c("span", { staticClass: "el-input__count" }, [
399
+ _c(
400
+ "span",
401
+ { staticClass: "el-input__count-inner" },
402
+ [
403
+ _vm._v(
404
+ "\n " +
405
+ _vm._s(_vm.textLength) +
406
+ "/" +
407
+ _vm._s(_vm.upperLimit) +
408
+ "\n "
409
+ )
410
+ ]
411
+ )
412
+ ])
413
+ : _vm._e()
414
+ ],
415
+ 2
416
+ ),
417
+ _vm.validateState
378
418
  ? _c("i", {
379
419
  staticClass: "el-input__icon",
380
- class: _vm.passwordVisible
381
- ? "iov-icon-eye"
382
- : "iov-icon-eye-close",
383
- on: { click: _vm.handlePasswordVisible }
420
+ class: ["el-input__validateIcon", _vm.validateIcon]
384
421
  })
385
- : _vm._e(),
386
- _vm.isWordLimitVisible
387
- ? _c("span", { staticClass: "el-input__count" }, [
388
- _c(
389
- "span",
390
- { staticClass: "el-input__count-inner" },
391
- [
392
- _vm._v(
393
- "\n " +
394
- _vm._s(_vm.textLength) +
395
- "/" +
396
- _vm._s(_vm.upperLimit) +
397
- "\n "
398
- )
399
- ]
400
- )
401
- ])
402
422
  : _vm._e()
403
- ],
404
- 2
405
- ),
406
- _vm.validateState
407
- ? _c("i", {
408
- staticClass: "el-input__icon",
409
- class: ["el-input__validateIcon", _vm.validateIcon]
410
- })
411
- : _vm._e()
412
- ])
413
- : _vm._e(),
423
+ ])
424
+ : _vm._e()
425
+ ]
426
+ ),
414
427
  _vm.$slots.append
415
428
  ? _c(
416
429
  "div",
@@ -658,6 +671,10 @@ var shared_ = __webpack_require__(21);
658
671
  //
659
672
  //
660
673
  //
674
+ //
675
+ //
676
+ //
677
+ //
661
678
 
662
679
 
663
680
 
@@ -928,10 +945,10 @@ var shared_ = __webpack_require__(21);
928
945
  var isSelect = pendantEl.querySelector('.el-select');
929
946
  var isButton = pendantEl.querySelector('.el-button');
930
947
  if (isSelect) {
931
- Object(dom_["addClass"])(pendantEl, 'has-select');
948
+ Object(dom_["addClass"])(pendantEl, 'is-select');
932
949
  }
933
950
  if (isButton) {
934
- Object(dom_["addClass"])(pendantEl, 'has-button');
951
+ Object(dom_["addClass"])(pendantEl, 'is-button');
935
952
  }
936
953
  },
937
954
  calcIconOffset: function calcIconOffset(place) {
@@ -939,7 +956,7 @@ var shared_ = __webpack_require__(21);
939
956
  if (!elList.length) return;
940
957
  var el = null;
941
958
  for (var i = 0; i < elList.length; i++) {
942
- if (elList[i].parentNode === this.$el) {
959
+ if (elList[i].parentNode.parentNode === this.$el) {
943
960
  el = elList[i];
944
961
  break;
945
962
  }
@@ -961,9 +978,9 @@ var shared_ = __webpack_require__(21);
961
978
  var embedEl = this.$el.querySelector('.el-input-group__' + place + '-label');
962
979
 
963
980
  if (this.$slots[pendant] && this.$slots[embed]) {
964
- el.style.transform = place === 'prefix' ? 'translateX(' + (pendantEl.offsetWidth + embedEl.offsetWidth) + 'px)' : 'translateX(-' + pendantEl.offsetWidth + 'px)';
981
+ el.style.transform = place === 'prefix' ? 'translateX(' + (pendantEl.offsetWidth + embedEl.offsetWidth) + 'px)' : '';
965
982
  } else if (this.$slots[pendant]) {
966
- el.style.transform = place === 'prefix' ? 'translateX(' + pendantEl.offsetWidth + 'px)' : 'translateX(-' + pendantEl.offsetWidth + 'px)';
983
+ el.style.transform = place === 'prefix' ? 'translateX(' + pendantEl.offsetWidth + 'px)' : '';
967
984
  } else if (this.$slots[embed]) {
968
985
  el.style.transform = place === 'prefix' ? 'translateX(' + embedEl.offsetWidth + 'px)' : '';
969
986
  } else {