dictionary.js 315 字节
Newer Older
1
import { store } from '@/store/index'
Mr.奇淼('s avatar
Mr.奇淼( 已提交
2
//  获取字典方法 使用示例 getDict('sex').then(res)  或者 async函数下 const res = await getDict('sex')
3 4 5 6
export const getDict = async (type) => {
    await store.dispatch("dictionary/getDictionary", type)
    return store.getters["dictionary/getDictionary"][type]
}