a4dc63c9 by lxs

文件名回显

1 parent 6e88fef4
......@@ -82,7 +82,7 @@ export const onUploadFilePreview = async (params) => {
export const setFileName = (name) => {
if(name && name.indexOf('_') > -1){
const s = name.indexOf("_");
const e = name.indexOf(".");
const e = name.lastIndexOf(".");
const newName = name.slice(0, s) + name.slice(e);
return newName
} else {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!