其他分享
首页 > 其他分享> > vue mustache语法

vue mustache语法

作者:互联网

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
  </head>
  <body>
    <div id="app">
      <p>{{ message }}</p>
      <p>{{ message }} hi</p>
      <p>{{ firstName + ' ' + lastName}}</p>
      <p>{{ firstName}} {{lastName}}</p>
      <p>{{ count * 2 }}</p>
    </div>

    <script>
      new Vue({
        el: '#app',
        data: {
          message: 'Hello Vue.js!',
          firstName: "thomas",
          lastName: "zhang",
          count: 10
        },
      })
    </script>
  </body>
</html>

标签:count,el,vue,firstName,lastName,语法,Vue,message,mustache
来源: https://www.cnblogs.com/zhangxuechao/p/14954821.html