From ae10383f1760e610633c17b9a72fb4dcd7ddc04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AD=90=E9=BB=98?= <925456043@qq.com> Date: Mon, 13 Apr 2026 14:55:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E9=BD=90=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E9=A1=B5=E5=88=86=E9=A1=B5=E8=AF=B7=E6=B1=82=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 让 PageData 支持注入自定义 requestClient - 修复知识库分享页列表请求仍走默认 api 的问题 --- easyflow-ui-admin/app/src/components/page/PageData.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easyflow-ui-admin/app/src/components/page/PageData.vue b/easyflow-ui-admin/app/src/components/page/PageData.vue index 50c4aaa..aa07b9f 100644 --- a/easyflow-ui-admin/app/src/components/page/PageData.vue +++ b/easyflow-ui-admin/app/src/components/page/PageData.vue @@ -13,12 +13,14 @@ interface PageDataProps { pageSize?: number; pageSizes?: number[]; extraQueryParams?: Record; + requestClient?: any; } const props = withDefaults(defineProps(), { pageSize: 10, pageSizes: () => [10, 20, 50, 100], extraQueryParams: () => ({}), + requestClient: () => api, }); // 响应式数据 @@ -38,7 +40,7 @@ const doGet = async (params: Record) => { try { // 这里替换为你的实际 API 调用 // 例如:return await api.get(props.pageUrl, { params }) - const response = await api.get(`${props.pageUrl}`, { + const response = await props.requestClient.get(`${props.pageUrl}`, { params, }); const data = await response.data;