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/index.js +1 -1
- package/lib/input.js +155 -138
- package/lib/iov-design.common.js +209 -164
- package/lib/select.js +53 -25
- package/lib/theme-chalk/autocomplete.css +1 -1
- package/lib/theme-chalk/cascader.css +1 -1
- package/lib/theme-chalk/date-picker.css +1 -1
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/input-number.css +1 -1
- package/lib/theme-chalk/input.css +1 -1
- package/lib/theme-chalk/message-box.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/select.css +1 -1
- package/lib/theme-chalk/slider.css +1 -1
- package/lib/theme-chalk/time-picker.css +1 -1
- package/lib/theme-chalk/transfer.css +1 -1
- package/package.json +1 -1
- package/packages/input/src/input.vue +57 -53
- package/packages/select/src/select.vue +26 -3
- package/packages/theme-chalk/src/form.scss +14 -13
- package/packages/theme-chalk/src/input.scss +50 -18
- package/packages/theme-chalk/src/select.scss +1 -1
- package/src/index.js +1 -1
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
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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
|
-
_vm.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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.
|
|
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
|
-
|
|
405
|
-
|
|
406
|
-
|
|
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, '
|
|
948
|
+
Object(dom_["addClass"])(pendantEl, 'is-select');
|
|
932
949
|
}
|
|
933
950
|
if (isButton) {
|
|
934
|
-
Object(dom_["addClass"])(pendantEl, '
|
|
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)' : '
|
|
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)' : '
|
|
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 {
|