[Vue.js] 自定義元件,不能使用大寫英文

Una
2 min readSep 14, 2019

--

vendor.js:600 [Vue warn]: Unknown custom element: <mycounter> — did you register the component correctly? For recursive components, make sure to provide the “name” option.

我在vue新增元件的時候,自定義tag 叫 <myCounter>

結果去頁面看竟然Error…

vendor.js:600 [Vue warn]: Unknown custom element: <mycounter> — did you register the component correctly? For recursive components, make sure to provide the “name” option.

後來才發現...自定義的tag不能大寫…
所以將<myCounter>改成<mycounter>,元件就出現在畫面了 ಢ_ಢ

紀錄一下,免得以後又忘記了……

--

--