<!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> <!-- 創(chuàng)建一個 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,為什么我這邊顯示的是一個空白頁面,組件模板的寫法是錯的么?
vue component為什么不顯示?
HUWWW
2018-12-12 14:10:07