@Preview
@Component
export struct EmptyViewComp {
  @Prop promptText: string = '暂无数据' // 默认提示文字
  @Prop imageSrc: ResourceStr = $r('app.media.zanwushuju') // 默认图片
  @Prop isVisibility:boolean = false;

  build() {
    Stack({ alignContent: Alignment.Center }) {
     Column() {
        Image(this.imageSrc)
          .width(100)
          .height(120)
        Text(this.promptText)
          .fontSize(16)
          .fontColor(Color.Gray)
      }
      .width('100%')
      .height('100%')
      .justifyContent(FlexAlign.Center)
    }
    .width('100%')
    .height('100%')
    .visibility(this.isVisibility?Visibility.Visible:Visibility.Hidden)
  }
}
