dialog.js 530 B

123456789101112131415161718192021222324
  1. Page({
  2. data: {
  3. dialogShow: false,
  4. showOneButtonDialog: false,
  5. buttons: [{text: '取消'}, {text: '确定'}],
  6. oneButton: [{text: '确定'}],
  7. },
  8. openConfirm: function () {
  9. this.setData({
  10. dialogShow: true
  11. })
  12. },
  13. tapDialogButton(e) {
  14. this.setData({
  15. dialogShow: false,
  16. showOneButtonDialog: false
  17. })
  18. },
  19. tapOneDialogButton(e) {
  20. this.setData({
  21. showOneButtonDialog: true
  22. })
  23. }
  24. });