DCloud_UNI_GSQ
DCloud_UNI_GSQ
  • 发布:2021-02-03 21:01
  • 更新:2023-02-21 10:33
  • 阅读:13406

nvue 样式编译模式介绍

分类:uni-app

HBuilderX 3.1.0+ 开始支持新的样式编译模式

  • weex 编译模式:老模式,样式支持与普通 weex 相同
  • uni-app 编译模式:新模式,在 weex 原有样式基础上支持组合选择器(相邻兄弟选择器、普通兄弟选择器、子选择器、后代选择器),目前已知问题:list 组件内嵌套的组件动态更新 class 无效,将在 3.1.2 修复

3.1.0 alpha 版为 uni-app 模式,3.1.1 开始缺省值为 weex 模式,切换编译模式需要重新运行

配置方式

// manifest.json  
{        
    // ...        
     /* App平台特有配置 */        
    "app-plus":  {  
        "nvueStyleCompiler": "uni-app"  
    }  
}
2 关注 分享
sonicsunsky QLing

要回复文章请先登录注册

1***@qq.com

1***@qq.com

版本:3.1.13.20210514,app 编译模式: uni-app
nvue 页面使用 uni-popup 组件样式报错:
17:46:10.790 ERROR: Selector `.uni-popup.top` is not supported. Weex only support classname selector at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:30
17:46:10.795 ERROR: Selector `.uni-popup.left` is not supported. Weex only support classname selector at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:30
17:46:10.797 ERROR: Selector `.uni-popup.right` is not supported. Weex only support classname selector at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:30
17:46:10.803 ERROR: Selector `.uni-popup .uni-popup__wrapper` is not supported. Weex only support classname selector at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:33
17:46:10.803 ERROR: Selector `.uni-popup .uni-popup__wrapper.left` is not supported. Weex only support classname selector at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:37
17:46:10.809 ERROR: Selector `.uni-popup .uni-popup__wrapper.right` is not supported. Weex only support classname selector at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:37
2021-06-08 17:58
4***@qq.com

4***@qq.com

回复 4***@qq.com :
"app-plus" : {
"nvueCompiler" : "uni-app",
"compilerVersion" : 3,
"nvueLaunchMode" : "",
}
2021-05-25 15:58
4***@qq.com

4***@qq.com

回复 DCloud_UNI_GSQ :
是呀
"app-plus" : {
"nvueCompiler" : "uni-app",
...
}
2021-05-25 15:58
DCloud_UNI_GSQ

DCloud_UNI_GSQ (作者)

回复 4***@qq.com :
nvueStyleCompiler 是 uni-app 吗?
2021-05-24 11:37
4***@qq.com

4***@qq.com

HXBuilderX 3.1.13版本
09:07:07.635 nvue中不支持如下css。如全局或公共样式受影响,建议将告警样式写在ifndef APP-PLUS-NVUE的条件编译中,详情如下:
09:07:07.650 ERROR: Selector `.uni-popup.top` is not supported. Weex only support classname selector
2021-05-24 09:14
DCloud_UNI_GSQ

DCloud_UNI_GSQ (作者)

回复 4***@qq.com :
支持
2021-04-19 11:08
4***@qq.com

4***@qq.com

切换到uni-app模式 还是不支持后代选择器啊!!!!
2021-04-19 10:03
九涯

九涯

一旦设置了nvueStyleCompiler,在nvue中难以自定义button组件的样式,其它官方组件没试过
2021-04-14 16:49
DCloud_UNI_GSQ

DCloud_UNI_GSQ (作者)

回复 Yuni :
试试新的编译模式
2021-03-09 16:07
Yuni

Yuni

之前的项目如果用后代选择器还是有警告,需要怎么操作呢,版本是3.1.2
2021-03-09 12:00