vueエラーのまとめ

1046 ワード

vueを使う時、小さなエラーがよく出てきます.メモしてください.
[Vue warn]: Attribute "id" is ignored on component 
because the component is a fragment instanc

vue-router vue-loader template  , div 。
div ,vue-router ,vue , 。

Template contains multiple top-level elements.
(モデルは のトップ を み、モデル は の がない)
Template contains only plain text.
(テンプレートの にはテキストだけが まれています)
Template contains only another component (which can potentially be a fragment instance itself).
テンプレートにはもう つのコンポーネントしか まれていません.このコンポーネントはfrangement instanceでもいいです.
Template contains only an element directive, e.g.  or vue-router’s.
(テンプレートはコンポーネントのみ む)
Template root node has a flow-control directive, e.g. v-if or v-for.
(モデルルートノードはv-if きているv-forに がある)
リンク
cnblog
csdn