提交之后不提交字

来源:3-1 todolist功能开发

信丨念

2018-10-11 10:24

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>Vue入门</title>

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

</head>

<body>

<div id="root">

<div>

<input v-moldel="inputValue"/>

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

</div>

<ul>

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

{{item}}

</li>

</ul>

</div>

<script >

new Vue({

el:"#root",

data: {

inputValue: '',

list: []

},

methods: {

handleSubmit: function() {

this.list.push(this.inputValue)


}

}

})

</script>

</body>

</html>

https://img3.mukewang.com/5bbeb54b00013f0a04050530.jpg

https://img1.mukewang.com/5bbeb577000125cc03280154.jpg


写回答 关注

2回答

  • 信丨念
    2018-10-11 10:52:44

    已解决

  • 信丨念
    2018-10-11 10:51:12

    哈哈哈modle学错了  哈哈哈   已接近

    Lzy199...

    你又写错了,是model,不是modle

    2018-11-14 19:32:55

    共 1 条回复 >

vue2.5入门

快速理解Vue编程理念上手Vue2.0开发。

146168 学习 · 655 问题

查看课程

相似问题