zoukankan      html  css  js  c++  java
  • vue基础

    <!DOCTYPE html>
    <html lang="en">

    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>资料</title>
        <style type="text/css">
            [v-cloak] {
                display: none;
            }
        </style>
    </head>

    <body>
        <div>练习</div>
        <div id="app">
            <div v-cloak>{{msg}}</div>
            <div v-cloak>{{num}}</div>
            <div v-text='mkg'></div>
            <div v-html='mag'></div>
            <div v-once>{{mlk}}</div>
            <div v-pre>{{eee}}</div>
            <div>{{model}}</div>
            <div>
                <input type="text" v-model='model'>
            </div>



            <div>
                <button v-on:click='num++'>点击01</button>
                <button @click='num++'>点击02</button>
                <button @click='handle'>点击03</button>
                <button @click='handle()'>点击04</button>
            </div>

        </div>
        <script src="https://unpkg.com/vue/dist/vue.js"></script>
        <script type="text/javascript">
            var vm = new Vue({
                el: "#app",
                data: {
                    msg: 'hello world!',
                    num: 0,
                    mag: '<h1>hello vue!<h1>',
                    mkg: 'hello java!',
                    mlk: 123,
                    eee: 456,
                    model: 'model'

                },
                methods: {
                    handle: function (){
                        console.log(this === vm)
                        this.num++;
                    }
                }
            })

        </script>

    </body>

    </html>
  • 相关阅读:
    [20200316]dmesg与时间戳2.txt
    [20200312]不要设置net.ipv4.tcp_tw_recycle=1.txt
    [20200223]关于latch and mutext的优化.txt
    [20200211]使用DBMS_SHARED_POOL.MARKHOT与sql_id的计算.txt
    [20200129]子光标不共享BIND_EQUIV_FAILURE.txt
    [20200103]GUID转换GUID_BASE64.txt
    [20191220]关于共享内存段相关问题.txt
    [20191218]降序索引疑问4.txt
    git工具-系列目录
    git工具-git基础
  • 原文地址:https://www.cnblogs.com/jiaoliuxuexi/p/15083462.html
Copyright © 2011-2022 走看看