首页 > 编程语言 >Extraneous non-props attributes (k) were passed to component but could not be automatically inherite

Extraneous non-props attributes (k) were passed to component but could not be automatically inherite

时间:2023-02-04 13:22:42浏览次数:56  
标签:non because text component Extraneous passed props

控制台报错:Extraneous non-props attributes (k) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. 

原因:在vue组件中的template标签下,有且只能有一个大的div,不能有其他同级标签

<template>
  <div class="pagination">
    <div>
      <button>上一页</button>
      <button>下一页</button>
  </div> </div>
 <a> asdasdasd</a> </template>

  

标签:non,because,text,component,Extraneous,passed,props
From: https://www.cnblogs.com/bjpfee/p/17091310.html

相关文章