|
@@ -61,16 +61,17 @@ export default {
|
|
this.optionList = res.data || [];
|
|
this.optionList = res.data || [];
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
|
|
|
- if (
|
|
|
|
- !this.disabled &&
|
|
|
|
- this.selectOnlyOne &&
|
|
|
|
- this.optionList.length === 1
|
|
|
|
- ) {
|
|
|
|
- this.selected = this.optionList[0].id;
|
|
|
|
- this.$emit("input", this.selected);
|
|
|
|
- this.$emit("change", this.optionList[0]);
|
|
|
|
- this.$emit("select-default", this.optionList[0]);
|
|
|
|
- }
|
|
|
|
|
|
+ // this.$nextTick(() => {
|
|
|
|
+ // if (
|
|
|
|
+ // !this.disabled &&
|
|
|
|
+ // this.selectOnlyOne &&
|
|
|
|
+ // this.optionList.length === 1
|
|
|
|
+ // ) {
|
|
|
|
+ // this.$emit("input", this.optionList[0].id);
|
|
|
|
+ // this.$emit("change", this.optionList[0]);
|
|
|
|
+ // this.$emit("select-default", this.optionList[0]);
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
},
|
|
},
|
|
select() {
|
|
select() {
|
|
this.$emit("input", this.selected);
|
|
this.$emit("input", this.selected);
|