Files
doc-mini-app/components/list-nav-bar/list-nav-bar.js
2024-08-20 23:59:50 +08:00

52 lines
1.0 KiB
JavaScript

const app = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
showNavBtn: {
type: Boolean,
value: true
},
title: {
type: String,
value: '标题'
},
color: {
type: String,
value: '#fff'
},
},
/**
* 组件的初始数据
*/
data: {
navBarHeight: app.globalData.navBarHeight,
menuRight: app.globalData.menuRight,
menuTop: app.globalData.menuTop,
menuHeight: app.globalData.menuHeight,
},
/**
* 组件的方法列表
*/
methods: {
// 回退
navBack() {
wx.navigateBack()
this.triggerEvent('onBack')
},
// 回主页
// navHome() {
// wx.switchTab({
// url: '/src/pages/home/home'
// })
// this.triggerEvent('onHome')
// },
// navIcon() {
// this.triggerEvent('onIcon')
// }
},
})