iov-design 2.15.24 → 2.15.25
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/cascader.js +20 -7
- package/lib/index.js +1 -1
- package/lib/iov-design.common.js +33 -28
- package/lib/select.js +12 -20
- 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/cascader/src/cascader.vue +20 -9
- package/packages/select/src/select.vue +12 -20
- package/packages/theme-chalk/src/cascader.scss +20 -0
- package/packages/theme-chalk/src/input.scss +7 -4
- package/packages/theme-chalk/src/select.scss +20 -19
- package/src/index.js +1 -1
package/lib/cascader.js
CHANGED
|
@@ -755,9 +755,9 @@ var PopperMixin = {
|
|
|
755
755
|
};
|
|
756
756
|
|
|
757
757
|
var InputSizeMap = {
|
|
758
|
-
medium:
|
|
759
|
-
small:
|
|
760
|
-
mini:
|
|
758
|
+
medium: 32,
|
|
759
|
+
small: 30,
|
|
760
|
+
mini: 26
|
|
761
761
|
};
|
|
762
762
|
|
|
763
763
|
/* harmony default export */ var cascadervue_type_script_lang_js_ = ({
|
|
@@ -843,7 +843,10 @@ var InputSizeMap = {
|
|
|
843
843
|
return this.size || _elFormItemSize || (this.$ELEMENT || {}).size;
|
|
844
844
|
},
|
|
845
845
|
tagSize: function tagSize() {
|
|
846
|
-
return
|
|
846
|
+
return this.realSize;
|
|
847
|
+
// return ['small', 'mini'].indexOf(this.realSize) > -1
|
|
848
|
+
// ? 'mini'
|
|
849
|
+
// : 'small';
|
|
847
850
|
},
|
|
848
851
|
isDisabled: function isDisabled() {
|
|
849
852
|
return this.disabled || (this.elForm || {}).disabled;
|
|
@@ -948,7 +951,7 @@ var InputSizeMap = {
|
|
|
948
951
|
var input = this.$refs.input;
|
|
949
952
|
|
|
950
953
|
if (input && input.$el) {
|
|
951
|
-
this.inputInitialHeight = input.$el.offsetHeight
|
|
954
|
+
this.inputInitialHeight = Math.max(input.$el.offsetHeight, InputSizeMap[this.realSize]) || 36;
|
|
952
955
|
}
|
|
953
956
|
|
|
954
957
|
if (!this.isEmptyValue(this.value)) {
|
|
@@ -1278,6 +1281,9 @@ var InputSizeMap = {
|
|
|
1278
1281
|
if (!inputInner) return;
|
|
1279
1282
|
|
|
1280
1283
|
var tags = $el.querySelector('.el-cascader__tags');
|
|
1284
|
+
var groupPrefix = $el.querySelector('.el-input-group--prefix');
|
|
1285
|
+
var prefix = $el.querySelector('.el-input__prefix');
|
|
1286
|
+
var prefixLabel = $el.querySelector('.el-input-group__prefix-label');
|
|
1281
1287
|
var suggestionPanelEl = null;
|
|
1282
1288
|
|
|
1283
1289
|
if (suggestionPanel && (suggestionPanelEl = suggestionPanel.$el)) {
|
|
@@ -1287,8 +1293,15 @@ var InputSizeMap = {
|
|
|
1287
1293
|
|
|
1288
1294
|
if (tags) {
|
|
1289
1295
|
var offsetHeight = Math.round(tags.getBoundingClientRect().height);
|
|
1290
|
-
var height = Math.max(offsetHeight +
|
|
1291
|
-
inputInner.
|
|
1296
|
+
var height = Math.max(offsetHeight + 4, inputInitialHeight) + 'px';
|
|
1297
|
+
var inputPaddingLeft = groupPrefix || prefix ? Math.round(window.getComputedStyle(inputInner).paddingLeft.replace(/px/, '')) : 0;
|
|
1298
|
+
var prefixLabelWidth = prefixLabel && Math.round(prefixLabel.getBoundingClientRect().width) || 0;
|
|
1299
|
+
if (groupPrefix) {
|
|
1300
|
+
groupPrefix.style.height = height;
|
|
1301
|
+
} else {
|
|
1302
|
+
inputInner.style.height = height;
|
|
1303
|
+
}
|
|
1304
|
+
tags.style.left = prefixLabelWidth + inputPaddingLeft + 'px';
|
|
1292
1305
|
if (this.dropDownVisible) {
|
|
1293
1306
|
this.updatePopper();
|
|
1294
1307
|
}
|