// 顶部tab切换组件 Component({ properties: { menuList: { type: Array, value: [ { name: "", value: "", }, ], }, currMenu: { type: String, value: "", }, tabPionts: { type: Boolean, value: false, }, //tab样式,居中center/偏左left tabAlign: { type: String, value: "left", }, }, data: {}, lifetimes: { ready() { this.init(); }, }, methods: { init() { console.log("顶部tab切换组件初始化完成"); }, shiftMenu(e) { const { target: { dataset: { val }, }, } = e; this.triggerEvent("shift", { value: val }); }, }, });