报错信息:
(Emitted value instead of an instance of Error) postcss-viewport-units:
‘.mint-switch-core::after, .mint-switch-core::before’ already has a ‘content’ property, give up to overwrite it.
使用场景:
vue项目中使用Mint-UI,出现这个错误。
原因:
兼容性问题

解决方法:
升级一下postcss-px-to-viewportpostcss-px-to-viewport-opt:

npm i postcss-px-to-viewport-opt

.postcssrc.js中配置示例:

"postcss-px-to-viewport-opt": {viewportWidth: 750,     //  视窗的宽度,对应的是我们设计稿的宽度,移动端一般是750,如果是pc端那就是类似1920这样的尺寸viewportHeight: 1344,    // 视窗的高度,移动端一般指定1334,也可以不配置unitPrecision: 3,       // 指定`px`转换为视窗单位值的小数位数(很多时候无法整除)viewportUnit: 'vw',    // 指定需要转换成的视窗单位,建议使用vwselectorBlackList: ['.ignore', '.hairlines'],  // 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名minPixelValue: 1,      // 小于或等于`1px`不转换为视窗单位,你也可以设置为你想要的值mediaQuery: false,      // 允许在媒体查询中转换`px`exclude: /(\/|\\)(node_modules)(\/|\\)/
},

解决啦~

(Emitted value instead of an instance of Error) postcss-viewport-units:相关推荐

  1. 前端开发:Vue项目中解决Emitted value instead of an instance of Error问题

    分享一个在刚接触前端开发的开发者常遇到的一个经典错误,那就是在Vue项目运行中遇到Emitted value instead of an instance of Error的问题,附带解决该问题的方法 ...

  2. Vue解决warning Emitted value instead of an instance of Error

    避免Emitted value instead of an instance of Error, 这部分在运行的时候就会出现问题 <el-submenu v-for="(item,in ...

  3. Emitted value instead of an instance of Error) <v-uni-view v-for=“item in pi

    问题一 Emitted value instead of an instance of Error) <v-uni-view v-for="item in pi A:这个报错主要是v- ...

  4. (Emitted value instead of an instance of Error)

    本地运行vue项目因为警告导致 不能启动 (Emitted value instead of an instance of Error) Do not use v-for index as key o ...

  5. Vue 项目提示:`(Emitted value instead of an instance of Error) the “scope“ attribute for scoped slots

    Vue 完整警告信息: `(Emitted value instead of an instance of Error) the "scope" attribute for sco ...

  6. (Emitted value instead of an instance of Error) <swiper-slide v-for=“img in allData.url“>: component

    (Emitted value instead of an instance of Error) : component lists rendered with v-for should have ex ...

  7. (Emitted value instead of an instance of Error) Do not use v-for index as key on <transition-group>

    代码如下: 控制台报错:(Emitted value instead of an instance of Error) Do not use v-for index as key on childre ...

  8. vue项目警告:Emitted value instead of an instance of Error

    一.问题描述 错误描述:翻译过来大概的意思就是缺少一个key,来指定相应的属性 warning in ./src/view/Index.vue (Emitted value instead of an ...

  9. Emitted value instead of an instance of Error

    问题:(Emitted value instead of an instance of Error) <el-form-item v-for="item in fontItems&qu ...

最新文章

  1. nginx日志问题解决方法记录
  2. profile 文件含义
  3. php源代码保护——PHP加密方案分析解密还原
  4. Hadoop的安装与使用
  5. espcms /public/class_connector.php intval truncation Vul Arbitrary User Login
  6. 智能交通|智慧产业园区管理系统集成搭建
  7. 盒模型bug的解决方法
  8. 极域电子书包课堂管理系统_朝阳群众说小康 | 从黑板课本到VR互动课堂、电子书包,朝阳的课堂如此有趣!...
  9. Photoshop 深度学习 数据集标签制作 、注意事项 以及标签颜色的编码、统计和快速像素颜色替换(python)
  10. H桥原理、驱动及应用
  11. react-native 轮播组件 looped-carousel使用介绍
  12. iOS_CLLocation定位
  13. 不知道PDF转PPT转换器哪个好用?分享三个简单好用的办公用具
  14. OpenMV扫码识别
  15. 贪心算法之加勒比海盗船最优装载问题
  16. 对 emwin 窗口创建的认识
  17. RTK ? PPK ?到底该选啥
  18. MEMS--微机电系统
  19. 快速解决is marked as crashed and should be repaired故障
  20. AI算力碎片化:矩阵乘法的启示

热门文章

  1. elementui table tooltip产出展示三个点,并且提示
  2. 怎样看笔记本上有无无线网卡?
  3. 网易被裁后,68天吃透这份阿里学长甩我的Android面试笔记,竟让我收到字节跳动和小米offer
  4. 用ZBrush和Maya建模雕刻一位灵长类动物飞行员 你必须要了解角色是不是有甲方客户的创作需求或是基于其他画师的概念。
  5. 电子自旋共振波谱仪的用途和主要检测对象
  6. 示波器如何设置实现单次触发
  7. 7.3 pgfplots点集
  8. 最新调研-持续集成和持续交付解决方案市场现状研究分析与发展前景预测报告
  9. 马小看前端( 在开发中遇到问题如何解决 )
  10. go语言求时间的差值(按天数算)