# vue2-admin **Repository Path**: ake1205_admin_admin_admin/vue2-admin ## Basic Information - **Project Name**: vue2-admin - **Description**: vue2版本的element的小demo - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-02-20 - **Last Updated**: 2022-06-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # vue2-admin ## Project setup ``` npm install ``` ### Compiles and hot-reloads for development ``` npm run serve ``` ### Compiles and minifies for production ``` npm run build ``` ### Lints and fixes files ``` npm run lint ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/). ### 需要新增的一些东西 会使用到bootstrap4的组件等等,在public下面的index.html文件中可以直接引用bootstrap4的css样式 [Bootstrap4 中文文档](http://bs4.vx.link/index.html?tmpui_page=/) ```html ``` vue-cli的安装版本 ```shell npm install -g @vue/cli ``` element-ui 的安装 [参考地址](https://blog.csdn.net/liuarmyliu/article/details/112792576?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control) ```shell vue create my-app cd my-app vue add element-plus # 使用上面方式安装的时候会在src的目录下面产生plugins目录这个没有上传,以及在src下面有一个element-variables.scss #############或者使用下面的方式 vue add element-plus npm install vue-cli-plugin-element-plus # 全局引用 # src/plugins/element.js import ElementPlus from 'element-plus' import 'element-plus/lib/theme-chalk/index.css' export default (app) => { app.use(ElementPlus) } ``` vue-router的安装,还有一些导入导出的应用参考代码 [参考地址](https://blog.csdn.net/qq_39586440/article/details/111461293) ```shell ### vue cli3的版本 npm install vue-router ### vue cli4以上的版本 npm install vue-router@4.0.1 ``` 无路由配置的时候 ```json { path: "/:catchAll(.*)", name: "404", component: NotFound }, ``` 安装完node后需要设置套餐镜像 参考 [淘宝镜像设置](https://developer.aliyun.com/mirror/NPM?from=tnpm) [node-sass安装](https://www.pianshen.com/article/75831906408/) 无法找到babel [参考]([参考这个](https://www.cnblogs.com/chenguangliang/p/10716721.html)) [nuxtjs](https://www.nuxtjs.cn/guide/installation) 安装python [参考](https://blog.csdn.net/caicsama/article/details/103679242) ```shell # 设置淘宝镜像 npm install -g cnpm --registry=https://registry.npm.taobao.org # vue-cli npm install -g @vue/cli # 安装node-sass cnpm install node-sass # 安装webpack打包工具解决babel找不到的问题 ,下面这个安装后就可以使用npx cnpm i webpack cnpm i webpack -D cnpm i webpack-cli -D # 下面是查看版本命令 vue -V node -v npm -v npx -v ```