dialog.js 610 B

1234567891011121314151617181920212223242526272829303132
  1. import CustomPage from '../../../base/CustomPage'
  2. CustomPage({
  3. onShareAppMessage() {
  4. return {
  5. title: 'dialog',
  6. path: 'page/weui/example/dialog/dialog'
  7. }
  8. },
  9. data: {
  10. dialogShow: false,
  11. showOneButtonDialog: false,
  12. buttons: [{text: '取消'}, {text: '确定'}],
  13. oneButton: [{text: '确定'}],
  14. },
  15. openConfirm() {
  16. this.setData({
  17. dialogShow: true
  18. })
  19. },
  20. tapDialogButton() {
  21. this.setData({
  22. dialogShow: false,
  23. showOneButtonDialog: false
  24. })
  25. },
  26. tapOneDialogButton() {
  27. this.setData({
  28. showOneButtonDialog: true
  29. })
  30. }
  31. })