最新稳定版4.55编译uni-app APP deep bug

最新稳定版4.55编译uni-app APP deep bug

开发环境 版本号 项目创建方式
Mac 15.3.1 HBuilderX
### 示例代码:
/deep/ ::deep ::deep() 都报错

### 操作步骤:
/deep/ ::deep ::deep() 都报错

### 预期结果:
/deep/ ::deep ::deep() 都报错

### 实际结果:
/deep/ ::deep ::deep() 都报错

### bug描述:
刚升级完之后,编辑到 h5 提示 /deep/ 有问题,然后我又把 /deep/ 修改为 ::deep 或者 ::deep(),h5 编译不报错了。但是 app编译又报错了
/deep/ ::deep ::deep() 都报错

更多关于最新稳定版4.55编译uni-app APP deep bug的实战教程也可以访问 https://www.itying.com/category-93-b0.html

3 回复

更多关于最新稳定版4.55编译uni-app APP deep bug的实战教程也可以访问 https://www.itying.com/category-93-b0.html


在uni-app 4.55版本中,深度选择器的使用确实存在一些变化。根据官方文档,推荐使用以下方式替代传统的/deep/语法:

  1. 对于Vue3项目,建议使用:deep()语法:
:deep(.child-class) {
  color: red;
}
  1. 如果仍需要使用Vue2的语法,可以尝试:
::v-deep .child-class {
  color: red;
}
回到顶部