Closed MelodyFish closed 1 year ago
Here is my mobx store code:
import { makeAutoObservable, action } from 'mobx' import { makePersistable } from 'mobx-persist-store' import PlatformContent from '../pages/WorkPlatform/Content'
class TabStore {
tabsList = JSON.parse(JSON.stringify([{ name: 'work', key: '/', url: '', icon: <img src={require('@/assets/img/work_on.png')} width={13} />, closable: false, }]))
constructor() {
makeAutoObservable(this)
makePersistable(
this,
{ name: 'tabsList', properties: ['tabsList'], storage: window.sessionStorage },
)
}
setTabsList(value) {
this.tabsList = value
}
} export { TabStore }
@codeBelt @jwoyame If you have time please check it, maybe it is a strange bug, thanks~
Console show the details: