- Vue.js 2.x by Example
- Mike Street
- 72字
- 2021-07-02 20:00:30
Using your component
In your view, add your custom HTML element component:
<p id="app">
<my-component></my-component>
</p>
Viewing this in the browser should replace the <my-component> HTML tag with a <p> and a hello message.
There may be some cases where a custom HTML tag won't be parsed and accepted - these cases tend to be in <table>, <ol>, <ul>, and <select> elements. If this is the case, you can use the is="" attribute on a standard HTML element:
<ol>
<li is="my-component"></li>
</ol>
推薦閱讀
- Vue.js 3.x快速入門
- Scala謎題
- Python數據可視化之Matplotlib與Pyecharts實戰
- Ext JS 4 Web Application Development Cookbook
- Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
- PySide 6/PyQt 6快速開發與實戰
- 時空數據建模及其應用
- 深度學習原理與PyTorch實戰(第2版)
- Python Machine Learning Blueprints:Intuitive data projects you can relate to
- 30天學通C#項目案例開發
- 計算語言學導論
- Python實戰指南:手把手教你掌握300個精彩案例
- JavaScript編程精解(原書第3版)
- Web前端開發全程實戰:HTML5+CSS3+JavaScript+jQuery+Bootstrap
- ASP.NET開發技巧精講