// commpents/tabs/index.js const app = getApp() Component({ options: { multipleSlots: true }, /** * 组件的属性列表 */ properties: { tabs: { type: Object }, }, /** * 组件的初始数据 */ data: {}, /** * 组件的方法列表 */ methods: { tabsChange(e) { const that = this; const { item } = e.currentTarget.dataset; that.triggerEvent('tabsChange', item) } } })