当前位置:首页 > 未分类

uni-app 编译出来的微信小程序中自定义组件没有wxss

admin1年前 (2025-06-22)未分类485

经查阅官方文档得知,符合uniapp规则的自定义组件,不需要引用以及注册,详见:https://uniapp.dcloud.net.cn/component/#easycom


解决方案:

  1.  去除使用该自定义组件的页面中对该组件的import引入。---推荐

  2. 增加使用该自定义组件的页面中对该组件的注册,即components里注册组件。---不推荐

扫描二维码推送至手机访问。

版权声明:本文由前端开发技术分享发布,如需转载请注明出处。

本文链接:https://www.jqkcms.fun/?id=12

分享给朋友:

相关文章

js 中 object循环

1. 使用for...in循环          for...in语句在一个对象的所有可枚举属性上迭代。let obj = {a:1, b:2, c:3}; for&n…

VUE开发报错:Avoid mutating a prop directly since the value will be overwritten whenever the parent ...

VUE开发报错:Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed p…

微信小程序 -- 由于隐私协议未设置,影响隐私相关api调用

在app.json中,usePrivacyCheck设置为false,可以免除在开发者工具中调试时的影响,开发版暂未测试。…

vue项目中配置不同的环境是否显示vConsole

前言为了让测试人员能够在手机、平板上也能看到像浏览器f12那样的调试工具,便于查看日志数据和网络请求等,专门搜了一下,发现这个vConsole官方的调试工具真的很强大,十分好用。vConsole的简介…

Component template should contain exactly one root element. If you are using v-if on multiple eleme

情境描述今天使用vue框架做项目的时候,突然出错Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to c…