Vue--------delimiters 系统管理员 2023-06-16 08:17 2阅读 0赞 改变模板,vue默认为\{ \{\}\} <!DOCTYPE html> <html lang="en"> <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>slot</title> <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script> </head> <body> <div id='root'> ${ msg} </div> </body> <script> var vm = new Vue({ el: '#root', delimiters: ['${', '}'], data() { return { msg: 'Hello Vue' } } }) </script> </html>
还没有评论,来说两句吧...