liujintao 2 maanden geleden
bovenliggende
commit
5d9f6d6110
2 gewijzigde bestanden met toevoegingen van 4 en 1 verwijderingen
  1. 3 0
      src/utils/dictionary.ts
  2. 1 1
      src/views/system/user/crud.tsx

+ 3 - 0
src/utils/dictionary.ts

@@ -7,5 +7,8 @@ import { DictionaryStore } from '/@/stores/dictionary';
 export const dictionary = (name: string) => {
   const dict = DictionaryStore()
   const dictionary = toRaw(dict.data)
+  if (!dictionary || Object.keys(dictionary).length === 0) {
+    DictionaryStore().getSystemDictionarys()
+  }
   return dictionary[name]
 }

+ 1 - 1
src/views/system/user/crud.tsx

@@ -266,7 +266,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
                 url: url,
                 params: {
                   page: 1,
-                  limit: 10,
+                  limit: 30,
                 },
               }).then((ret: any) => {
                 return ret.data;