zoukankan      html  css  js  c++  java
  • 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({
                data:{
                    msg:'我是笔筒^_^'
                },
                template:'<h3>{{msg}}</h3>'
            });
    
            Vue.component('aaa',Aaa);
    
    
            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({
                data(){
                    return {
                        msg:'我是标题^^'
                    };
                },
                template:'<h3>{{msg}}</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({
                data(){
                    return {
                        msg:'我是标题^^'
                    };
                },
                methods:{
                    change(){
                        this.msg='changed'
                    }
                },
                template:'<h3 @click="change">{{msg}}</h3>'
            });
    
            Vue.component('aaa',Aaa);
    
    
            var vm=new Vue({
                el:'#box',
                data:{
                    bSign:true
                }
            });
    
        </script>
    </body>
    </html>
  • 相关阅读:
    Elasticsearch 结构化搜索
    KMP 算法
    ElasticSearch 配置
    C++ 入门
    Spark 基础操作
    HBase 与 MapReduce 集成
    iOS面试相关
    iOS开发值得学习的Demo
    Mac系统安装MyEclipse
    linux安装tomcat
  • 原文地址:https://www.cnblogs.com/lanlanJser/p/7420953.html
Copyright © 2011-2022 走看看