dictionary.ts 276 B

1234567891011
  1. import { toRaw } from 'vue';
  2. import { DictionaryStore } from '/@/stores/dictionary';
  3. /**
  4. * @method 获取指定name字典
  5. */
  6. export const dictionary = (name: string) => {
  7. const dict = DictionaryStore()
  8. const dictionary = toRaw(dict.data)
  9. return dictionary[name]
  10. }