JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

[Vue warn]: Runtime directive used on component with non-element root node. The directives will not function as intended.

发布时间 2023-08-15 23:20:04作者: 槑孒

原因

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

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

解决

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

    本栏目推荐文章
  • 2024-01-13 Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. ==》引用了未使用的方法导致
  • [Vue warn]: Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".
  • koa2 使用koa-body引入报错 koaBody is not a function
  • 关于函数式接口中常用的Supplier、Consumer、predicate、Function的总结以及其使用场景
  • 使用的antd的pro-table时,遇到了两种引入方法---@ant-design/pro-components和@ant-design/pro-table的区别
  • naming conflicts with other components【vue3】
  • JavaScirpt | String Function (三)
  • Ant Design pro Component 【Schema Form - JSON 表单】依赖与顺序加载问题
  • @Repository、@Component、@Service、@Controller之间的区别与联系
  • 将ajax提交数据写到function里时处理返回的数据时无法被return
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们