fix: 修复前端控制台 eslint 告警

This commit is contained in:
2023-11-14 22:03:04 +08:00
parent abd4fb5368
commit f4523d2481
23 changed files with 41 additions and 43 deletions

View File

@@ -48,7 +48,7 @@
<span class="tooltip-value">
${el.value}
</span>
</div>`
</div>`,
)
.join('');
};

View File

@@ -7,7 +7,9 @@
>
<a-carousel-item v-for="(src, idx) in imageSrc" :key="idx">
<div style="padding: 10px 30px 15px">
<div style="margin-bottom: 5px; text-align: center">相互 (huá shuǐ) 交流 ( )</div>
<div style="margin-bottom: 5px; text-align: center"
>相互 (huá shuǐ) 交流 ( )</div
>
<img :src="src" style="width: 100%" alt="QrCode" />
<div style="text-align: center">扫码加VX备注 cnadmin 进群</div>
</div>

View File

@@ -92,7 +92,7 @@
const { proxy } = getCurrentInstance() as any;
const { success_failure_status_enum } = proxy.useDict(
'success_failure_status_enum'
'success_failure_status_enum',
);
const loginLogList = ref<LoginLogRecord[]>([]);

View File

@@ -69,7 +69,7 @@
<template #cell="{ record }">
<span :title="decodeURIComponent(record.requestUrl)">{{
record.requestUrl.match(
/(\w+):\/\/([^/:]+)(:\d*)?([^#|\?|\n]*)(\?.*)?/
/(\w+):\/\/([^/:]+)(:\d*)?([^#|\?|\n]*)(\?.*)?/,
)[4]
}}</span>
</template>

View File

@@ -100,12 +100,7 @@
<script lang="ts" setup>
import { getCurrentInstance, ref, toRefs, reactive } from 'vue';
import {
DataRecord,
ListParam,
list,
kickout,
} from '@/api/monitor/online';
import { DataRecord, ListParam, list, kickout } from '@/api/monitor/online';
import { getToken } from '@/utils/auth';
import checkPermission from '@/utils/permission';

View File

@@ -355,7 +355,7 @@
const { proxy } = getCurrentInstance() as any;
const { announcement_type, announcement_status_enum } = proxy.useDict(
'announcement_type',
'announcement_status_enum'
'announcement_status_enum',
);
const dataList = ref<DataRecord[]>([]);
@@ -552,7 +552,7 @@
.download(
'/system/announcement/export',
{ ...queryParams.value },
'公告数据'
'公告数据',
)
.finally(() => {
exportLoading.value = false;

View File

@@ -228,16 +228,16 @@
const res = await list(params);
dataList.value = res.data;
siteTitle.value = dataList.value.find(
(option) => option.code === 'site_title'
(option) => option.code === 'site_title',
);
siteCopyright.value = dataList.value.find(
(option) => option.code === 'site_copyright'
(option) => option.code === 'site_copyright',
);
siteLogo.value = dataList.value.find(
(option) => option.code === 'site_logo'
(option) => option.code === 'site_logo',
);
siteFavicon.value = dataList.value.find(
(option) => option.code === 'site_favicon'
(option) => option.code === 'site_favicon',
);
reset();
};
@@ -262,7 +262,7 @@
code: item[0],
value: item[1],
};
}
},
);
save(optionList).then((res) => {
appStore.save(form.value);

View File

@@ -524,7 +524,7 @@
record.children.forEach((r) => {
rowKeys.splice(
rowKeys.findIndex((key: number | undefined) => key === r.id),
1
1,
);
proxy.$refs.tableRef.select(r.id, false);
if (r.children) {

View File

@@ -539,7 +539,7 @@
record.children.forEach((r) => {
rowKeys.splice(
rowKeys.findIndex((key: number | undefined) => key === r.id),
1
1,
);
proxy.$refs.tableRef.select(r.id, false);
if (r.children) {

View File

@@ -378,7 +378,7 @@
*/
const handleSelectionChange = (rowKeys: Array<any>) => {
const unReadMessageList = dataList.value.filter(
(item) => rowKeys.indexOf(item.id) !== -1 && !item.isRead
(item) => rowKeys.indexOf(item.id) !== -1 && !item.isRead,
);
readMultiple.value = !unReadMessageList.length;
ids.value = rowKeys;

View File

@@ -439,7 +439,7 @@
const { proxy } = getCurrentInstance() as any;
const { data_scope_enum, dis_enable_status_enum } = proxy.useDict(
'data_scope_enum',
'dis_enable_status_enum'
'dis_enable_status_enum',
);
const dataList = ref<DataRecord[]>([]);
@@ -616,7 +616,7 @@
// 获取半选中的菜单
const halfCheckedNodes = proxy.$refs.menuRef.getHalfCheckedNodes();
const halfCheckedKeys = halfCheckedNodes.map(
(item: TreeNodeData) => item.key
(item: TreeNodeData) => item.key,
);
// eslint-disable-next-line prefer-spread
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
@@ -637,7 +637,7 @@
// 获取半选中的部门
const halfCheckedNodes = proxy.$refs.deptRef.getHalfCheckedNodes();
const halfCheckedKeys = halfCheckedNodes.map(
(item: TreeNodeData) => item.key
(item: TreeNodeData) => item.key,
);
// eslint-disable-next-line prefer-spread
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);

View File

@@ -734,7 +734,7 @@
handleCancel();
getList();
proxy.$message.success(res.msg);
}
},
);
}
});

View File

@@ -279,7 +279,7 @@
const { proxy } = getCurrentInstance() as any;
const { form_type_enum, query_type_Enum } = proxy.useDict(
'form_type_enum',
'query_type_Enum'
'query_type_Enum',
);
const tableList = ref<TableRecord[]>([]);
@@ -337,7 +337,7 @@
*/
const toConfig = (tableName: string) => {
let tableComment = tableList.value.filter(
(t) => t.tableName === tableName
(t) => t.tableName === tableName,
)[0].comment;
tableComment = tableComment ? `${tableComment}` : ' ';
title.value = `${tableName}${tableComment}配置`;