javascript - How does vue2.0 use component custom tags to implement component nesting?
Lisa Kudrow
Lisa Kudrow 2017-06-26 10:50:58
0
1
798

Want to implement component nesting in this way:


The current implementation method: nested in the template in app-content.vue

index.html

main.js

import Vue from '../node_modules/vue/dist/vue'; import app from './app.js'; new Vue(app);

app.js

import content from '../components/app-content.vue' module.exports={ el:"#app", data:{}, components:{ appContent:content } };

app-content.vue

  
Lisa Kudrow
Lisa Kudrow

reply all (1)
Peter_Zhu

I wrote an example as follows.

Output effect

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!