popup.js 736 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // component/popup/popup.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. typeOf: {
  8. type: "String",
  9. value: ''
  10. },
  11. title: {
  12. type: "String",
  13. value: ''
  14. },
  15. headTextOne: {
  16. type: "String",
  17. value: ''
  18. },
  19. headTextTwo: {
  20. type: "String",
  21. value: ''
  22. },
  23. content: {
  24. type: "Array",
  25. value: ''
  26. }
  27. },
  28. /**
  29. * 组件的初始数据
  30. */
  31. data: {
  32. flag: true
  33. },
  34. /**
  35. * 组件的方法列表
  36. */
  37. methods: {
  38. close: function () {
  39. this.setData({
  40. flag: !this.data.flag
  41. })
  42. this.triggerEvent('Close', {})
  43. },
  44. launchGroup: function () {
  45. this.triggerEvent('Group', {})
  46. }
  47. }
  48. })