解决文件名中存在#无法下载的问题
This commit is contained in:
parent
8dbabb4ae8
commit
4c9e33ce36
@ -72,6 +72,7 @@ import {
|
|||||||
checkoutPath,
|
checkoutPath,
|
||||||
checkView,
|
checkView,
|
||||||
checkExtends,
|
checkExtends,
|
||||||
|
encodePath
|
||||||
} from "@utils/AcrouUtil";
|
} from "@utils/AcrouUtil";
|
||||||
import axios from "@/utils/axios";
|
import axios from "@/utils/axios";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
@ -276,7 +277,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (target === "down" || (!checkExtends(path) && !file.isFolder)) {
|
if (target === "down" || (!checkExtends(path) && !file.isFolder)) {
|
||||||
let temp_path = this.$route.params.path ? this.$route.params.path : "";
|
let temp_path = this.$route.params.path ? this.$route.params.path : "";
|
||||||
location.href = `/${this.$route.params.id}:down/${temp_path}/${file.name}`;
|
location.href = `/${this.$route.params.id}:down/${temp_path}/${encodePath(file.name)}`;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (target === "view") {
|
if (target === "view") {
|
||||||
|
Loading…
Reference in New Issue
Block a user