【发布时间】:2019-12-01 21:34:04
【问题描述】:
Vue组件不渲染也没有错误,但是它加载了vue cdn。 没有任何东西可以代替组件。
<!DOCTYPE html>
<head>
<title>Vue</title>
</head>
<body>
<blog-post :title="My journey with Vue"></blog-post>
<blog-post v-bind:title="Blogging with Vue"></blog-post>
<blog-post title="Why Vue is so fun"></blog-post>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/v`enter code here`ue.js"></script>
<script>
Vue.component('blog-post', {
props: ['title'],
template: '<div><h3>{{ title }}</h3></div>'
})
</script>
</body>
</html>
【问题讨论】:
-
脚本加载的URL中间插入了
`enter code here`子字符串。
标签: javascript html vue.js vue-component