<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div id="app">
<h1>{{greeting}}</h1>
<input type="text" v-model="greeting">
</div>
<script src="./vue.js"></script>
<script>
const app = new Vue({
el: '#app',
data: {
greeting: 'Hello Vuejs'
}
});
</script>
</body>
</html>
最后
以上就是踏实芹菜最近收集整理的关于v-model --双向数据绑定的全部内容,更多相关v-model内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复