├── static ├── .gitkeep ├── images │ ├── b_header.jpg │ ├── b_header2.jpg │ └── b_header3.jpg └── css │ └── main.css ├── config ├── prod.env.js ├── dev.env.js └── index.js ├── .gitignore ├── src ├── assets │ └── logo.png ├── App.vue ├── components │ ├── common │ │ ├── Home.vue │ │ ├── pageTitle.vue │ │ ├── Sidebar.vue │ │ ├── sidebar.vue │ │ ├── Header.vue │ │ └── header.vue │ ├── page │ │ ├── TodoListPage.vue │ │ ├── MarkdownPage.vue │ │ ├── BasicCharts.vue │ │ ├── EditorPage.vue │ │ ├── FormLayouts.vue │ │ ├── BasicTables.vue │ │ ├── DashBoard.vue │ │ └── FormInput.vue │ ├── forms │ │ ├── topLayoutForm.vue │ │ ├── leftLayoutForm.vue │ │ ├── rightLayoutForm.vue │ │ └── inlineForm.vue │ ├── tables │ │ ├── hoverRow.vue │ │ ├── stripedRow.vue │ │ ├── borderTable.vue │ │ ├── fixedColumnTable.vue │ │ ├── fixedHeaderTable.vue │ │ └── condensedTable.vue │ ├── message │ │ └── MessageList.vue │ ├── todoList │ │ └── TodoList.vue │ └── charts │ │ ├── radarChart.vue │ │ ├── pieChart.vue │ │ ├── funnelChart.vue │ │ ├── lineChart.vue │ │ └── barChart.vue ├── main.js └── router │ └── index.js ├── .editorconfig ├── .postcssrc.js ├── .babelrc ├── index.html ├── README.md └── package.json /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log 5 | yarn-error.log 6 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/jspangAdmin/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /static/images/b_header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/jspangAdmin/HEAD/static/images/b_header.jpg -------------------------------------------------------------------------------- /static/images/b_header2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/jspangAdmin/HEAD/static/images/b_header2.jpg -------------------------------------------------------------------------------- /static/images/b_header3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenghy/jspangAdmin/HEAD/static/images/b_header3.jpg -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | // to edit target browsers: use "browserlist" field in package.json 6 | "autoprefixer": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { "modules": false }], 4 | "stage-2" 5 | ], 6 | "plugins": ["transform-runtime"], 7 | "comments": false, 8 | "env": { 9 | "test": { 10 | "presets": ["env", "stage-2"], 11 | "plugins": [ "istanbul" ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | pangadmin 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/components/common/Home.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 21 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue'; 4 | import App from './App'; 5 | import router from './router'; 6 | import ElementUI from 'element-ui'; 7 | //引入element-ui的默认CSS样式 8 | import 'element-ui/lib/theme-default/index.css'; 9 | 10 | 11 | Vue.use(ElementUI); 12 | Vue.config.productionTip = false 13 | 14 | 15 | 16 | 17 | /* eslint-disable no-new */ 18 | new Vue({ 19 | el: '#app', 20 | router, 21 | template: '', 22 | components: { App }, 23 | beforeCreate:function(){ 24 | console.log('beforeCreated.....'); 25 | } 26 | }) 27 | -------------------------------------------------------------------------------- /src/components/common/pageTitle.vue: -------------------------------------------------------------------------------- 1 | 11 | 16 | 38 | -------------------------------------------------------------------------------- /static/css/main.css: -------------------------------------------------------------------------------- 1 | *{margin:0;padding:0;} 2 | html,body,#app,.wrapper{ 3 | width:100%; 4 | height:100%; 5 | overflow: hidden; 6 | 7 | } 8 | body{ 9 | font-family:"Helvetica Neue",Helvetica, "Microsoft YaHei", Arial, STHeiTi, sans-serif; 10 | color:#777777; 11 | } 12 | a{text-decoration: none} 13 | 14 | .el-badge__content{ 15 | border:0px !important; 16 | } 17 | .content{ 18 | background: none repeat scroll 0 0 #f0f3f4; 19 | position: absolute; 20 | left: 200px; 21 | right: 0; 22 | top: 66px; 23 | bottom:0; 24 | width: auto; 25 | padding:25px 40px 25px 40px; 26 | box-sizing: border-box; 27 | overflow-y: scroll; 28 | } 29 | .clear{ 30 | width:100%; 31 | height:0px; 32 | clear:both; 33 | } 34 | .ql-editor{ 35 | background-color: #fff; 36 | min-height: 20em; 37 | padding-bottom: 1em; 38 | max-height: 25em; 39 | } 40 | .ql-toolbar{ 41 | background-color: #fff; 42 | } -------------------------------------------------------------------------------- /src/components/page/TodoListPage.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 44 | 45 | -------------------------------------------------------------------------------- /src/components/forms/topLayoutForm.vue: -------------------------------------------------------------------------------- 1 | 17 | 35 | 38 | -------------------------------------------------------------------------------- /src/components/forms/leftLayoutForm.vue: -------------------------------------------------------------------------------- 1 | 20 | 39 | 42 | -------------------------------------------------------------------------------- /src/components/forms/rightLayoutForm.vue: -------------------------------------------------------------------------------- 1 | 20 | 39 | 42 | -------------------------------------------------------------------------------- /src/components/forms/inlineForm.vue: -------------------------------------------------------------------------------- 1 | 19 | 37 | 40 | -------------------------------------------------------------------------------- /src/components/tables/hoverRow.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 39 | 42 | -------------------------------------------------------------------------------- /src/components/tables/stripedRow.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 39 | 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jspangAdmin 2 | 3 | > 一个建立在Vue2.0框架基础上的后台管理系统,它包含了后台所用的前端样式和常用组件。它可以快速的帮你搭建基于Vue的后台管理系统。 4 | ## 相关技术 5 | Vue-cli + element + eCharts 6 | ## Demo(案例预览) 7 | [Demo](http://jspang.com/jspangAdmin) 8 | 9 | ## image(图片) 10 | ### 后台首页(DashBoard) 11 | ![jspangAdmin](http://7xjyw1.com1.z0.glb.clouddn.com/jspangadmin01.png) 12 | ### 基本图标(charts) 13 | ![jspangAdmin](http://7xjyw1.com1.z0.glb.clouddn.com/jspangadmin02.png) 14 | ### 表单页面(Form Elements) 15 | ![jspangAdmin](http://7xjyw1.com1.z0.glb.clouddn.com/jspangadmin03.png) 16 | ### 表格(Tables) 17 | ![jspangAdmin](http://7xjyw1.com1.z0.glb.clouddn.com/jspangadmin04.png) 18 | ### MarkDown编辑和解析(MarkDown) 19 | ![jspangAdmin](http://7xjyw1.com1.z0.glb.clouddn.com/jspangadmin05.png) 20 | ### 任务表单(To Do List) 21 | ![jspangAdmin](http://7xjyw1.com1.z0.glb.clouddn.com/jspangadmin06.png) 22 | ## Build Setup(使用搭建步骤) 23 | ``` bash 24 | # install dependencies(安装) 25 | npm install 26 | 27 | # serve with hot reload at localhost:8080(运行) 28 | npm run dev 29 | 30 | # build for production with minification(打包) 31 | npm run build 32 | 33 | # build for production and view the bundle analyzer report 34 | npm run build --report 35 | ``` 36 | 37 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 38 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | 4 | module.exports = { 5 | build: { 6 | env: require('./prod.env'), 7 | index: path.resolve(__dirname, '../dist/index.html'), 8 | assetsRoot: path.resolve(__dirname, '../dist'), 9 | assetsSubDirectory: 'static', 10 | assetsPublicPath: './', 11 | productionSourceMap: false, 12 | // Gzip off by default as many popular static hosts such as 13 | // Surge or Netlify already gzip all static assets for you. 14 | // Before setting to `true`, make sure to: 15 | // npm install --save-dev compression-webpack-plugin 16 | productionGzip: false, 17 | productionGzipExtensions: ['js', 'css'], 18 | // Run the build command with an extra argument to 19 | // View the bundle analyzer report after build finishes: 20 | // `npm run build --report` 21 | // Set to `true` or `false` to always turn it on or off 22 | bundleAnalyzerReport: process.env.npm_config_report 23 | }, 24 | dev: { 25 | env: require('./dev.env'), 26 | port: 8080, 27 | autoOpenBrowser: true, 28 | assetsSubDirectory: 'static', 29 | assetsPublicPath: '/', 30 | proxyTable: {}, 31 | // CSS Sourcemaps off by default because relative paths are "buggy" 32 | // with this option, according to the CSS-Loader README 33 | // (https://github.com/webpack/css-loader#sourcemaps) 34 | // In our experience, they generally work as expected, 35 | // just be aware of this issue when enabling this option. 36 | cssSourceMap: false 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Router from 'vue-router'; 3 | import Home from '@/components/common/Home'; 4 | import DashBoard from '@/components/page/DashBoard'; 5 | import AmCharts from '@/components/page/BasicCharts'; 6 | import FormInput from '@/components/page/FormInput'; 7 | import FormLayouts from '@/components/page/FormLayouts'; 8 | import BasicTables from '@/components/page/BasicTables'; 9 | import EditorPage from '@/components/page/EditorPage'; 10 | import MarkdownPage from '@/components/page/MarkdownPage'; 11 | import TodoList from '@/components/page/TodoListPage'; 12 | 13 | Vue.use(Router) 14 | 15 | export default new Router({ 16 | mode:'history', 17 | base:__dirname, 18 | routes: [ 19 | { 20 | path: '/', 21 | component: Home, 22 | children:[ 23 | { 24 | path:'', 25 | component:DashBoard 26 | },{ 27 | path:'/DashBoard', 28 | component:DashBoard 29 | },{ 30 | path:'/EditorPage', 31 | component:EditorPage 32 | },{ 33 | path:'/MarkdownPage', 34 | component:MarkdownPage 35 | },{ 36 | path:'/BasicCharts', 37 | component:AmCharts 38 | },{ 39 | path:'/FormInput', 40 | component:FormInput 41 | },{ 42 | path:'/FormLayouts', 43 | component:FormLayouts 44 | },{ 45 | path:'/BasicTables', 46 | component:BasicTables 47 | },{ 48 | path:'/TodoList', 49 | component:TodoList 50 | } 51 | 52 | 53 | ] 54 | } 55 | ] 56 | }) 57 | -------------------------------------------------------------------------------- /src/components/tables/borderTable.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 62 | 65 | -------------------------------------------------------------------------------- /src/components/tables/fixedColumnTable.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 54 | 57 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pangadmin", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "ShengHongYu ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "node build/dev-server.js", 9 | "build": "node build/build.js" 10 | }, 11 | "dependencies": { 12 | "element-ui": "^1.2.3", 13 | "vue": "^2.2.1", 14 | "vue-echarts-v3": "^1.0.3", 15 | "vue-markdown": "^2.1.3", 16 | "vue-quill-editor": "^1.1.1", 17 | "vue-router": "^2.2.0", 18 | "vue-simplemde": "^0.3.7" 19 | }, 20 | "devDependencies": { 21 | "autoprefixer": "^6.7.2", 22 | "babel-core": "^6.22.1", 23 | "babel-loader": "^6.2.10", 24 | "babel-plugin-transform-runtime": "^6.22.0", 25 | "babel-preset-env": "^1.2.1", 26 | "babel-preset-stage-2": "^6.22.0", 27 | "babel-register": "^6.22.0", 28 | "chalk": "^1.1.3", 29 | "connect-history-api-fallback": "^1.3.0", 30 | "copy-webpack-plugin": "^4.0.1", 31 | "css-loader": "^0.26.1", 32 | "eventsource-polyfill": "^0.9.6", 33 | "express": "^4.14.1", 34 | "extract-text-webpack-plugin": "^2.0.0", 35 | "file-loader": "^0.10.0", 36 | "friendly-errors-webpack-plugin": "^1.1.3", 37 | "function-bind": "^1.1.0", 38 | "html-webpack-plugin": "^2.28.0", 39 | "http-proxy-middleware": "^0.17.3", 40 | "webpack-bundle-analyzer": "^2.2.1", 41 | "semver": "^5.3.0", 42 | "opn": "^4.0.2", 43 | "optimize-css-assets-webpack-plugin": "^1.3.0", 44 | "ora": "^1.1.0", 45 | "rimraf": "^2.6.0", 46 | "url-loader": "^0.5.7", 47 | "vue-loader": "^11.1.4", 48 | "vue-style-loader": "^2.0.0", 49 | "vue-template-compiler": "^2.2.1", 50 | "webpack": "^2.2.1", 51 | "webpack-dev-middleware": "^1.10.0", 52 | "webpack-hot-middleware": "^2.16.1", 53 | "webpack-merge": "^2.6.1" 54 | }, 55 | "engines": { 56 | "node": ">= 4.0.0", 57 | "npm": ">= 3.0.0" 58 | }, 59 | "browserslist": [ 60 | "> 1%", 61 | "last 2 versions", 62 | "not ie <= 8" 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /src/components/page/MarkdownPage.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 71 | 72 | -------------------------------------------------------------------------------- /src/components/tables/fixedHeaderTable.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 68 | 71 | -------------------------------------------------------------------------------- /src/components/page/BasicCharts.vue: -------------------------------------------------------------------------------- 1 | 48 | 49 | 65 | 66 | -------------------------------------------------------------------------------- /src/components/page/EditorPage.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 63 | 64 | -------------------------------------------------------------------------------- /src/components/message/MessageList.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 36 | 37 | -------------------------------------------------------------------------------- /src/components/page/FormLayouts.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | 67 | 68 | -------------------------------------------------------------------------------- /src/components/todoList/TodoList.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 55 | 56 | -------------------------------------------------------------------------------- /src/components/charts/radarChart.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 68 | 69 | -------------------------------------------------------------------------------- /src/components/tables/condensedTable.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 28 | 29 | 95 | 96 | -------------------------------------------------------------------------------- /src/components/common/Sidebar.vue: -------------------------------------------------------------------------------- 1 | 58 | 67 | 89 | -------------------------------------------------------------------------------- /src/components/common/sidebar.vue: -------------------------------------------------------------------------------- 1 | 58 | 67 | 89 | -------------------------------------------------------------------------------- /src/components/page/BasicTables.vue: -------------------------------------------------------------------------------- 1 | 80 | 81 | 99 | 100 | -------------------------------------------------------------------------------- /src/components/charts/pieChart.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 91 | 92 | -------------------------------------------------------------------------------- /src/components/charts/funnelChart.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 98 | 99 | -------------------------------------------------------------------------------- /src/components/charts/lineChart.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 110 | 111 | -------------------------------------------------------------------------------- /src/components/charts/barChart.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 151 | 152 | -------------------------------------------------------------------------------- /src/components/page/DashBoard.vue: -------------------------------------------------------------------------------- 1 | 144 | 145 | 166 | 167 | -------------------------------------------------------------------------------- /src/components/common/Header.vue: -------------------------------------------------------------------------------- 1 | 145 | 146 | 171 | 306 | -------------------------------------------------------------------------------- /src/components/common/header.vue: -------------------------------------------------------------------------------- 1 | 145 | 146 | 171 | 306 | -------------------------------------------------------------------------------- /src/components/page/FormInput.vue: -------------------------------------------------------------------------------- 1 | 215 | 216 | 278 | 279 | 280 | 281 | 282 | --------------------------------------------------------------------------------