From 06ea40c91c34d8cdbefa3cc2b22480ef492ede4b Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Sat, 26 Aug 2023 10:51:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePaging.ts | 2 ++ src/views/company/dialog_index.vue | 27 +++++++++++++++++++++------ src/views/user_role/auth.vue | 19 ++++++++++--------- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/hooks/usePaging.ts b/src/hooks/usePaging.ts index a42ed87..94ddf9c 100644 --- a/src/hooks/usePaging.ts +++ b/src/hooks/usePaging.ts @@ -4,6 +4,7 @@ import { reactive, toRaw } from "vue"; interface Options { page?: number; size?: number; + limit?: number; fetchFun: (_arg: any) => Promise; params?: Record; firstLoading?: boolean; @@ -39,6 +40,7 @@ export function usePaging(options: Options) { .then((res: any) => { pager.count = res?.count; res.lists ? (pager.lists = res.lists) : (pager.lists = res.data); + if(pager.lists==[]||pager.lists==null||pager.lists==undefined)res.list ? pager.lists = res.list: null; // pager.lists = res?.lists pager.extend = res?.extend; return Promise.resolve(res); diff --git a/src/views/company/dialog_index.vue b/src/views/company/dialog_index.vue index 6f474e4..591ef23 100644 --- a/src/views/company/dialog_index.vue +++ b/src/views/company/dialog_index.vue @@ -15,7 +15,7 @@ v-model="queryParams.company_type" placeholder="公司类型" clearable - @change="getLists" + @change="changeType" :style="{ width: '100%' }" > - - - + + + + + @@ -59,7 +65,11 @@