一.组件的3种使用方式
- 使用<script>标签。
<body> <script type="text/x-template" id="component"> <div>This is a component!</div> </script> </body>
- 使用<template>标签。
<body> <template id="component"> <div>This is a component!</div> </template> </body>
- 单文件组件
*.vue文件,用于单页/多页应用中,不同于以上两种全局组件。
内容来源于网络如有侵权请私信删除
- 还没有人评论,欢迎说说您的想法!