1234567891011121314151617181920212223242526272829303132333435 |
- Page({
- onShareAppMessage() {
- return {
- title: '设置页面标题',
- path: 'packageAPI/pages/page/set-navigation-bar-title/set-navigation-bar-title'
- }
- },
- setNaivgationBarTitle(e) {
- const title = e.detail.value.title
- console.log(title)
- wx.setNavigationBarTitle({
- title,
- success() {
- console.log('setNavigationBarTitle success')
- },
- fail(err) {
- console.log('setNavigationBarTitle fail, err is', err)
- }
- })
- return false
- },
- onLoad() {
- this.setData({
- theme: wx.getSystemInfoSync().theme || 'light'
- })
- if (wx.onThemeChange) {
- wx.onThemeChange(({theme}) => {
- this.setData({theme})
- })
- }
- }
- })
|