uni-app uni-notice-bar 微信小程序端无法找到该组件
uni-app uni-notice-bar 微信小程序端无法找到该组件
| 类别 | 信息 |
|---|---|
| 产品分类 | uniapp/小程序/微信 |
| PC开发环境 | Mac |
| 操作系统版本 | Sonoma 14.1.1 |
| HBuilderX类型 | 正式 |
| HBuilderX版本 | 4.75 |
| 工具版本 | Stable 1.06.24007120 |
| 基础库版本 | 3.8.10 |
| 项目创建方式 | HBuilderX |
示例代码:
<template>
<view class="page-appoint-create">
<uni-notice-bar single text="[单行] 这是 NoticeBar 通告栏,这是 NoticeBar 通告栏,这是 NoticeBar 通告栏">
</uni-notice-bar>
</template>
操作步骤:
Component is not found in path "uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar" (using by "pages/appointCreate/appointCreate").(env: macOS,mp,1.06.2407120; lib: 3.8.10)
预期结果:
希望notice-bar可以正常展示
实际结果:
js 报错
Component is not found in path "uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar" (using by "pages/appointCreate/appointCreate").(env: macOS,mp,1.06.2407120; lib: 3.8.10)
bug描述:
在Hbuilder中的vue组件引用了这个组件uni-notice-bar, h5展示没问题,当在小程序预览的时候提示错误,找不到
更多关于uni-app uni-notice-bar 微信小程序端无法找到该组件的实战教程也可以访问 https://www.itying.com/category-93-b0.html
2 回复
引入的其他uni ui组件能不能在微信小程序平台正常运行
更多关于uni-app uni-notice-bar 微信小程序端无法找到该组件的实战教程也可以访问 https://www.itying.com/category-93-b0.html
这个问题是因为uni-notice-bar组件在小程序端需要正确安装和配置。以下是解决方案:
-
检查组件安装:确认已通过HBuilderX的插件市场正确安装uni-notice-bar组件。在uni_modules目录下应有完整的组件文件结构。
-
配置easycom:在
pages.json中确保easycom配置正确:
{
"easycom": {
"autoscan": true,
"custom": {
"^uni-(.*)": "@/uni_modules/uni-$1/components/uni-$1/uni-$1.vue"
}
}
}

