import { createPinia, defineStore} from 'pinia' const store = createPinia() export const useIndexStore = defineStore('index', { state: () => ({ screen:{ tops: 47, height: 40, total: 87 } }), //计算属性:(基于state派生的数据) getters: { }, // 修改状态的逻辑 actions: { setScreen(data){ this.screen = data }, } }) export default store