and /deep/ combinators have been deprecated. Use :deep() instead问题解决

在这里插入图片描述

问题点

在前端进行编译打包的时候,提示“[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.”错误消息。

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

仔细看了下,发现也没有啥大问题。
主要是新的版本把语法直接给改了。

老版本代码

//旧的书写方式
 /deep/ .ant-form.ant-form-inline {
    
    
    .ant-label-none {
    
    
      margin-right: 40px;
    }
    .ant-label-none:nth-last-child(2) {
    
    
      margin-right: 10px !important;
    }
  }

修改后

	//新的书写方式
   :deep(.ant-form.ant-form-inline){
    
    
    .ant-label-none {
    
    
      margin-right: 40px;
    }
    .ant-label-none:nth-last-child(2) {
    
    
      margin-right: 10px !important;
    }
  }

搞掂,收工!

说明

主要是因为Vue3版本,把一些语法进行了修改,新版本都需要对新语法格式进行检测。

猜你喜欢

转载自blog.csdn.net/m290345792/article/details/130161398
今日推荐