• vue-组件


    1

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <script src="bower_components/vue/dist/vue.js"></script>
        <style>
        </style>
    </head>
    <body>
        <div id="box">
            <!-- <aaa></aaa> -->
        </div>
    
        <script>
            var Aaa=Vue.extend({
                template:'<h3>我是标题3</h3>'
            });
    
            var a=new Aaa();
            console.log(a);
    
    
            var vm=new Vue({
                el:'#box',
                data:{
                    bSign:true
                }
            });
    
        </script>
    </body>
    </html>

    2

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <script src="bower_components/vue/dist/vue.js"></script>
        <style>
        </style>
    </head>
    <body>
        <div id="box">
            <aaa></aaa>
        </div>
    
        <script>
            var Aaa=Vue.extend({
                template:'<h3>我是标题3</h3>'
            });
    
            Vue.component('aaa',Aaa);
    
    
            var vm=new Vue({
                el:'#box',
                data:{
                    bSign:true
                }
            });
    
        </script>
    </body>
    </html>

    3

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <script src="bower_components/vue/dist/vue.js"></script>
        <style>
        </style>
    </head>
    <body>
        <div id="box">
            <aaa></aaa>
        </div>
    
        <script>
            var Aaa=Vue.extend({
                template:'<h3>{{msg}}</h3>',
                data(){
                    return {
                        msg:'ddddd'
                    }
                }
            });
    
    
            var vm=new Vue({
                el:'#box',
                data:{
                    bSign:true
                },
                components:{ //局部组件
                    aaa:Aaa
                }
            });
    
        </script>
    </body>
    </html>

    4

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <script src="bower_components/vue/dist/vue.js"></script>
        <style>
        </style>
    </head>
    <body>
        <div id="box">
            <my-aaa></my-aaa>
        </div>
    
        <script>
            var Aaa=Vue.extend({
                template:'<h3>{{msg}}</h3>',
                data(){
                    return {
                        msg:'ddddd'
                    }
                }
            });
    
    
            var vm=new Vue({
                el:'#box',
                data:{
                    bSign:true
                },
                components:{ //局部组件
                    'my-aaa':Aaa
                }
            });
    
        </script>
    </body>
    </html>
  • 相关阅读:
    flask 返回json数据
    flask 中文乱码
    flask 参数校验
    AOP集成防止连续多次点击问题
    关于横竖屏切换导致的Activity重建问题
    Flutter工程无法找到Android真机或Android模拟器
    Failed to find configured root that contains
    Unable to resolve dependency问题解决
    双重ScrollView,RecyclerView联动实例
    RecyclerView联动滑动失败
  • 原文地址:https://www.cnblogs.com/lanlanJser/p/7420938.html
Copyright © 2020-2023  润新知