From c1330a8d02be1e8f5d712a21c94e3281d503e546 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Mon, 21 Apr 2025 20:19:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/main.ts | 5 +- src/pages/Index/History.vue | 408 ++++++++++++------------------------------ src/services/Index/history.ts | 4 +- 4 files changed, 118 insertions(+), 300 deletions(-) diff --git a/package.json b/package.json index 8ff72ed..ae3f7ff 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "axios": "^1.7.7", "date-fns": "^4.1.0", "dayjs": "^1.11.13", + "el-table-infinite-scroll": "^3.0.6", "element-plus": "^2.8.5", "less": "^4.2.0", "mitt": "^3.0.1", diff --git a/src/main.ts b/src/main.ts index 0db684b..db735fb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,11 +3,13 @@ import './style.css' import App from './App.vue' import router from './router/router' import ElementPlus from 'element-plus' +import locale from 'element-plus/es/locale/lang/zh-cn' import 'element-plus/dist/index.css' import * as ElementPlusIconsVue from '@element-plus/icons-vue' // import './mock/index' import { createPinia } from 'pinia' import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' +import ElTableInfiniteScroll from "el-table-infinite-scroll"; import Confirm from './components/Confirm.vue' const pinia = createPinia() @@ -19,5 +21,6 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component('Confirm', Confirm) app.use(router) app.use(pinia) -app.use(ElementPlus) +app.use(ElementPlus, { locale, zIndex: 3000 }) +app.use(ElTableInfiniteScroll); app.mount('#app') diff --git a/src/pages/Index/History.vue b/src/pages/Index/History.vue index 62561e2..8b6ad88 100644 --- a/src/pages/Index/History.vue +++ b/src/pages/Index/History.vue @@ -1,51 +1,47 @@ diff --git a/src/services/Index/history.ts b/src/services/Index/history.ts index b8fd3f0..220484d 100644 --- a/src/services/Index/history.ts +++ b/src/services/Index/history.ts @@ -17,10 +17,10 @@ export const getHistoryInfo = async (params: paramsType) => { //删除历史记录 -export const deleteHistoryInfo = async (id: number) => { +export const deleteHistoryInfo = async (ids: string) => { try { const res = await apiClient.post( - `/api/v1/app/reactionResult/deleteRecord?id=${id}`, + `/api/v1/app/reactionResult/deleteRecordByIds?id=${ids}`, ) return res.data } catch (error) {