{{ username }}
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 5c339ca..e369960 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -35,8 +35,14 @@ import errorHandler from "@/utils/errorHandler";
import registerGlobComp from '@/components'
+
const app = createApp(App);
+// 自定义警告处理程序,忽略所有警告
+if (import.meta.env.VUE_APP_SILENCE_WARNINGS === true) {
+ app.config.warnHandler = () => {};
+}
+
app.config.errorHandler = errorHandler;
// register the element Icons component
diff --git a/frontend/src/types/env.d.ts b/frontend/src/types/env.d.ts
index be1365c..4442bae 100644
--- a/frontend/src/types/env.d.ts
+++ b/frontend/src/types/env.d.ts
@@ -16,6 +16,7 @@ declare type Recordable
= Record;
declare interface ViteEnv {
VITE_USER_NODE_ENV: 'development' | 'production' | 'test';
VITE_GLOB_APP_TITLE: string;
+ VUE_APP_SILENCE_WARNINGS: boolean;
VITE_PORT: number;
VITE_OPEN: boolean;
VITE_REPORT: boolean;
diff --git a/frontend/src/views/demo/proTable/index.vue b/frontend/src/views/demo/proTable/index.vue
index 70c1f19..1f2a02e 100644
--- a/frontend/src/views/demo/proTable/index.vue
+++ b/frontend/src/views/demo/proTable/index.vue
@@ -1,9 +1,9 @@
@@ -17,7 +17,7 @@
- 查看
编辑
@@ -89,8 +89,9 @@ const columns = reactive[]>([
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
{
prop: 'username',
- label: '用户姓名',
- search: { el: 'input', tooltip: '我是搜索提示' },
+ label: '姓名',
+ width: 120,
+ search: { el: 'input'},
},
{
prop: 'gender',
@@ -107,39 +108,39 @@ const columns = reactive[]>([
// 自定义 search 显示内容
render: ({ searchParam }) => {
return (
-
-
- -
-
-
+
+
+ -
+
+
)
},
},
},
{ prop: 'idCard', label: '身份证号', search: { el: 'input' } },
{ prop: 'email', label: '邮箱' },
- { prop: 'address', label: '居住地址' },
+ { prop: 'address', label: '居住地址', width: 120 },
{
prop: 'status',
- label: '用户状态',
+ label: '状态',
enum: dictStore.getDictData('status'),
search: { el: 'tree-select', props: { filterable: true } },
fieldNames: { label: 'userLabel', value: 'userStatus' },
render: scope => {
return (
- <>
- {BUTTONS.value.status ? (
- changeStatus(scope.row)}
- />
- ) : (
- {scope.row.status ? '启用' : '禁用'}
- )}
- >
+ <>
+ {BUTTONS.value.status ? (
+ changeStatus(scope.row)}
+ />
+ ) : (
+ {scope.row.status ? '启用' : '禁用'}
+ )}
+ >
)
},
},
@@ -150,7 +151,7 @@ const columns = reactive[]>([
search: {
el: 'date-picker',
span: 1,
- props: { type: 'daterange', valueFormat: 'YYYY-MM-DD'},
+ props: { type: 'daterange', valueFormat: 'YYYY-MM-DD' },
defaultValue: ['2024-11-12', '2024-12-12'],
},
},
@@ -188,7 +189,7 @@ const changeStatus = async (row: User.ResUserList) => {
// 导出用户列表
const downloadFile = async () => {
ElMessageBox.confirm('确认导出用户数据?', '温馨提示', { type: 'warning' }).then(() =>
- useDownload(exportUserInfo, '用户列表', proTable.value?.searchParam),
+ useDownload(exportUserInfo, '用户列表', proTable.value?.searchParam),
)
}