我尝试decimal使用安装 PHP 扩展,pecl因为现有项目需要它。在我的新 M1 机器上,我收到以下错误:
$ pecl install decimal
[...]
checking for libmpdec library in default path... Could not find libmpdec
configure: error: Please reinstall libmpdec
ERROR: `/private/tmp/pear/temp/decimal/configure --with-php-config=/opt/homebrew/bin/php-config' failed
Run Code Online (Sandbox Code Playgroud) 我需要生成一个 vue-router 链接,其中包含一个以字符串键作为查询参数的数组。我希望生成的 URL 看起来像
url?param[key]=value
Run Code Online (Sandbox Code Playgroud)
我需要这些类型的查询参数来匹配现有的后端基础设施,因此重命名/重构它们不是一种选择。
我尝试使用如下所示的路由器链接,但param对象只是被序列化为%5Bobject%20Object%5D. 也许有一个选项可以改变这个对象在 vue-router 中的序列化方式?
<router-link :to="{name: 'xyz', query: {param: 'value'}}">link</router-link>
Run Code Online (Sandbox Code Playgroud)
有没有人有帮助的意见?谢谢 :)