iov-design 2.15.17 → 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/iov-design.common.js +54 -26
- 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/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/select/src/select.vue +26 -3
- package/packages/theme-chalk/src/input.scss +1 -0
- package/packages/theme-chalk/src/select.scss +1 -1
- package/src/index.js +1 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
class="el-select__tags"
|
|
9
9
|
v-if="multiple"
|
|
10
10
|
ref="tags"
|
|
11
|
-
:style="{ 'max-width': inputWidth - 32 + 'px', width: '100%' }">
|
|
11
|
+
:style="{ 'max-width': inputWidth - 32 + 'px', width: '100%', left: tagsLeft }">
|
|
12
12
|
<span class="el-tag__group" v-if="collapseTags && selected.length">
|
|
13
13
|
<el-tag
|
|
14
14
|
:closable="!selectDisabled"
|
|
@@ -338,7 +338,8 @@
|
|
|
338
338
|
currentPlaceholder: '',
|
|
339
339
|
menuVisibleOnFocus: false,
|
|
340
340
|
isOnComposition: false,
|
|
341
|
-
isSilentBlur: false
|
|
341
|
+
isSilentBlur: false,
|
|
342
|
+
tagsLeft: 0
|
|
342
343
|
};
|
|
343
344
|
},
|
|
344
345
|
|
|
@@ -649,6 +650,19 @@
|
|
|
649
650
|
}
|
|
650
651
|
},
|
|
651
652
|
|
|
653
|
+
resetTagsLeft() {
|
|
654
|
+
this.$nextTick(() => {
|
|
655
|
+
const prefixLabel = this.$el.querySelector('.el-input-group__prefix-label');
|
|
656
|
+
if (prefixLabel) {
|
|
657
|
+
const style = prefixLabel && window.getComputedStyle(prefixLabel);
|
|
658
|
+
const width = +(style.width.replace(/px/, ''));
|
|
659
|
+
const paddingLeft = +(style.paddingLeft.replace(/px/, ''));
|
|
660
|
+
const paddingRight = +(style.paddingRight.replace(/px/, ''));
|
|
661
|
+
this.tagsLeft = (width + paddingLeft + paddingRight) + 'px';
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
},
|
|
665
|
+
|
|
652
666
|
resetInputState(e) {
|
|
653
667
|
if (e.keyCode !== 8) this.toggleLastOptionHitState(false);
|
|
654
668
|
this.inputLength = this.$refs.input.value.length * 15 + 20;
|
|
@@ -660,6 +674,12 @@
|
|
|
660
674
|
this.$nextTick(() => {
|
|
661
675
|
if (!this.$refs.reference) return;
|
|
662
676
|
let inputChildNodes = this.$refs.reference.$el.childNodes;
|
|
677
|
+
// 兼容input组件多加了一层el-input-group__inner
|
|
678
|
+
Array.from(inputChildNodes).find(child => {
|
|
679
|
+
if (child && child.classList && child.classList.contains('el-input-group__inner')) {
|
|
680
|
+
inputChildNodes = child.childNodes;
|
|
681
|
+
}
|
|
682
|
+
});
|
|
663
683
|
let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
|
|
664
684
|
const tags = this.$refs.tags;
|
|
665
685
|
const tagsHeight = tags ? Math.round(tags.getBoundingClientRect().height) : 0;
|
|
@@ -812,7 +832,10 @@
|
|
|
812
832
|
|
|
813
833
|
handleResize() {
|
|
814
834
|
this.resetInputWidth();
|
|
815
|
-
if (this.multiple)
|
|
835
|
+
if (this.multiple) {
|
|
836
|
+
this.resetInputHeight();
|
|
837
|
+
this.resetTagsLeft();
|
|
838
|
+
}
|
|
816
839
|
},
|
|
817
840
|
|
|
818
841
|
checkDefaultFirstOption() {
|