问答详情
源自:3-1 todolist功能开发

按照老师代码运行不出来

<!DOCTYPE heml>

<html>

<head>

<meta charset="utf-8">

<title>TodoList</title>

<script src="./vue.js"></script>

</head>

<body>

<div id="root">

<div>

<input v-model="inputValue"/>

<button @click="handleSumit">提交</button>

<ul>

<li v-for="(item,index) of list" :key="index">{{item}}</li>

</ul>

</div>

<script>

new Vue({

el:"#root",

data:{

inputValue:'hello',

list:[]

},

methods:{

handleSubmit:fuction(){

this.list.push(this.inputValue)

}

})

}


</script>

</body>

</html>


提问者:weixin_慕前端7491799 2022-07-05 09:46

个回答

  • 慕婉清6476192
    2022-07-24 17:09:03

    handleSubmit:function(),同学,你的function拼错了。PS:第一行的html也拼错了hhh
               
    下载视频