提交修改
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
const app = getApp()
|
||||
|
||||
Component({
|
||||
properties: {
|
||||
active: { type: String, value: 'home' },
|
||||
themeMode: { type: String, value: 'light' },
|
||||
tabs: {
|
||||
type: Array,
|
||||
value: [
|
||||
@@ -10,6 +13,11 @@ Component({
|
||||
],
|
||||
},
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
this.setData({ themeMode: app.globalData.themeMode })
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onSwitch(e) {
|
||||
this.triggerEvent('switch', { key: e.currentTarget.dataset.key })
|
||||
|
||||
Reference in New Issue
Block a user