Vue v-pre

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <h1>产生编译 {{msg}}</h1>
        <p>--------------------</p>
        <h1 v-pre>不产生编译 {{msg}}</h1>
    </div>
    <script src="js/vue.3.2.2.js"></script>
    <script>
        // 1、创建Vue的实例对象
        const app = Vue.createApp({
            data(){//定义数据
                return {
                    msg:'你好!'
                }
            }
        }).mount('#app');
    </script>
</body>
</html>

 

posted @ 2021-08-15 16:07  残星  阅读(71)  评论(0编辑  收藏  举报