index.js 349 B

12345678910111213141516171819202122232425
  1. // commpents/newsList/index.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. list: { type: Array }
  8. },
  9. /**
  10. * 组件的初始数据
  11. */
  12. data: {
  13. },
  14. /**
  15. * 组件的方法列表
  16. */
  17. methods: {
  18. detail: function (e) {
  19. this.triggerEvent('detail', { id: e.currentTarget.dataset.id });
  20. }
  21. }
  22. })