修改elementUI的源码

elementUI版本:2.4.11

修改elementUI的源码方式:https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.zh-CN.md

获取elementUI的源码

源码在git上,地址:https://github.com/ElemeFE/element

也可以直接使用命令将源码下载到本地: 

git clone https://github.com/ElemeFE/element.git
或者
git clone [email protected]:ElemeFE/element.git

开发环境搭建

首先你需要 Node.js 4+,yarn 和 npm 3+。注意:我们使用 yarn 进行依赖版本的锁定,所以请不要使用 npm install 安装依赖

npm install -g yarn

运行源码

npm run dev

# open http://localhost:8085

浏览器中打开:http://localhost:8085

修改源码

打开:源码文件夹>packages文件夹>进入要修改的组件文件夹>src文件夹>修改对应的文件

打包

打包代码:
npm run dist

使用以上命令会生成lib文件夹,在源码文件夹下。将该文件夹复制拷贝到    目标项目>node_modules>element-ui,粘贴覆盖即可。

猜你喜欢

转载自blog.csdn.net/RunningAndLaughing/article/details/86231147