VUE入门一

学习VUE中.......
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Hello World</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">{{content}}</div>
    <script>
        // var dom = document.getElementById('app');
        // dom.innerHTML = 'hello world'
        var app = new Vue({
            el:'#app',//实例负责管理的区域
            data:{
                content:'hello world1'
            }
        })
        setTimeout(function () {
            app.$data.content = 'bye world'  //$data 是data 的别名  隔2秒换数据
        },2000)
    </script>
</body>
</html>
原文地址:https://www.cnblogs.com/xuyxbiubiu/p/9948297.html