单击 next.js 中的按钮后,我想在 url 参数中添加数据
function send() {
router.push(
{ pathname: "/", query: { n: "firstparam,secondparam" } },
undefined,
{
shallow: true
}
);
}
点击后,我进入网址:
site/?n=firstparam%2Csecondparam
因此, nextjs 而不是,, 添加%2C. 如何避免所有这些迹象并在不使用replace()?类似的情况下获得有效的网址:site/?n=firstparam,secondparam
演示:https ://codesandbox.io/s/vibrant-sinoussi-d9z77?file=/pages/index.js