index.js 613 B

123456789101112131415161718192021222324252627282930313233343536
  1. // components/My_DisplayBox/index.js
  2. Component({
  3. options: {
  4. multipleSlots: true //允许使用多个slot
  5. },
  6. /**
  7. * 组件的属性列表
  8. */
  9. properties: {
  10. title: {
  11. type: String,
  12. value: "标题"
  13. },
  14. /* 更多点击回调 */
  15. getExhibitionTitle: {
  16. type: Function
  17. }
  18. },
  19. /**
  20. * 组件的初始数据
  21. */
  22. data: {
  23. },
  24. /**
  25. * 组件的方法列表
  26. */
  27. methods: {
  28. moreClick() {
  29. this.triggerEvent("getExhibitionTitle", this.data.title)
  30. }
  31. }
  32. })