mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:18:03 +08:00
应该 url decode 一下 url 中提取的文件名
This commit is contained in:
parent
2b2a699bd4
commit
142a57b1d3
@ -79,7 +79,7 @@ let preventEvent = (e: any) => e.stopPropagation();
|
|||||||
|
|
||||||
function getNameFromUrl(url: string) {
|
function getNameFromUrl(url: string) {
|
||||||
if (/(?:\/|^)([^\/]+?)$/.test(url)) {
|
if (/(?:\/|^)([^\/]+?)$/.test(url)) {
|
||||||
return RegExp.$1;
|
return decodeURIComponent(RegExp.$1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return url;
|
return url;
|
||||||
|
Loading…
Reference in New Issue
Block a user