<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./vue.min.js"></script>//要先引入Vue.js文件
</head>
<body>
<!--V层-->
<div id="app">
{{hello}}
<!-- 把视图和模型层双向关联 v-model-->
<input type="text" v-model="hello">
</div>
<!-- VM层 -->
<script>
var vm=new Vue({
el:"#app",
data:{//Model层
hello:"Hello World!!"
},
methods:{
}
});
</script>
</body>
</html>
Vue的使用
最新推荐文章于 2022-06-23 14:59:42 发布