@CustomDialog
export struct ViewBoardCustomDialog {
controller: CustomDialogController = new CustomDialogController({ builder: ViewBoardCustomDialog() })
onStart: (isReadOnly: boolean) => void = (isReadOnly: boolean) => {
}
build() {
Column() {
Button("创建只读白板").onClick(e => {
this.onStart(true);
}).margin({ top: 10, bottom: 10 })
Button("创建读写白板").onClick(e => {
this.onStart(false);
}).margin({ top: 10, bottom: 10 })
}
}
}
示例参考如下: