Vue 警告
[Vue warn]: Extraneous non-props attributes (tabindex, aria-describedby, class, style) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
at <Index icon="language" tabindex="0" aria-describedby="el-popper-6649" ... >
at <ElPopper arrowOffset=5 appendToBody=true autoClose=0 ... >
at <ElTooltip content="国际化" effect="dark" >
at <ElPopper ref="triggerVnode" visible=false onUpdate:visible=fn ... >
at <ElDropdown trigger="click" class="international right-menu-item hover-effect" onCommand=fn<handleSetLanguage> >
at <Index class="right-menu-item hover-effect" >
at <Navbar>
at <Index onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > >
at <RouterView>
at <App>
解决方案:
将 svg-icon
组件使用一个元素进行包裹即可
<div>
<el-tooltip content="国际化" :effect="effect">
<p>
<svg-icon icon="language" />
</p>
</el-tooltip>
</div>
网友评论