vue initial use

  vue front end view of the frame is constructed

  Introduced vue.js file

  Hereinafter code output to the page

    

 

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Vue</title>
    <!-- 引入vue -->
    <script src="vue.js"></script>
</head>

<body>
    <div id="test">
        <p style="color: #f40">{{a}}</p>
        <p style="color: #0f0">{{b}}</p>
    </div>

    <script>
        new Vue({
            el: '#test',
            data: {
                a: 'vue测试1',
                b:'vue测试2',
            }
        })
    </script>
</body>

</html>

 

Guess you like

Origin www.cnblogs.com/zhangcheng001/p/11465028.html