|
@@ -177,11 +177,11 @@ export default class ByForm extends VueViews {
|
|
//设置下级组件值
|
|
//设置下级组件值
|
|
setChildrenComValue(){
|
|
setChildrenComValue(){
|
|
if(this.value){
|
|
if(this.value){
|
|
- for(const key in this.value){
|
|
|
|
- const code = key +'Comp';
|
|
|
|
- if((this as any).$refs[code] && (this as any).$refs[code][0] && (this as any).$refs[code][0].setValue){
|
|
|
|
- (this as any).$refs[code][0].setValue(this.value[key])
|
|
|
|
- }
|
|
|
|
|
|
+ for(const key in (this as any).$refs){
|
|
|
|
+ if(key.indexOf('Comp') >= 0 && (this as any).$refs[key] && (this as any).$refs[key][0] && (this as any).$refs[key][0].setValue){
|
|
|
|
+ const code = key.split('Comp')[0];
|
|
|
|
+ (this as any).$refs[key][0].setValue(this.value[code])
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|