index.js 445 B

123456789101112131415161718192021222324252627
  1. // commpents/tabs/index.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. tabs: { type: Object }
  8. },
  9. /**
  10. * 组件的初始数据
  11. */
  12. data: {
  13. },
  14. /**
  15. * 组件的方法列表
  16. */
  17. methods: {
  18. tabsChange(e) {
  19. const that = this;
  20. const { item } = e.currentTarget.dataset;
  21. that.triggerEvent('tabsChange', item)
  22. }
  23. }
  24. })