You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
806 B
50 lines
806 B
// 顶部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 });
|
|
},
|
|
},
|
|
});
|
|
|