打赏

vue 避免渲染时闪烁

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

    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>vue 避免渲染闪烁</title>
        <style type="text/css">
            [v-clock] {
                display: none;
            }
        </style>
    </head>

    <body>
        <div id="app" v-clock>
            <div>
                {{ message }}
            </div>
        </div>
        <script src="https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.min.js"></script>
        <script type="text/javascript">
            new Vue({
                el: '#app',
                data: {
                    message: 99999
                }
            })
        </script>
    </body>

</html>

 

posted @ 2018-05-15 17:34  孟繁贵  阅读(1225)  评论(0编辑  收藏  举报
TOP