<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<ol>
<!-- 创建一个 todo-item 组件的实例 -->
<todo-item></todo-item>
</ol>
<script src="https://unpkg.com/vue"></script>
<script>
Vue.component('todo-item', {
template: '<li>这是个待办项</li>'
})
</script>
</body>
</html>
初学vue
,为什么我这边显示的是一个空白页面,组件模板的写法是错的么?
jeck猫
相关分类