/*
 * 抓图图片展示dialog
 * EZOpenSDK
 *
 * Created by junecheng on 2024/8/5.
 * Copyright (c) 2024年 Ezviz. All rights reserved.
 */
@CustomDialog
@Preview
export default struct CaptureCameraPicDialog {
  imagUrl = ""
  controller: CustomDialogController

  build() {

    Column() {
      Image(this.imagUrl)
        .align(Alignment.Top)
        .objectFit(ImageFit.Contain)// 确保图片按自身比例显示
        .width('100%')
      Button('关闭')
        .onClick(() => {
          if (this.controller != undefined) {
            this.controller.close()
          }
        })
        .padding({ left: 90, right: 90 })
        .fontSize(15)//.width(50)
        .margin({ top: 15 })
    }
    .backgroundColor(Color.White)
    .margin({ left: 30, right: 30 })
    .padding({
      bottom: 20,
      left: 10,
      right: 10,
      top: 40
    })
    .borderRadius(20) // 设置圆角半径

  }
}