|
|
@ -43,11 +43,19 @@ export default { |
|
|
name: "mdp-select-dict-x", |
|
|
name: "mdp-select-dict-x", |
|
|
components: {}, |
|
|
components: {}, |
|
|
computed: { |
|
|
computed: { |
|
|
currentItem() { |
|
|
|
|
|
if (this.dict) { |
|
|
|
|
|
return this.dict.find((k) => k.id == this.myVal); |
|
|
|
|
|
} else { |
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
currentItem(){ |
|
|
|
|
|
if(this.myVal===''||this.myVal===null){ |
|
|
|
|
|
return {id:'',name:'无',className:'info'}; |
|
|
|
|
|
} |
|
|
|
|
|
if(this.dict){ |
|
|
|
|
|
var item= this.dict.find(k=>k.id==this.myVal) |
|
|
|
|
|
if(item){ |
|
|
|
|
|
return item |
|
|
|
|
|
}else{ |
|
|
|
|
|
return {id:this.myVal,name:this.myVal,className:'info'} |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
return {id:this.myVal,name:this.myVal,className:'info'}; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
avaterCpd() { |
|
|
avaterCpd() { |
|
|
|