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

Revert "app-span 组件 动态代码表多选值回填"

This reverts commit ee992c6e.
上级 ee992c6e
......@@ -175,15 +175,18 @@ export default class AppSpan extends Vue {
* @memberof AppSpan
*/
public setText(){
if(this.items.length > 0){ // 如果是多数据回显
let valueArr = this.value.split(',');
valueArr.forEach((val:string)=>{
this.items.forEach((item:any)=>{
if(val === item.id){
this.text = this.text + `,${item.text}`;
}
})
})
if(this.items.length>0){
this.currentItem= this.items.find((item:any)=>{
return item.value == this.value;
});
if(this.currentItem){
this.text = this.currentItem.text;
}else{
// 不匹配显示原值,不存在显示空值
if(this.value){
this.text = this.value;
}
}
}else{
this.text = this.value;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册