0
点赞
收藏
分享

微信扫一扫

vue中函数参数传递为undefined

艾米吖 2023-11-08 阅读 12

目录

前言

hello vue

为什么要new Vue(),而不能直接调用Vue()?

Vue构造函数中的形参options

template配置项

$mount()方法


前言

从此篇博客开始,将开启vue的学习,查缺补漏。

只要学计算机语言,那么hello xxx那一定是入门第一行代码了,本文就来解析hello vue,Vue的入门代码

hello vue

代码

直接下载的vue.js文件,用script引入

vue2官网

<div id="app"></div>
    <script>
        const myVue = new Vue({
            template:'<h1>hello vue!<h1>'
        })
        myVue.$mount('#app')
    </script>

为什么要new Vue(),而不能直接调用Vue()?
Vue构造函数中的形参options
template配置项
$mount()方法
举报

相关推荐

0 条评论