新人学vue,我明明导入了vue.js文件,但是data里面的数据就是不显示,这是为什么啊
<!DOCTYPEhtml><htmllang="en"><head><metacharset="utf-8"><metahttp-equiv="X-UA-Compati...
<!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"> <link rel="icon" href="<%= BASE_URL %>favicon.ico"> <title>default</title> <script src="vue.js"></script> </head> <body> <div id="app"> <p>{{ msg }}</p> </div> <script> var vm = new Vue({ el: '#app' data: { msg: "欢迎学习vue" } }); console.log(vm.$data); </script> <!-- built files will be auto injected --> </body></html>
展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询