使用组件,无法预览?
发布于 7 年前 作者 gang08 4388 次浏览 来自 官方Issues

在 app.json 中引入组件后,无法预览,但是真机调试没有问题。

"usingComponents": {
    "c-course-card": "/components/custom/course-card/index",
    "c-panel": "/components/custom/panel/index",
    "i-button": "/components/weapp/button/index",
    "i-grid": "/components/weapp/grid/index",
    "i-grid-item": "/components/weapp/grid-item/index",
    "i-grid-icon": "/components/weapp/grid-icon/index",
    "i-grid-label": "/components/weapp/grid-label/index",
    "i-row": "/components/weapp/row/index",
    "i-col": "/components/weapp/col/index",
    "i-cell-group": "/components/weapp/cell-group/index",
    "i-cell": "/components/weapp/cell/index",
    "i-icon": "/components/weapp/icon/index",
    "i-badge": "/components/weapp/badge/index",
    "i-input": "/components/weapp/input/index",
    "van-cell-group": "/vant-weapp/cell-group",
    "van-field": "/vant-weapp/field",
    "van-button": "/vant-weapp/button",
    "van-toast": "/vant-weapp/toast",
    "van-panel": "/vant-weapp/panel",
    "van-icon": "/vant-weapp/icon",
    "van-rate": "/vant-weapp/rate",
    "van-dialog": "/vant-weapp/dialog",
    "van-checkbox": "/vant-weapp/checkbox",
    "van-radio": "/vant-weapp/radio",
    "van-radio-group": "/vant-weapp/radio-group"
  },

手机机型是小米8,朋友的 ios 同样也不可以预览。

2 回复

全局搜索项目后,没有找到 server/fs 的代码片断

编译出错了,重启下开发者工具试试

回到顶部