1 Star 0 Fork 0

khappysmile / OA系统

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

代码打包修改点

prod.env.js

components下global.js

自定义封装后端路由permission.js

路由懒加载会导致开发是打包过慢

使用babel 的 plugins babel-plugin-dynamic-import-node

修改 .babelrc 注释 "env": { "development":{ "plugins": ["dynamic-import-node" } }

vueAdmin-template

这是一个 极简的vue admin 管理后台 它只包含了 Element UI & axios & iconfont & permission control & lint,这些搭建后台必要的东西。

线上地址

Extra

如果你想要根据用户角色来动态生成侧边栏和router,你可以使用改分支permission-control  

相关项目

vue-element-admin

electron-vue-admin

写了一个系列的教程配套文章,如何从零构建后一个完整的后台项目:

Build Setup


# Clone project
git clone https://github.com/PanJiaChen/vueAdmin-template.git

# Install dependencies
npm install

# 建议不要用cnpm  安装有各种诡异的bug 可以通过如下操作解决npm速度慢的问题
npm install --registry=https://registry.npm.taobao.org

# serve with hot reload at localhost:9528
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

Demo

demo

Element-Ui 使用cdn教程

首先找到 index.html (根目录下)

引入 Element的css和js ,并且引入 vue 。因为 Element-Ui 是依赖 vue 的,所以必须在它之前引入 vue 。

之后找到 webpack.base.conf.js 加入 externals 让webpack 不打包 vue 和 element

externals: {
  vue: 'Vue',
  'element-ui':'ELEMENT'
}

之后还有一个小细节是如果你用了全局对象方式引入vue,就不需要 手动 Vue.use(Vuex) ,它会自动挂载,具体见 issue

最终你可以使用 npm run build --report 查看效果 如图: demo

具体代码

对应分支

License

MIT license.

Copyright (c) 2017-present PanJiaChen

MIT License Copyright (c) 2017-present PanJiaChen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/khappysmile/oa_system.git
git@gitee.com:khappysmile/oa_system.git
khappysmile
oa_system
OA系统
master

搜索帮助

14c37bed 8189591 565d56ea 8189591