Vue没有定义 [英] Vue is not defined
本文介绍了Vue没有定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试用Vue.js构建一个演示应用程序。
I am trying to build a demo app with Vue.js. What I am getting is an odd error that Vue is not defined.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue JS Intro</title>
</head>
<body>
<div id="demo">
<p>{{message}}</p>
<input v-model="message">
</div>
<script type="JavaScript" src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.18/vue.min.js"></script>
<script>
var demo = new Vue({
el: '#demo',
data: {
message: 'Hello Vue.js!'
}
})
</script>
</body>
</html>
我在这里错过了什么?这不是CDN问题,因为我也从官方网站下载了库,使用它并得到了相同的结果。
What did I miss here? This is not a CDN issue as I also downloaded the library from the official website, used it and got the same result
index.html: 15 Uncaught ReferenceError:Vue未定义
index.html:15 Uncaught ReferenceError: Vue is not defined
推荐答案
href =http://jsbin.com/qutoco/edit?html,css,console,output =noreferrer> jsBin演示
- 您错过了订单,首先去
- You missed the order, first goes
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.18/vue.min.js"></script>
和
<script>
var demo = new Vue({
el: '#demo',
data: {
message: 'Hello Vue.js!'
}
});
</script>
- 和
type = JavaScript
应该是type =text / javascript
(或者完全没有)
- and
type="JavaScript"
should betype="text/javascript"
(or rather nothing at all)
这篇关于Vue没有定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文