当前位置: 移动技术网 > IT编程>开发语言>JavaScript > vue组件

vue组件

2018年05月15日  | 移动技术网IT编程  | 我要评论

一.组件的3种使用方式

  1. 使用<script>标签。
    <body>
      <script type="text/x-template" id="component">
          <div>This is a component!</div>
      </script>
    </body>
  2. 使用<template>标签。
    <body>
       <template id="component">
           <div>This is a component!</div>
       </template>
    </body>
  3. 单文件组件

    *.vue文件,用于单页/多页应用中,不同于以上两种全局组件。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网