guhongwei 2 gadi atpakaļ
vecāks
revīzija
8200a64b71

+ 4 - 2
src/views/system/module/index.vue

@@ -21,7 +21,7 @@
 <script setup lang="ts">
 // 基础
 import type { Ref } from 'vue';
-import { onMounted, ref } from 'vue';
+import { onMounted, ref, getCurrentInstance } from 'vue';
 import router from '@/router';
 
 import { ElMessage } from 'element-plus';
@@ -32,11 +32,13 @@ import type { IQueryResult } from '@/util/types.util';
 const moduleAxios = ModuleStore();
 const dictAxios = DictDataStore();
 
+const { proxy } = getCurrentInstance() as any;
+
 // 分页数据
 const list: Ref<any> = ref([]);
 const total: Ref<any> = ref(0);
 const skip = 0;
-const limit = 10;
+const limit = proxy.$limit;
 const fields: Ref<any> = ref([
   { label: '模块名称', model: 'name', isSearch: true },
   { label: '模块地址', model: 'url' },

+ 4 - 2
src/views/system/role/index.vue

@@ -18,7 +18,7 @@
 // 基础
 import _ from 'lodash';
 import type { Ref } from 'vue';
-import { onMounted, ref } from 'vue';
+import { onMounted, ref, getCurrentInstance } from 'vue';
 import { ElMessage } from 'element-plus';
 import router from '@/router';
 // 接口
@@ -28,11 +28,13 @@ import type { IQueryResult } from '@/util/types.util';
 const roleAxios = RoleStore();
 const dictAxios = DictDataStore();
 
+const { proxy } = getCurrentInstance() as any;
+
 // 分页数据
 const list: Ref<any> = ref([]);
 const total: Ref<any> = ref(0);
 const skip = 0;
-const limit = 10;
+const limit = proxy.$limit;
 const fields: Ref<any> = ref([
   { label: '角色名称', model: 'name', isSearch: true },
   { label: '角色编码', model: 'code' },