您好!欢迎来到聚码网

聚码网

热门搜索: 相亲小程序    搭子源码    直播系统自有商城   
  • vue2.0怎么用组件自定义标签实现组件的嵌套?
  • 聚码交流
  • 0 0
  • yhuxAvNbtxUM
    0000-00-00 00:00:00
  • 回帖
想用这种方式实现组件嵌套:<pid="app"><app-content><my-header></my-header><my-footer></my-footer></app-content></p>目前实现的方式:是在app-content.vue中的template中嵌套的index.html<pid="app"><app-content></app-content></p>main.jsimportVuefrom'../node_modules/vue/dist/vue';importappfrom'./app.js';newVue(app);app.jsimportcontentfrom'../components/app-content.vue'module.exports={el:"#app",data:{},components:{appContent:content}};app-content.vue<template><pid="content"><my-header></my-header><my-footer></my-footer></p></template><style>#content{height:100vh;width:100vw;background:rgb(240,240,240);position:relative;}</style><script>importmyHeaderfrom'./app-top.vue';importmyFooterfrom'./app-bottom.vue';exportdefault{components:{myHeader,myFooter}}</script>
最近热帖
近期热议
联系我们
Q Q:317563994
电话:400-000-000
邮箱:317563994@qq.com
时间:09:00 - 17:00