有關本節的實踐功能,控制台有跳出兩種警示:
1)
Extraneous non-props attributes (id, class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
at <Index id="guide-lang" icon="language" class="el-tooltip__trigger" >
2)
Runtime directive used on component with non-element root node. The directives will not function as intended.
at <Index id="guide-lang" icon="language" class="el-tooltip__trigger" >
at <ElOnlyChild key=0 class="el-tooltip__trigger" aria-describedby=undefined >
....
警示
1)傳入了未預期的class及props造成渲染的問題,
關於guide這個功能,我的版本也無法有像演示一樣的效果
2)自定義指令不能放在組件上,要放在自有元素上.這段我就不懂了...
我比較了課程源碼,看起來是一樣的
Code在這裡,分支是guide branch,老師有空能否幫我看看?
https://github.com/tony05078088/vue-admin/tree/guide
謝謝!!
基于Vue3重写Vue-element-admin,打造后台前端综合解决方案
了解课程