Compare commits
No commits in common. "57ef27b43d35db6c41205234b7743f9faa7a6fd3" and "578004cdb75e1a8f2aea13fea2649af484ae508f" have entirely different histories.
57ef27b43d
...
578004cdb7
|
@ -44,7 +44,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
values: [null, []],
|
values: [null, []],
|
||||||
swidth:100,
|
swidth:90,
|
||||||
inputValue:"",
|
inputValue:"",
|
||||||
selectvalue:"",
|
selectvalue:"",
|
||||||
imeipopover:false,
|
imeipopover:false,
|
||||||
|
@ -66,8 +66,6 @@ export default {
|
||||||
if(find){
|
if(find){
|
||||||
let fontwidth=this.getStringWidth(find.label);
|
let fontwidth=this.getStringWidth(find.label);
|
||||||
this.swidth=fontwidth>165?165:fontwidth;
|
this.swidth=fontwidth>165?165:fontwidth;
|
||||||
}else{
|
|
||||||
this.swidth=100;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
:value="value&&value[0]"
|
:value="value&&value[0]"
|
||||||
@change="onSelect"
|
@change="onSelect"
|
||||||
class="ag_select_group"
|
class="ag_select_group"
|
||||||
:style="{ width: `${swidth+20}px` }"
|
:style="{ width: `${swidth}px` }"
|
||||||
>
|
>
|
||||||
</ag-select>
|
</ag-select>
|
||||||
<ag-input
|
<ag-input
|
||||||
|
@ -132,13 +132,12 @@
|
||||||
throw new Error("请传入数组");
|
throw new Error("请传入数组");
|
||||||
}
|
}
|
||||||
let newselectValue=newVal[0];
|
let newselectValue=newVal[0];
|
||||||
const find=newselectValue&&newselectValue!=""&&this.$attrs.options&&this.$attrs.options.find((f)=>f.value==newselectValue);
|
const find=this.$attrs.options&&this.$attrs.options.find((f)=>f.value==newselectValue);
|
||||||
if(find){
|
if(find){
|
||||||
let fontwidth=this.getStringWidth(find.label);
|
let fontwidth=this.getStringWidth(find.label);
|
||||||
this.swidth=fontwidth>165?165:fontwidth;
|
this.swidth=fontwidth>165?165:fontwidth;
|
||||||
}else{
|
|
||||||
this.swidth=120;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
},
|
},
|
||||||
|
@ -152,7 +151,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
onSelect(value){
|
onSelect(value){
|
||||||
if(this.$listeners.change){
|
if(this.$listeners.change){
|
||||||
this.$emit("change", [value||"", this.value[1]||""]);
|
this.$emit("change", [value, this.value[1]||""]);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue