소스 검색

增加示例注释

QM303176530 4 년 전
부모
커밋
2512e1ba13
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      web/src/utils/dictionary.js

+ 1 - 1
web/src/utils/dictionary.js

@@ -1,5 +1,5 @@
 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]