vue.esm.js?efeb:628 [Vue warn]: props must be strings when using array syntax.
warn @ vue.esm.js?efeb:628
normalizeProps @ vue.esm.js?efeb:1440
mergeOptions @ vue.esm.js?efeb:1530
Vue.extend @ vue.esm.js?efeb:5162
createComponent @ vue.esm.js?efeb:3193
_createElement @ vue.esm.js?efeb:3425
createElement @ vue.esm.js?efeb:3362
vm._c @ vue.esm.js?efeb:3494
(anonymous) @ TodoList.vue?0718:34
renderList @ vue.esm.js?efeb:2639
render @ TodoList.vue?0718:33
Vue._render @ vue.esm.js?efeb:3551
updateComponent @ vue.esm.js?efeb:4069
get @ vue.esm.js?efeb:4482
run @ vue.esm.js?efeb:4557
flushSchedulerQueue @ vue.esm.js?efeb:4313
(anonymous) @ vue.esm.js?efeb:1989
flushCallbacks @ vue.esm.js?efeb:1915
Promise.then (async)
timerFunc @ vue.esm.js?efeb:1942
nextTick @ vue.esm.js?efeb:1999
queueWatcher @ vue.esm.js?efeb:4405
update @ vue.esm.js?efeb:4547
notify @ vue.esm.js?efeb:739
mutator @ vue.esm.js?efeb:891
handleSubmit @ TodoList.vue?658c:30
invokeWithErrorHandling @ vue.esm.js?efeb:1863
invoker @ vue.esm.js?efeb:2188
original._wrapper @ vue.esm.js?efeb:7559
vue.esm.js?efeb:628 [Vue warn]: Property or method "content" 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
---> <TodoItem> at src/components/TodoItem.vue
<TodoList> at src/TodoList.vue
<Root>
-----------------------------------------------------------------------------------------------------------------------------------------------
这两处是我的代码,看下怎么改
/* eslint-disable no-new */
new Vue({
el: '#app',
components: { TodoList },
template: '<TodoList/>'
})
----------------------------------------------------------------------------------------------------------------------------------------------
<script>
import TodoItem from './components/TodoItem'
export default ({
components: {
'todo-item': TodoItem
},
'data': () => {
return {
inputValue: '',
list: []
}
},
methods: {
handleSubmit () {
this.list.push(this.inputValue)
this.inputValue = ''
},
handleDelete (index) {
this.list.splice(index, 1)
}
}
})
</script>
content 未定义