From 19822a539c39bacddf79bdd679cc0ce8bcabfc77 Mon Sep 17 00:00:00 2001 From: lilinyuan <1084668738@qq.com> Date: Fri, 29 Mar 2024 15:34:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9tablecol=E6=98=BE?= =?UTF-8?q?=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fvcomponents/fvTableColumn/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fvcomponents/fvTableColumn/index.vue b/src/fvcomponents/fvTableColumn/index.vue index 243a370..c57c4cf 100644 --- a/src/fvcomponents/fvTableColumn/index.vue +++ b/src/fvcomponents/fvTableColumn/index.vue @@ -49,7 +49,7 @@ import { isVNode } from 'vue' if(column && column?.formatter) { return column.formatter(row, column, value, $index) || '--' } - return value ? value.toString() : '--' + return value !== null && value !== undefined ? value.toString() : '--' } From a5a2e099a259c855e44e02e4c495b83d9ec524d2 Mon Sep 17 00:00:00 2001 From: lilinyuan <1084668738@qq.com> Date: Fri, 29 Mar 2024 15:34:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 842e7e2..09b5f36 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,6 +1,6 @@ import axios from "axios"; import { AxiosCanceler } from "./axiosCanceler"; -import { ElMessage, ElMessageBox } from "element-plus"; +import { ElMessageBox, ElNotification } from "element-plus"; import { getToken, removeToken } from "./auth"; axios.defaults.headers['Content-Type']='application/json' @@ -48,21 +48,37 @@ serveice.interceptors.response.use(response=>{ case 402: break; case 403: - ElMessage.warning('禁止访问') + ElNotification({ + title: '系统提示', + message: '禁止访问', + type: 'warning' + }) removeToken() window.location = '/forbidden' break; case 404: - ElMessage.warning('不存在的地址') + ElNotification({ + title: '系统提示', + message: '不存在的地址', + type: 'error' + }) break; case 405: - ElMessage.warning('传输格式错误,请检查') + ElNotification({ + title: '系统提示', + message: '传输格式错误,请检查', + type: 'error' + }) break; case 500: if (response.data){ return response.data }else { - ElMessage.error('系统未知错误') + ElNotification({ + title: '系统提示', + message: '系统未知错误', + type: 'error' + }) break; } } From e418b588f6646cbf1abf9d9f7aa68a944e447664 Mon Sep 17 00:00:00 2001 From: lilinyuan <1084668738@qq.com> Date: Fri, 29 Mar 2024 15:41:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9request=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 09b5f36..a1d99e7 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -48,13 +48,12 @@ serveice.interceptors.response.use(response=>{ case 402: break; case 403: + console.log(response) ElNotification({ title: '系统提示', - message: '禁止访问', + message: response.data.msg, type: 'warning' }) - removeToken() - window.location = '/forbidden' break; case 404: ElNotification({ @@ -70,6 +69,15 @@ serveice.interceptors.response.use(response=>{ type: 'error' }) break; + case 511: + ElNotification({ + title: '系统提示', + message: '禁止访问', + type: 'error' + }) + removeToken() + window.location = '/forbidden' + break; case 500: if (response.data){ return response.data