2022-10-08
Vue Router的封装配置

1.安装(如果在创建项目的时候没有确认安装)

1
cnpm install vue-router --save

之后在src下会生成一个文件夹router,这里我们删除这个文件夹。(安装好就行了,不用它的默认文件夹,我们自己封装)

阅读更多

2022-10-08
Vue错误笔记集合

Vue is not defined

在使用HTML button:

1
<button @click="login()">登录</button>

出现了错误提示:

1
Vue is not defined

解决办法:

阅读更多

2022-10-08
cnpm 安装指定版本的脚手架vue-cli

1.安装npm

去Node.js官网下载安装Node.js,npm也就安装上了。

2.安装国内淘宝镜像,以后就可以通过cnpm代替npm指令,使用国内源,执行效率更高:

1
npm install -g cnpm --registry=https://registry.npm.taobao.org
阅读更多

2022-10-08
vue-cli更新

1.卸载旧版本

1
2
3
4
5
6
npm uninstall vue-cli -g  



yarn global remove vue-cli

阅读更多

2022-10-08
Vue中引入Jquery

1.首先在依赖中填写要引入jquery版本信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"dependencies": {

"@babel/polyfill": "^7.12.1",

"ant-design-vue": "^1.6.5",

"axios": "^0.20.0",

"element-ui": "^2.13.2",

"hexo-helper-live2d": "^3.1.1",

"jquery": "^3.6.0",

"view-design": "^4.4.0",

"vue": "^2.5.2",

"vue-axios": "^3.1.1",

"vue-resource": "^1.5.1",

"vue-router": "^3.4.7",

"wangeditor": "^4.7.10"

},
阅读更多
浏览 |

© 2023 南疆 with help from Hexo and Twitter Bootstrap. Theme by Freemind.

container-narrow -->