<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <p>--------------------</p>
        <h1>{{msg+' '+site}}</h1>
        <p>--------------------</p>
        <h1>{{msg}} {{site}}</h1>
        <p>--------------------</p>
        <h1>{{count*2/10}}</h1>
    </div>
    <script src="js/vue.3.2.2.js"></script>
    <script>
        // 1、创建Vue的实例对象
        const app = Vue.createApp({
            data(){//定义数据
                return {
                    msg:'你好!',
                    site:'http://www.baidu.com',
                    count:2
                }
            }
        }).mount('#app');
    </script>
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2021-07-01
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-01
  • 2021-10-16
  • 2022-02-20
  • 2021-10-04
  • 2021-12-30
  • 2021-11-07
相关资源
相似解决方案