@CustomDialog export struct DeleteDialog { controller: CustomDialogController delete=(isDelete:boolean)=>{ } build() { Column({ space: 20 }) { Row({ space: 5 }) { Image($r('app.media.confim')).width(24) Text('是否删除该笔记').fontColor('rgba(35, 33, 34, 1)') }.width('100%') .justifyContent(FlexAlign.Center) Row() { Text('取消') .width(77) .height(30) .borderRadius(6) .textAlign(TextAlign.Center) .fontColor('rgba(255, 255, 255, 1)') .border({ width: 1, color: 'rgba(117, 104, 96, 1)' }) .fontSize(12) .backgroundColor('rgba(117, 104, 96, 1)') .onClick(()=>{ this.delete(false) this.controller.close() }) Text('确定') .width(77) .height(30) .borderRadius(6) .textAlign(TextAlign.Center) .fontColor('rgba(117, 104, 96, 1)') .border({ width: 1, color: 'rgba(117, 104, 96, 1)' }) .fontSize(12) .backgroundColor('rgba(254, 222, 155, 1)') .onClick(()=>{ this.delete(true) this.controller.close() }) // YtButton( // { // btContent: '取消', // btWidth: 77, // btHeight: 30, // btFontColor: 'rgba(255, 255, 255, 1)', // btBorder: { width: 1, color: 'rgba(117, 104, 96, 1)' }, // btFontSize: 12, // bgc: 'rgba(117, 104, 96, 1)', // click: () => { // yTToast.hide() // } // } // ) // YtButton( // { // btContent: '确定', // btWidth: 77, // btHeight: 30, // btFontSize: 12, // btFontColor: 'rgba(117, 104, 96, 1)', // btBorder: { width: 1, color: 'rgba(117, 104, 96, 1)' }, // bgc: 'rgba(254, 222, 155, 1)', // click: item.click // } // ) } .justifyContent(FlexAlign.SpaceBetween) .width('100%') } .width(280) .height(118) .backgroundColor(Color.White) .border({ width: 1, color: 'rgba(117, 104, 96, 1)' }) .borderRadius(12) .padding(20) } }