index.js 723 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. isMore:{
  20. type:Boolean,
  21. value:true
  22. }
  23. },
  24. /**
  25. * 组件的初始数据
  26. */
  27. data: {
  28. },
  29. /**
  30. * 组件的方法列表
  31. */
  32. methods: {
  33. moreClick() {
  34. this.triggerEvent("getExhibitionTitle", this.data.title)
  35. }
  36. }
  37. })