问个小程序绝对目录 / 相对目录的问题(应该不难)?
发布于 6 年前 作者 qiangbai 5087 次浏览 来自 官方Issues

"usingComponents": {

"b-news-list""/components/news-list/news-list"

},

为什么这样写反而成功,

"usingComponents": {

"b-news-list""/miniprogram/components/news-list/news-list"

},

这样写却报错? 
3 回复

"van-search": "/miniprogram_npm/[@vant](/user/vant)/weapp/search/index"

根目录的确就是app.json所在的目录,后面加上一个/index就可以了。我的书写错误。

这个我只能说app.json所在位置为根目录

--↓↓👍点赞是回答的动力哦

不难还来问?

回到顶部