fix: correct splicing url

This commit is contained in:
xzdry 2022-05-07 16:21:45 +08:00
parent d7e36e35f9
commit 9a45ec04dc

View File

@ -41,7 +41,7 @@ export const Params: React.FC<Props> = props => {
const onChange = useCallback(
(values: Record<string, string>) => {
const parameters = new URLSearchParams(values);
const paramsString = parameters.toString().replace(/%7B%7B(.+?)%7D%7D/g, '{{$1}}');
const paramsString = decodeURIComponent(parameters.toString());
const newUrl =
index === -1
? `${url}?${paramsString}`