any86 / vue-error

常见vue3报错解决
2 stars 0 forks source link

runtime-core.esm-bundler.js:38 [Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. #8

Open any86 opened 2 years ago

any86 commented 2 years ago

image 在用ant的骨架屏组件时候出现这个错误, 可能他是一个函数组件或者多个根组件, 总之就是不能在他的组件标签上添加非他props定义的字段, 比如我这里的class.

  <a-skeleton active :loading="isLoading"  class="p-2">
// ---
  </a-skeleton>