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