标签:cti script val todo value data 实例 input eth
TodoList功能开发
<body> <div id="root"> <div> <input v-model="inputValue"/> <button @click="handleSubmit">提交</button> <ul> <li v-for="(item,index) of list" :key="index"> {{item}} </li> </ul> </div> </div> <script> // vue实例 new Vue({ el: "#root", data: { inputValue: ‘‘, list: [] }, methods: { handleSubmit: function () { this.list.push(this.inputValue); this.inputValue = ‘‘; } } }) </script> </body>
标签:cti script val todo value data 实例 input eth
原文地址:https://www.cnblogs.com/-beauTiFul/p/9032077.html