A pinia style store for mpx framework
import mpx from '@mpxjs/core'
import { createPinia } from '@mpxjs/pinia'
const pinia = createPinia()
mpx.use(pinia)
import { defineStore } from '@mpxjs/pinia'
// 选项式
export const useOptionsStore = defineStore('options', {
state: () => {},
getters: {},
actions: {}
})
// 组合式
export const useSetupStore = defineStore('setup', () => {
let storeObj = {
name: ''
}
return {...storeObj}
})