- 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>
推薦閱讀
- Reactive Programming with Swift
- Functional Programming in JavaScript
- Full-Stack Vue.js 2 and Laravel 5
- Visual C#.NET Web應用程序設計
- AutoCAD 2009實訓指導
- 快速入門與進階:Creo 4·0全實例精講
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器
- Python Machine Learning Cookbook
- MySQL數據庫應用實戰(zhàn)教程(慕課版)
- Spring Boot從入門到實戰(zhàn)
- Spring Web Services 2 Cookbook
- H5頁面設計與制作(全彩慕課版·第2版)
- 深入理解Zabbix監(jiān)控系統(tǒng)
- Getting Started with Hazelcast
- TensorFlow 2.0深度學習應用實踐