# in-ele-vue **Repository Path**: wangye123456/in-ele-vue ## Basic Information - **Project Name**: in-ele-vue - **Description**: 渣渣学习vue之路 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-23 - **Last Updated**: 2021-01-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 1) 第一天记录 全局安装 vue-cli脚手架: >vue install vue-cli -g 使用vue2命令创建项目 >vue init webpack in-ele-vue //创建项目文件 进入项目,安装webpack >mikdir in-ele-vue //创建文件夹 >cd in-ele-vue //进入文件 >vue init webpack //安装webpack 安装package.json中项目安装包 (使用淘宝镜像```npm install -g cnpm --registry=https://registry.npm.taobao.org```) >npm install 运行项目 >npm run dev 在阿里巴巴矢量图标库选择自己需要的图标库```http://www.iconfont.cn```,下载下来 在index.html文件中引入 `````` ### 1) 第二天记录 >npm install axios --save //安装axios 切换国内镜像下载node-sass 命令 npm install -g mirror-config-china --registry=http://registry.npm.taobao.org >npm install sass-loader node-sass -D //安装sass 其中sass-loader依赖于node-sass >npm i element-ui -S ///安装ElementUi,i是指install简写 >npm install babel-plugin-component -D //借助 babel-plugin-component,可以只引入需要的组件,以达到减小项目体积的目的 >在build/webpack.base.config.js中添加:rules中加入, > { > test: /\.scss$/, > loaders: ['style', 'css', 'sass'] > } 可以把端口号进行修改,默认的是```http://localhost:8080```,在config文件夹中的index.找到port,改成port: 8088,就会变成```http://localhost:8088``` 在src下新建文件夹views,用于后期页面编写 打开build文件夹下的webpack.prod.conf.js和webpack.dev.conf.js文件,增加自己喜欢的ico图标,我把图标放在了src文件夹下的assets中 ``` new HtmlWebpackPlugin({ filename: config.build.index, template: 'index.html', inject: true, favicon: './src/assets/favicon.ico', //webpack.prod.conf.js中加入 new HtmlWebpackPlugin({ filename: 'index.html', template: 'index.html', inject: true, favicon: './src/assets/favicon.ico' //webpack.dev.conf.js }), ``` 在components文件夹中写2个组件,因为要做下面这种布局,将就看看,因为用的md写的,没有插入图片:
| Aside | Header |
| Main |