Type of the default value for '〇〇' prop must be a function
問題
Type of the default value for '〇〇' prop must be a function
というエラーが出た。
中身は以下のような感じ
sample.vue
<script>
export default {
props: {
〇〇: {
type: Array,
default: [],
},
},
}
</script>
解決法
defaultの部分を修正する!
sample.vue
<script>
export default {
props: {
〇〇: {
type: Array,
default: () => [],
},
},
}
</script>
Author And Source
この問題について(Type of the default value for '〇〇' prop must be a function), 我々は、より多くの情報をここで見つけました https://qiita.com/kuroro_ru/items/e1ee35630136e0417df0著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .