vue第一课:简单了解

发布时间 2023-04-01 09:56:00作者: super_ip

1,通过JS引入,学习的时候通过CDN即可

<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>

2,在HTML文件中

<div id ='root'>
    <h1>hello,{{name}}</h1>
</div>
<script type='text/javascript'>
    vue.config.productionTip=false //组织vue在启动时生成生产提示
    new Vue({
    el:'#root', //el用于指定当前Vue实例为哪个容器服务
    data:
    name:'Vue',
    
    
    })
    


</script>