Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
621 views
in Technique[技术] by (71.8m points)

vue 中使用原生 HTML 标签名命名组件的问题。

想像 iview 一样使用<Input>来命名 vue 中的组件,但是控制台会发出警告

[Vue warn]: Do not use built-in or reserved HTML elements as component id: Input   

按文章所说的——聊聊 Vue 组件命名那些事——vue 2.0是支持这种命名方式的。但不知道为什么还是警告了,所以请教下该如何解决这个问题。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

使用 render 函数即可。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...