vue中函数参数传递为undefined

艾米吖

关注

阅读 12

2023-11-08

目录

前言

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)

0 0 举报