<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title></title>
  <link rel="stylesheet" href="demo.css" />
</head>
<body>
  <!--this is my View-->
  <div id="app">
    <parent-component></parent-conponent>
  </div>
  <div id="app2">
    <my-component></my-conponent>
  </div>
  <my-component></my-conponent>
</body>
<script src="vue.min.js"></script>
<script>
var Child = Vue.extend({
  template: '<p> This is child component</p>'
})

var myComponent = Vue.extend({
  template: '<div> This is my first component.</div>'
});
Vue.component('parent-component', {
  template: '<div><p> This is Parent component</p><child-component></child-component></div>',
  components: {
    'child-component': Child
  }
});
new Vue({
  el: '#app'
})
new Vue({
  el: '#app2',
  components: {
    'my-component': myComponent
  }
})
</script>
</html>

最新文章

  1. 在SQL语句中加入时间比较作为查询条件
  2. new一張form時用using{}的好處。
  3. Xcode 8 在XIB中布局View尺寸1000*1000
  4. ch6 影响 MySQLServer 性能的相关因素
  5. CCF真题之门禁系统
  6. centos 001
  7. 向Array中添加堆排序
  8. IOS 8 关于 Touch ID
  9. I.MX6 lcd lvds hdmi bootargs
  10. 设计模式之十三:适配器模式(Adapter)
  11. css盒子模型,定位,浮动
  12. CSS3 转换2D transform
  13. vue学习:props,scope,slot,ref,is,slot,sync等知识点
  14. 【mark】OS是否使用svc方式分开系统空间和用户空间的优劣
  15. Could not parse multipart servlet request; nested exception is org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed.
  16. FastAdmin 在 Nginx 中的配置
  17. windows7下搭建robot framework环境指导
  18. php用smarty来做简易留言系统,明细步骤简单操作
  19. json_encode无返回结果
  20. C语言编程积累2

热门文章

  1. Android 人脸识别
  2. 从键盘输入数,输出它们的平方值&amp;判断是不是2的阶次方数
  3. 剑指Offer - 九度1355 - 扑克牌顺子
  4. 【非原创】tomcat 安装时出现 Failed to install Tomcat7 service
  5. serial console
  6. ERC720和erc721的区别
  7. [中山市选2011][bzoj2440] 完全平方数 [二分+莫比乌斯容斥]
  8. Linux下从零开始部署和使用Jaeger
  9. [poj] 3057 Evacuation
  10. POJ 1375 Intervals | 解析几何