新しいコンポーネント作成時に発生しました。
エラー内容
vue.esm.js?efeb:628 [Vue warn]:
Property or method "message" is not defined on the instance but referenced during render.
Make sure that this property is reactive, either in the data option, or for class-based components, by
initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
found in
---> <ManyInput> at src/components/ManyInput.vue
<App> at src/App.vue
<Root>
エディターにエラーが発生したわけではなく、ブラウザに表示時にコンソールにてエラー表示。
下記がコンポーネントでの記述内容。
ManyInput.Vue
<template>
<div id="ManyInput">
{{message}}
</div>
</template>
<script>
export default {
name:"ManyInput",
deta(){
return {
message:"複数同時入力のテストです。"
}
},
mounted(){
console.log("manyInput")
},
}
</script>
問題はタイポ
data()をdeta()にしていたのが原因。
エラーの内容は、dataで定義していないものが、templateで利用されているというよう。