尚硅谷vue课程之vue中的mvvm
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://cdn.jsdelivr.net/npm/vue@2.7.10/dist/vue.js"></script> <title>Document</title> </head> <body> <div id="root"> <h1>学校:{{name}}</h1> <h1>地址:{{address}}</h1> <hr> <h4>测试发现vm1:{{$refs}}</h4> <h4>测试发现vm2:<br>{{_c}}</h4> <hr> <h5>测试发现原型1:<br>{{$delete}}</h5> <h5>测试发现原型2:<br>{{__patch__}}</h5> </div> <script> Vue.config.productionTip = false; const vm = new Vue({ // 这是ViewModel el: "#root", data: { name: "嘉立敦", address: '咖喱' // 这个对应的是Model } }) console.log(vm); </script> </body> </html>