sidenavigation.js 515 B

1234567891011121314151617181920212223242526272829
  1. Page({
  2. data: {
  3. show: false,
  4. theme: 'light'
  5. },
  6. onLoad() {
  7. this.setData({
  8. theme: wx.getSystemInfoSync().theme || 'light'
  9. })
  10. if (wx.onThemeChange) {
  11. wx.onThemeChange(({theme}) => {
  12. this.setData({theme})
  13. })
  14. }
  15. },
  16. show() {
  17. this.setData({show: true})
  18. },
  19. hide() {
  20. this.setData({show: false})
  21. },
  22. onShareAppMessage() {
  23. return {
  24. title: '侧边导航栏',
  25. path: 'packageExtend/pages/adapt/sidenavigation/sidenavigation'
  26. }
  27. },
  28. })