import { defineStore } from 'pinia' import businessDEl from '@/api/business/dictionary.js' export const enumMaplistStore = defineStore('enumMaplist', () => { // 定义state const enumMaplist = ref(JSON.parse(localStorage.getItem('enumMaplist')) || []) const businessDElasync = async () => { const res = await businessDEl.getPersionsDEl() enumMaplist.value = [] enumMaplist.value = res localStorage.setItem('enumMaplist', JSON.stringify(res)) console.log(res) } return { enumMaplist, businessDElasync } })