1.安装(如果在创建项目的时候没有确认安装)
1 | cnpm install vue-router --save |
之后在src下会生成一个文件夹router,这里我们删除这个文件夹。(安装好就行了,不用它的默认文件夹,我们自己封装)
1.安装(如果在创建项目的时候没有确认安装)
1 | cnpm install vue-router --save |
之后在src下会生成一个文件夹router,这里我们删除这个文件夹。(安装好就行了,不用它的默认文件夹,我们自己封装)
在使用HTML button:
1 | <button @click="login()">登录</button> |
出现了错误提示:
1 | Vue is not defined |
解决办法:
1.安装npm
去Node.js官网下载安装Node.js,npm也就安装上了。
2.安装国内淘宝镜像,以后就可以通过cnpm代替npm指令,使用国内源,执行效率更高:
1 | npm install -g cnpm --registry=https://registry.npm.taobao.org |
1.卸载旧版本
1 | npm uninstall vue-cli -g |
1.首先在依赖中填写要引入jquery版本信息
1 | "dependencies": { |
© 2023 南疆 with help from Hexo and Twitter Bootstrap. Theme by Freemind.