一
HelloWorld 工程
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Test Your First Vue Program</title> <style> .bg{ color: red; } </style> <script src="https://cdn.bootcss.com/vue/2.5.17/vue.js"></script> </head> <body> <div class="bg"> Hello,Vue! {{msg}} </div> <script> new Vue({ el: '.bg', data:{ msg:'Messages in Vue Para' } }) </script> </body> </html>
输出
Hello,Vue! Messages in Vue Para