优化
This commit is contained in:
parent
7faa884958
commit
34dd84d743
@ -156,7 +156,7 @@ const colors = [
|
|||||||
{ color: '#31ff98', percentage: 100 },
|
{ color: '#31ff98', percentage: 100 },
|
||||||
]
|
]
|
||||||
//根据不同值拿到不同字体颜色
|
//根据不同值拿到不同字体颜色
|
||||||
const getColor = (per:number) => {
|
const getColor = async (per:number) => {
|
||||||
const colorObj = colors.find(c => per == c.percentage);
|
const colorObj = colors.find(c => per == c.percentage);
|
||||||
return colorObj ? colorObj.color : '#f56c6c';
|
return colorObj ? colorObj.color : '#f56c6c';
|
||||||
}
|
}
|
||||||
@ -254,9 +254,9 @@ const SyncFiles = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
message.success("同步完成! ")
|
message.success("同步完成! ")
|
||||||
emitUpdatePage()
|
await emitUpdatePage()
|
||||||
}
|
}
|
||||||
const emitUpdatePage = () => {
|
const emitUpdatePage =async () => {
|
||||||
let result:number[] = [];
|
let result:number[] = [];
|
||||||
for (const pe of fileList.value){
|
for (const pe of fileList.value){
|
||||||
const pa = pe as UploadUserFile & {page?: number};
|
const pa = pe as UploadUserFile & {page?: number};
|
||||||
@ -462,7 +462,7 @@ const handleRemove = (file: UploadFile) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//文件预览
|
//文件预览
|
||||||
const handleView = (file)=> {
|
const handleView = async (file)=> {
|
||||||
const url = file.url
|
const url = file.url
|
||||||
if (!url) {
|
if (!url) {
|
||||||
console.error("文件不可预览");
|
console.error("文件不可预览");
|
||||||
|
Loading…
Reference in New Issue
Block a user