标签:har app doctype var rip mvvm code name 内联
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> .active{ color: red; } .active2{ background: yellow; } </style> </head> <body> <!--mvvm里面的v--> <div id="app"> <div :class="setClass"> 你好 </div> </div> <script src="./node_modules/vue/dist/vue.js"></script> <script > //这是mvvm里面的vm var vm=new Vue({ el:‘#app‘, //这是mvvm里面的m data:{ setClass:{ active:true, active2:true } } }) </script> </body> </html>
标签:har app doctype var rip mvvm code name 内联
原文地址:https://www.cnblogs.com/antyhouse/p/9073918.html