赞
踩
Vue网页版报错或警告集锦
Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes
根因分析
:可以参考这个[博客]。(https://blog.csdn.net/li_jia_h/article/details/123925787)其实就是传递了一个没用的class,所以产生了警告。
定位步骤
<navTop class="nav-top"></navTop>
error.ts:14 ElementPlusError: [el-dialog] [Attribute] custom-class is about to be deprecated in version 2.3.0, please use class instead.
根因分析
很明显,custom-class属性即将废弃。只要找到改掉就行。当然如果不介意的人也不用改。
定位步骤
custom-class
,发现只有一个地方用到了,把custom-class改成class。<el-dialog v-model="kamiVisible" :center="true" width="360px" :close-on-click-modal="false" custom-class="dialog-mask" >
</el-dialog>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。