mirror of
https://github.com/huge-dream/django-vue3-admin.git
synced 2026-09-30 07:46:11 +00:00
11 lines
276 B
TypeScript
11 lines
276 B
TypeScript
import { toRaw } from 'vue';
|
|
import { DictionaryStore } from '/@/stores/dictionary';
|
|
|
|
/**
|
|
* @method 获取指定name字典
|
|
*/
|
|
export const dictionary = (name: string) => {
|
|
const dict = DictionaryStore()
|
|
const dictionary = toRaw(dict.data)
|
|
return dictionary[name]
|
|
} |