修复文件预览大写后缀不展示的问题
This commit is contained in:
parent
81bfda2564
commit
91c843f098
@ -214,11 +214,10 @@ const getList = async () => {
|
|||||||
showTable.value = true;
|
showTable.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
function checkFileSuffix(fileSuffix: string[]) {
|
function checkFileSuffix(fileSuffix: string | string[]) {
|
||||||
let arr = ['png', 'jpg', 'jpeg'];
|
const arr = [".png", ".jpg", ".jpeg"];
|
||||||
return arr.some((type) => {
|
const suffixArray = Array.isArray(fileSuffix) ? fileSuffix : [fileSuffix];
|
||||||
return fileSuffix.indexOf(type) > -1;
|
return suffixArray.some(suffix => arr.includes(suffix.toLowerCase()));
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
@ -333,7 +332,7 @@ const handlePreviewListResource = async (preview: boolean) => {
|
|||||||
let text = preview ? '启用' : '停用';
|
let text = preview ? '启用' : '停用';
|
||||||
try {
|
try {
|
||||||
await proxy?.$modal.confirm('确认要"' + text + '""预览列表图片"配置吗?');
|
await proxy?.$modal.confirm('确认要"' + text + '""预览列表图片"配置吗?');
|
||||||
const res = await proxy?.getConfigKey('sys.oss.previewListResource');
|
const res = await proxy?.getConfigKey('sys.oss.previewListResource');
|
||||||
await proxy?.updateConfigByKey('sys.oss.previewListResource', preview, res.data.version);
|
await proxy?.updateConfigByKey('sys.oss.previewListResource', preview, res.data.version);
|
||||||
await getList();
|
await getList();
|
||||||
proxy?.$modal.msgSuccess(text + '成功');
|
proxy?.$modal.msgSuccess(text + '成功');
|
||||||
|
Loading…
Reference in New Issue
Block a user