diff --git a/src/utils/url.ts b/src/utils/url.ts index 20c0fae..0fcf66e 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -1,4 +1,4 @@ -export function appendParamsToUrl(url: string, pathname: string, params: Record) { +export function appendParamsToUrl(url = '', pathname = '', params: Record = {}) { // 创建一个新的URL对象,在末尾添加 pathname const urlObject = new URL(pathname, url)