123456789101112131415161718192021222324 |
- import {
- observable,
- action
- } from "mobx-miniprogram"
- export const store = observable({
- userPhone: 111,
- // tabbar页面
- active: 0,
- // 页面高度
- pageHeight: 0,
- //userInfo
- userInfo: {},
- get Guser() {},
- // 方法
- upDateActive: action(function (index) {
- this.active = index
- }),
- setPageHeight: action(function (num) {
- this.pageHeight = num
- }),
- setUserInfo: action(function (obj) {
- this.userInfo = JSON.parse(JSON.stringify(obj))
- })
- })
|