0
点赞
收藏
分享

微信扫一扫

[Vue warn]: Runtime directive used on component with non-element root node. The directives

[Vue warn]: Runtime directive used on component with non-element root node. The directives_自定义组件

原因

意思是自定义指令不能放到组件上,而是要放到自有的元素上,也就是这里用到的v-dialogDrag不能放在自定义组件上

[Vue warn]: Runtime directive used on component with non-element root node. The directives_自定义指令_02

上图的v-dialogDrag指令用在了自定义组件el-dialog身上,就警告了

解决

外面套一层不是自定义组件的东东就可以,比如套了一层div



举报

相关推荐

0 条评论