代码:
methods:{ handleSubmit:function(){ this.list.push(this.inputValue) this.inputValue="" }
报错了:
test4.html:25 Uncaught TypeError: this.list.push is not a function
at Vue.handleSubmit (test4.html:25)
at invoker (vue.js:2032)
at HTMLButtonElement.fn._withTask.fn._withTask (vue.js:1831)
大概是list:[] 的格式写错了吧 都不贴完整的代码
请问你怎么解决的?
知道了,已解决