Fork自 FLIPPED-AURORA / gin-vue-admin
体验新版 GitCode,发现更多精彩内容 >>
import { store } from '@/store/index'
// 获取字典方法 使用示例 getDict('sex').then(res) 或者 async函数下 const res = await getDict('sex')
export const getDict = async (type) => { await store.dispatch("dictionary/getDictionary", type) return store.getters["dictionary/getDictionary"][type] }