1. <!DOCTYPE html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
    7. <title>Document</title>
    8. <script src="./lib/vue.js"></script>
    9. </head>
    10. <body>
    11. <div id="app">
    12. <!-- v-for迭代数字,从1开始 -->
    13. <p v-for="i in 10" >{{i}}</p>
    14. </div>
    15. <script>
    16. var vm=new Vue({
    17. el:'#app',
    18. data:{},
    19. methods:{}
    20. });
    21. </script>
    22. </body>
    23. </html>

    image.png