- 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>
推薦閱讀
- Bootstrap Site Blueprints Volume II
- Mastering Entity Framework Core 2.0
- ServiceNow Application Development
- Testing with JUnit
- Python機器學習:數據分析與評分卡建模(微課版)
- Xcode 7 Essentials(Second Edition)
- 數據結構(Python語言描述)(第2版)
- 深入淺出PostgreSQL
- Instant Ext.NET Application Development
- Python極簡講義:一本書入門數據分析與機器學習
- 一本書講透Java線程:原理與實踐
- 并行編程方法與優化實踐
- R的極客理想:量化投資篇
- PostgreSQL 12 High Availability Cookbook
- 零基礎學Java(第5版)