vue.js与后台{{}}冲突的解决办法

用delimiters替代{{}}

<!DOCTYPE html>

<html>
 
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    </head>
 
    <body>
 
        <div id="app">
ccx num /ccx
         
             
        </div>
    </body>
    <script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/mb.js" type="text/javascript" charset="utf-8"></script>
    <script>
       
        var vm = new Vue({
 
            el: "#app",
            data: {
                name: "苹果",
                price: 10,
                num: 1
            },
        delimiters:['ccx',"/ccx"]
 
        });
    </script>
 
</html>
posted @ 2018-06-23 13:58  印度阿铭  阅读(1043)  评论(0编辑  收藏  举报