Skip to content
Permalink
Browse files

refactor

  • Loading branch information...
PanJiaChen committed May 3, 2018
1 parent 594836a commit 4a6b53cfd4349dc971349afd90610e9107b1ae57
Showing with 2,925 additions and 308 deletions.
  1. +13 −0 .electron-vue/webpack.renderer.config.js
  2. +1 −0 .gitignore
  3. +14 −7 README.md
  4. +4 −0 config/dev.env.js
  5. +8 −0 config/index.js
  6. +4 −0 config/prod.env.js
  7. +966 −27 package-lock.json
  8. +13 −7 package.json
  9. +1 −1 src/index.ejs
  10. +1 −1 src/main/index.js
  11. +5 −6 src/renderer/App.vue
  12. +27 −0 src/renderer/api/login.js
  13. +9 −0 src/renderer/api/table.js
  14. 0 src/renderer/assets/.gitkeep
  15. BIN src/renderer/assets/404_images/404.png
  16. BIN src/renderer/assets/404_images/404_cloud.png
  17. +51 −0 src/renderer/components/Breadcrumb/index.vue
  18. +44 −0 src/renderer/components/Hamburger/index.vue
  19. +0 −128 src/renderer/components/LandingPage.vue
  20. +0 −73 src/renderer/components/LandingPage/SystemInformation.vue
  21. +57 −0 src/renderer/components/ScrollBar/index.vue
  22. +42 −0 src/renderer/components/SvgIcon/index.vue
  23. +9 −0 src/renderer/icons/index.js
  24. +1 −0 src/renderer/icons/svg/example.svg
  25. +1 −0 src/renderer/icons/svg/eye.svg
  26. +1 −0 src/renderer/icons/svg/form.svg
  27. +1 −0 src/renderer/icons/svg/password.svg
  28. +1 −0 src/renderer/icons/svg/table.svg
  29. +1 −0 src/renderer/icons/svg/tree.svg
  30. +1 −0 src/renderer/icons/svg/user.svg
  31. +12 −3 src/renderer/main.js
  32. +40 −0 src/renderer/permission.js
  33. +76 −11 src/renderer/router/index.js
  34. +9 −0 src/renderer/store/getters.js
  35. +11 −5 src/renderer/store/index.js
  36. +0 −25 src/renderer/store/modules/Counter.js
  37. +34 −0 src/renderer/store/modules/app.js
  38. +0 −14 src/renderer/store/modules/index.js
  39. +83 −0 src/renderer/store/modules/user.js
  40. +29 −0 src/renderer/styles/element-ui.scss
  41. +59 −0 src/renderer/styles/index.scss
  42. +27 −0 src/renderer/styles/mixin.scss
  43. +105 −0 src/renderer/styles/sidebar.scss
  44. +32 −0 src/renderer/styles/transition.scss
  45. +4 −0 src/renderer/styles/variables.scss
  46. +58 −0 src/renderer/utils/index.js
  47. +65 −0 src/renderer/utils/request.js
  48. +33 −0 src/renderer/utils/validate.js
  49. +229 −0 src/renderer/views/404.vue
  50. +32 −0 src/renderer/views/dashboard/index.vue
  51. +85 −0 src/renderer/views/form/index.vue
  52. +49 −0 src/renderer/views/layout/Layout.vue
  53. +19 −0 src/renderer/views/layout/components/AppMain.vue
  54. +94 −0 src/renderer/views/layout/components/Navbar.vue
  55. +59 −0 src/renderer/views/layout/components/Sidebar/SidebarItem.vue
  56. +36 −0 src/renderer/views/layout/components/Sidebar/index.vue
  57. +3 −0 src/renderer/views/layout/components/index.js
  58. +41 −0 src/renderer/views/layout/mixin/ResizeHandler.js
  59. +182 −0 src/renderer/views/login/index.vue
  60. +72 −0 src/renderer/views/table/index.vue
  61. +71 −0 src/renderer/views/tree/index.vue
@@ -5,6 +5,7 @@ process.env.BABEL_ENV = 'renderer'
const path = require('path')
const { dependencies } = require('../package.json')
const webpack = require('webpack')
const config = require('../config/index.js')

const BabiliWebpackPlugin = require('babili-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
@@ -74,8 +75,17 @@ let rendererConfig = {
}
}
},
{
test: /\.svg$/,
loader: 'svg-sprite-loader',
include: [path.join(__dirname, '../src/renderer/icons')],
options: {
symbolId: 'icon-[name]'
}
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
exclude: [path.join(__dirname, '../src/renderer/icons')],
use: {
loader: 'url-loader',
query: {
@@ -110,6 +120,9 @@ let rendererConfig = {
},
plugins: [
new ExtractTextPlugin('styles.css'),
new webpack.DefinePlugin({
'process.env': config.dev.env
}),
new HtmlWebpackPlugin({
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),
@@ -3,6 +3,7 @@ dist/electron/*
dist/web/*
build/*
!build/icons
package-lock.json
node_modules/
npm-debug.log
npm-debug.log.*
@@ -1,8 +1,10 @@
# my-project
# electron-vue-admin

> An electron-vue project
#### Build Setup
This is a vue electron admin project base on [vueAdmin-template](https://github.com/PanJiaChen/vueAdmin-template) , and was generated from [electron-vue](https://github.com/SimulatedGREG/electron-vue) using [vue-cli](https://github.com/vuejs/vue-cli). Documentation about this project can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).

## Build Setup

``` bash
# install dependencies
@@ -11,15 +13,20 @@ npm install
# serve with hot reload at localhost:9080
npm run dev
# build electron application for production
# build electron app for production
npm run build
# lint all JS/Vue component files in `src/`
# lint all JS/Vue component files in `app/src`
npm run lint
# run webpack in production
npm run pack
```

---

This project was generated with [electron-vue](https://github.com/SimulatedGREG/electron-vue)@[7c4e3e9](https://github.com/SimulatedGREG/electron-vue/tree/7c4e3e90a772bd4c27d2dd4790f61f09bae0fcef) using [vue-cli](https://github.com/vuejs/vue-cli). Documentation about the original structure can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).

## Demo

![](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/electron-login.png)

![](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/electron-admin.gif)
@@ -0,0 +1,4 @@
module.exports = {
NODE_ENV: '"development"',
BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"'
}
@@ -0,0 +1,8 @@
module.exports = {
build: {
env: require('./prod.env')
},
dev: {
env: require('./dev.env')
}
}
@@ -0,0 +1,4 @@
module.exports = {
NODE_ENV: '"production"',
BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"'
}

0 comments on commit 4a6b53c

Please sign in to comment.
You can’t perform that action at this time.