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() : '--' } diff --git a/src/utils/request.js b/src/utils/request.js index 07d5fd2..a1d99e7 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' @@ -49,16 +49,32 @@ serveice.interceptors.response.use(response=>{ break; case 403: console.log(response) - ElMessage.warning(response.data.msg) + ElNotification({ + title: '系统提示', + message: response.data.msg, + type: 'warning' + }) break; case 404: - ElMessage.warning('不存在的地址') + ElNotification({ + title: '系统提示', + message: '不存在的地址', + type: 'error' + }) break; case 405: - ElMessage.warning('传输格式错误,请检查') + ElNotification({ + title: '系统提示', + message: '传输格式错误,请检查', + type: 'error' + }) break; case 511: - ElMessage.warning('禁止访问') + ElNotification({ + title: '系统提示', + message: '禁止访问', + type: 'error' + }) removeToken() window.location = '/forbidden' break; @@ -66,7 +82,11 @@ serveice.interceptors.response.use(response=>{ if (response.data){ return response.data }else { - ElMessage.error('系统未知错误') + ElNotification({ + title: '系统提示', + message: '系统未知错误', + type: 'error' + }) break; } } diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index d0f7e4c..9ed57b2 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -120,7 +120,12 @@ const tableConfig = reactive({ return (
handleEdit(row)}>编辑 - handleDel(row)}>删除 + { + row.userType != 0 ? + handleDel(row)}>删除 : + null + } +
) } diff --git a/vite.config.js b/vite.config.js index f8e0c64..3dc021f 100644 --- a/vite.config.js +++ b/vite.config.js @@ -59,7 +59,7 @@ export default defineConfig({ terserOptions: { compress: { drop_console: false, // 生产环境移除log - drop_debugger: false // 生产环境禁用debugger + drop_debugger: true // 生产环境禁用debugger } } },