提交 004341c1 编写于 作者: Neuromancer255's avatar Neuromancer255

下拉列表(单选)调整

上级 555dea6d
...@@ -46,25 +46,10 @@ export default class AppSelect extends Vue { ...@@ -46,25 +46,10 @@ export default class AppSelect extends Vue {
return this.value; return this.value;
} }
set curValue(value:any){} set curValue(value:any){
this.$emit("change", value);
/**
* 监听表单请求完成
* @memberof AppSelectDropDown
*/
@Watch("dataOverLoad")
onDataOverLoadChange(newVal: any, oldVal: any){
this.load();
} }
/**
* 表单请求完成
*
* @type {*}
* @memberof AppSelectDropDown
*/
@Prop() public dataOverLoad?: any;
/** /**
* change事件 * change事件
* *
...@@ -80,11 +65,11 @@ export default class AppSelect extends Vue { ...@@ -80,11 +65,11 @@ export default class AppSelect extends Vue {
if (Object.is(this.codeListType, 'DYNAMIC')) { if (Object.is(this.codeListType, 'DYNAMIC')) {
for(let key in this.options){ for(let key in this.options){
if (typeof this.options[key].id == 'number') { if (typeof this.options[key].id == 'number') {
devalue = +devalue devalue = +devalue;
} }
} }
} }
this.$emit("change", devalue); this.curValue = devalue;
} }
/** /**
...@@ -192,10 +177,10 @@ export default class AppSelect extends Vue { ...@@ -192,10 +177,10 @@ export default class AppSelect extends Vue {
* @param {*} val * @param {*} val
* @memberof AppSelect * @memberof AppSelect
*/ */
@Watch('data', { deep: true }) @Watch('value')
onDataChange(newVal: any, val: any) { onDataChange(newVal: any, oldVal: any) {
if (newVal) { if (newVal) {
// this.handleOtherParam(); this.load();
} }
} }
...@@ -206,6 +191,10 @@ export default class AppSelect extends Vue { ...@@ -206,6 +191,10 @@ export default class AppSelect extends Vue {
if (Object.is(this.codeListType, "STATIC")) { if (Object.is(this.codeListType, "STATIC")) {
this.overload = true; this.overload = true;
this.options = this.$store.getters.getCodeListItems(this.tag); this.options = this.$store.getters.getCodeListItems(this.tag);
} else {
if (this.curValue) {
this.load();
}
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册