vue 尤雨溪
HTML:结构
CSS:表现
JS:行为
可算是给我找到了
https://blog.csdn.net/pan_h1995/article/details/106792712
但问题是,最简化了依旧运行不了
<!DOCTYPE html> <template> <html> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div id="vue"> <div>{{info.name}}</div> </div> </body> </html> </template> <script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.js"></script> <script src="https://unpkg.com/axios/dist/axios.min.js"></script> <script type="text/javascript"> var vm = new Vue({ el:"#vue", data(){ return{ info:{ name:null, url:null, } } }, mounted(){//钩子函数 axios .get('../data.json') .then(response=>(this.info=response.data)); } }); </script>
感觉tamplete和
var vm = new Vue不是同一个体系的?
不能放在一起用??????????
赣,又报错 App.vue?26cd:21 Uncaught ReferenceError: Vue is not defined at eval(App.vue?26cd:21) at Object../node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue (app.js:956) at __webpack_require__ (app.js:679) at fn (app.js:89) at eval(App.vue?9e04:1) at Object../src/App.vue (app.js:2241) at __webpack_require__ (app.js:679) at fn (app.js:89) at eval(main.js?1c90:1) at Object../src/main.js (app.js:2281)