import { defineStore } from 'pinia' export const useStore = defineStore('tumour', { state: () => { return { // 字典 dict: [], // 页面是否处于隐藏状态 documentHidden: false } }, getters: {}, actions: { getDict(val) { if (!val) return [] return this.dict[val] || [] }, onDocumentHidden(value) { this.documentHidden = value } } })