Hello World
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">{{content}}</div>
</body>
<script>
var app = new Vue({
el: '#app',
data: {
content: 'Hello World'
}
});
setTimeout(function(){
app.$data.content = 'bye world';
},2000);
</script>
</html>
通过代码可以看出, Vue对画面的操作主要是受到数据的驱动
$
是用来获取Vue实例上的性属性或者方法