index.js 499 B

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