hm_rcwapp/entry/src/main/ets/model/uiModel/BeanModel.ets

23 lines
417 B
Plaintext

export class ErrorOfEmptyModel{
// image: Resource = $r('app.media.icon_error') ;
//0 = 空白页 -1 表示错误页
type:number = 0;
msg: string | Resource = "";
constructor(type:number, msg: string | Resource) {
this.type = type;
this.msg = msg;
}
getIcon():Resource{
if (this.type == 0){
return $r('app.media.icon_empty')
}
return $r('app.media.icon_error')
}
}