YtDoubleConfirm.ets 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { YtButton, yTToast } from '../../../../Index';
  2. import { BasicType } from '../models';
  3. @Builder
  4. export function yTDoubleConfirm(item: BasicType<undefined>) {
  5. Column() {
  6. Text(item.text)
  7. .fontSize(14)
  8. .fontColor('#FF000000')
  9. .margin({ bottom: 18 })
  10. Text(item.message)
  11. .fontColor($r('sys.color.mask_secondary'))
  12. .lineHeight(18)
  13. .fontSize(13)
  14. .margin({ bottom: 18 })
  15. Row() {
  16. YtButton(
  17. {
  18. btContent: '确定',
  19. btWidth: 108,
  20. btHeight: 37,
  21. btFontSize: 12,
  22. click: item.click
  23. }
  24. )
  25. YtButton(
  26. {
  27. btContent: '取消',
  28. btWidth: 108,
  29. btHeight: 37,
  30. btFontColor: '#80000000',
  31. btBorder: { width: 1, color: '#33000000' },
  32. btFontSize: 12,
  33. bgc: Color.White,
  34. click: () => {
  35. yTToast.hide()
  36. }
  37. }
  38. )
  39. }
  40. .justifyContent(FlexAlign.SpaceBetween)
  41. .width('100%')
  42. }
  43. .height(160)
  44. .width(280)
  45. .padding({ top: 14, left: 24, right: 24 })
  46. .backgroundColor(Color.White)
  47. .borderRadius(8)
  48. }