亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

無(wú)關(guān)的非props屬性(標(biāo)題)被傳遞給組件,但無(wú)法使用
P粉463418483
P粉463418483 2024-03-25 20:03:46
0
1
847

runtime-core.esm-bundler.js?d2dd:38 [Vue warn]: Extraneous non-props attributes (title) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. 
  at <ProductTable title="Product List" > 
  at <Home onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <App>

這是我在 Vue 應(yīng)用程序的 chrome 控制臺(tái)中遇到的錯(cuò)誤。下面是我的父視圖組件。我正在嘗試向其中添加多個(gè)組件,例如主頁(yè)內(nèi)容和頁(yè)腳。

<template>
  <div class="home">
    <ProductTable title="Product List"/>
    <Footer title="I am the child"/>
  </div>
</template>

<script>
import ProductTable from '@/components/ProductTable.vue'
import Footer from '@/components/Footer.vue'
import Functions from '@/components/ProductListFunctions.js'


export default {
  name: 'Home',
  components: {
    ProductTable,
    Footer
  }
}
</script>

感謝任何幫助,因?yàn)槲覠o(wú)法弄清楚。該錯(cuò)誤只是一個(gè)警告,不會(huì)影響任何頁(yè)面。但如果離開(kāi)就好了。干杯。

P粉463418483
P粉463418483

全部回復(fù)(1)
P粉785522400

您應(yīng)該將 inheritAttrs:false 添加到子組件:

export default{
inheritAttrs:false
...
}

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板