Common component installation of Vue 2.x

Common component installation of Vue 2.x

1, Vuex

npm i vuex@3

Note: At present, if you install directly with the npm i vuex command, you will install Vuex4 version, but Vuex version 4 can only be used in vue3, if you install it directly, the following error will be reported. Only version 3 of vuex can be used in vue2.
insert image description here 

2、nanoid

npm i nanoid

No special circumstances, just install it directly, rest assured to eat
 

3、view-router

npm i vue-router@3

Note: After February 7, 2022, the default version of vue-router is version 4, and vue-router4 can only be used in vue3; vue-router3 can only be used in vue2. If there is no corresponding version installed, the following error will occur.
insert image description here
 

4、axios

npm i axios

No special circumstances, just install it directly, rest assured to eat

Guess you like

Origin blog.csdn.net/DCJwwh/article/details/128906377