myModal.js 814 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Component({
  2. /**
  3. * 组件的属性列表
  4. */
  5. properties: {
  6. haveImage: {
  7. type: "Boolean",
  8. value: false
  9. },
  10. text: {
  11. type: "Array",
  12. value: []
  13. },
  14. type: {
  15. type: "String",
  16. value: ""
  17. },
  18. isCloseShow: {
  19. type: "Boolean",
  20. value: true
  21. },
  22. btnText:{
  23. type: "String",
  24. value: '确定'
  25. }
  26. },
  27. /**
  28. * 组件的初始数据
  29. */
  30. data: {
  31. flag: true,
  32. },
  33. /**
  34. * 组件的方法列表
  35. */
  36. methods: {
  37. confirm: function () {
  38. this.triggerEvent('confirm', {})
  39. },
  40. close: function(){
  41. this.triggerEvent('close', {})
  42. }
  43. }
  44. })