├── static ├── .gitkeep └── css │ └── reset.css ├── src ├── scss │ ├── animation │ │ ├── .gitkeep │ │ ├── operate.styl │ │ ├── collapse.styl │ │ ├── make-transitions.styl │ │ └── slide.styl │ ├── mixins │ │ ├── clearfix.styl │ │ ├── scrollbar.styl │ │ └── multiLineEllipsis.styl │ ├── button.styl │ ├── reset.styl │ ├── app.ss │ ├── analysis.styl │ ├── config.styl │ ├── common.styl │ └── iconfont.styl ├── common │ ├── stylus │ │ ├── variables.styl │ │ ├── index.styl │ │ ├── elment.styl │ │ ├── base.styl │ │ ├── mixin.styl │ │ └── icon.styl │ ├── common.md │ ├── image │ │ └── default.png │ ├── img │ │ └── user-logo.png │ ├── fonts │ │ ├── icon-demo.eot │ │ ├── icon-demo.ttf │ │ └── icon-demo.woff │ └── js │ │ ├── util.js │ │ ├── dom.js │ │ ├── array.js │ │ ├── ease.js │ │ └── date.js ├── views │ ├── flow-template │ │ ├── node-menu │ │ │ ├── node-menu.styl │ │ │ ├── node-menu.vue │ │ │ └── node-menu.js │ │ ├── node │ │ │ ├── node.styl │ │ │ ├── node.vue │ │ │ └── node.js │ │ ├── flow-template.styl │ │ ├── flow-template.vue │ │ └── flow-template.js │ ├── jsplumb-learn │ │ ├── node-menu │ │ │ ├── node-menu.styl │ │ │ ├── node-menu.vue │ │ │ └── node-menu.js │ │ ├── img │ │ │ ├── edit.png │ │ │ ├── delete.png │ │ │ ├── node-close.png │ │ │ ├── node-img.png │ │ │ └── node-timer.png │ │ ├── jsplumb-learn.styl │ │ ├── data_A.js │ │ ├── jsplumb-learn.vue │ │ └── node.vue │ ├── views.md │ ├── login │ │ ├── img │ │ │ ├── bg0_0.jpg │ │ │ ├── bg0_1.jpg │ │ │ ├── bg0_2.jpg │ │ │ ├── bg1_0.png │ │ │ ├── bg1_1.png │ │ │ ├── bg1_2.png │ │ │ ├── check.png │ │ │ ├── checked.png │ │ │ └── check_hover.png │ │ ├── login.js │ │ ├── login.vue │ │ └── login.styl │ ├── header │ │ ├── user-logo.png │ │ └── header.vue │ ├── sys-setting │ │ ├── welcome-page │ │ │ ├── features.png │ │ │ └── welcome-page.vue │ │ ├── runners │ │ │ └── runners.vue │ │ ├── withdraw │ │ │ └── withdraw.vue │ │ ├── sys-setting.js │ │ ├── sys-setting.styl │ │ ├── sys-setting.vue │ │ ├── base-manage │ │ │ └── base-manage.vue │ │ └── scholl-info │ │ │ └── scholl-info.vue │ ├── 404.vue │ ├── company-help │ │ └── company-help.vue │ └── user-center │ │ ├── directive-define │ │ └── directive-define.vue │ │ ├── define-component │ │ └── define-component.vue │ │ ├── user-center.js │ │ ├── define-filter │ │ └── define-filter.vue │ │ ├── user-center.styl │ │ └── user-center.vue ├── api │ ├── index.js │ ├── user.js │ └── api.js ├── utils │ ├── bus.js │ ├── checkDataType.js │ ├── uuid.js │ ├── dom.js │ ├── errorHandler.js │ ├── nodeFilter.js │ ├── atomFilter.js │ ├── tools.js │ ├── draft.js │ └── validatePipeline.js ├── directive │ ├── index.js │ └── heigh-light.js ├── store │ ├── modules │ │ ├── index.js │ │ ├── templateList.js │ │ └── atomList.js │ └── index.js ├── lang │ ├── index.js │ ├── zh.js │ └── en.js ├── component │ ├── base │ │ ├── BaseTitle.vue │ │ ├── NoData.vue │ │ ├── BaseInput.vue │ │ ├── BaseCheckbox.vue │ │ ├── BaseCollapse.vue │ │ └── BaseSearch.vue │ └── com-panel │ │ └── com-panel.vue ├── App.vue ├── main.js ├── constants │ └── index.js └── router │ └── index.js ├── test └── unit │ ├── setup.js │ ├── .eslintrc │ ├── specs │ └── HelloWorld.spec.js │ └── jest.conf.js ├── present ├── demo0.png └── mock.png ├── config ├── prod.env.js ├── test.env.js ├── dev.env.js └── index.js ├── .eslintignore ├── .editorconfig ├── .gitignore ├── index.html ├── .postcssrc.js ├── code-standards ├── file.md ├── structure.md ├── js.md └── css.md ├── mocks ├── example │ ├── data.json │ └── links.js ├── syssetting │ ├── getMenuList.js │ └── getSchoolList.js └── usercenter │ └── getMenuList.js ├── .babelrc ├── prod.server.js ├── README.md ├── .eslintrc.js ├── data ├── data.json └── usercenter.json └── package.json /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scss/animation/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/stylus/variables.styl: -------------------------------------------------------------------------------- 1 | blue = #324157 -------------------------------------------------------------------------------- /src/views/flow-template/node-menu/node-menu.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/jsplumb-learn/node-menu/node-menu.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/views.md: -------------------------------------------------------------------------------- 1 | ## 文件描述 2 | * login 登录界面 3 | -------------------------------------------------------------------------------- /src/api/index.js: -------------------------------------------------------------------------------- 1 | import * as api from './api'; 2 | 3 | export default api; 4 | -------------------------------------------------------------------------------- /test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /present/demo0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/present/demo0.png -------------------------------------------------------------------------------- /present/mock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/present/mock.png -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /src/utils/bus.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | 3 | const bus = new Vue(); 4 | 5 | export default bus; 6 | -------------------------------------------------------------------------------- /test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/common/common.md: -------------------------------------------------------------------------------- 1 | ## 文件描述 2 | * fonts 字体图标库 3 | * img 通用图片 4 | * js 通用JS文件 5 | * stylus 通用样式文件 6 | -------------------------------------------------------------------------------- /src/common/image/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/common/image/default.png -------------------------------------------------------------------------------- /src/common/img/user-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/common/img/user-logo.png -------------------------------------------------------------------------------- /src/views/login/img/bg0_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/login/img/bg0_0.jpg -------------------------------------------------------------------------------- /src/views/login/img/bg0_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/login/img/bg0_1.jpg -------------------------------------------------------------------------------- /src/views/login/img/bg0_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/login/img/bg0_2.jpg -------------------------------------------------------------------------------- /src/views/login/img/bg1_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/login/img/bg1_0.png -------------------------------------------------------------------------------- /src/views/login/img/bg1_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/login/img/bg1_1.png -------------------------------------------------------------------------------- /src/views/login/img/bg1_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/login/img/bg1_2.png -------------------------------------------------------------------------------- /src/views/login/img/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/login/img/check.png -------------------------------------------------------------------------------- /src/common/fonts/icon-demo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/common/fonts/icon-demo.eot -------------------------------------------------------------------------------- /src/common/fonts/icon-demo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/common/fonts/icon-demo.ttf -------------------------------------------------------------------------------- /src/common/fonts/icon-demo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/common/fonts/icon-demo.woff -------------------------------------------------------------------------------- /src/views/header/user-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/header/user-logo.png -------------------------------------------------------------------------------- /src/views/login/img/checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/login/img/checked.png -------------------------------------------------------------------------------- /src/views/jsplumb-learn/img/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/jsplumb-learn/img/edit.png -------------------------------------------------------------------------------- /src/views/login/img/check_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/login/img/check_hover.png -------------------------------------------------------------------------------- /src/views/jsplumb-learn/img/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/jsplumb-learn/img/delete.png -------------------------------------------------------------------------------- /src/views/jsplumb-learn/img/node-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/jsplumb-learn/img/node-close.png -------------------------------------------------------------------------------- /src/views/jsplumb-learn/img/node-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/jsplumb-learn/img/node-img.png -------------------------------------------------------------------------------- /src/views/jsplumb-learn/img/node-timer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/jsplumb-learn/img/node-timer.png -------------------------------------------------------------------------------- /src/common/stylus/index.styl: -------------------------------------------------------------------------------- 1 | @import "./icon"; 2 | @import "./variables"; 3 | @import "./mixin"; 4 | @import "./base"; 5 | @import "./elment"; 6 | -------------------------------------------------------------------------------- /src/views/sys-setting/welcome-page/features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutouping/vue-web-demo/HEAD/src/views/sys-setting/welcome-page/features.png -------------------------------------------------------------------------------- /src/directive/index.js: -------------------------------------------------------------------------------- 1 | import initHighLight from './heigh-light'; 2 | 3 | export default { 4 | install (Vue) { 5 | initHighLight(Vue); 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /src/scss/mixins/clearfix.styl: -------------------------------------------------------------------------------- 1 | @mixin clearfix() { 2 | &::after { 3 | display: block; 4 | content: ""; 5 | clear: both; 6 | } 7 | } -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | static/**/*.js 7 | src/assets/js/*.js 8 | src/assets/bk-magic 9 | 10 | -------------------------------------------------------------------------------- /src/utils/checkDataType.js: -------------------------------------------------------------------------------- 1 | export function checkDataType (data) { 2 | const typeString = Object.prototype.toString.call(data); 3 | 4 | return typeString.slice(8, -1); 5 | } 6 | -------------------------------------------------------------------------------- /config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /.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 = false 10 | -------------------------------------------------------------------------------- /src/scss/button.styl: -------------------------------------------------------------------------------- 1 | .common-green-btn { 2 | color: $whiteDefault; 3 | background: $greenDefault; 4 | &:hover { 5 | color: $whiteDefault; 6 | background: $greenDark; 7 | } 8 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | 9 | # Editor directories and files 10 | .idea 11 | .vscode 12 | *.suo 13 | *.ntvs* 14 | *.njsproj 15 | *.sln 16 | -------------------------------------------------------------------------------- /src/scss/animation/operate.styl: -------------------------------------------------------------------------------- 1 | @keyframes operate-loading { 2 | 0% { 3 | background-color: #abeabb; 4 | } 5 | 50% { 6 | background-color: #57d577; 7 | } 8 | 100% { 9 | background-color: #57d577; 10 | } 11 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |404 page not found
3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/scss/animation/collapse.styl: -------------------------------------------------------------------------------- 1 | .collaspe-enter-active, 2 | .collaspe-leave-active{ 3 | transition: all 0.5s ease-in-out; 4 | } 5 | .collaspe-enter, 6 | .collaspe-leave-to { 7 | transform: transformY(100%); 8 | } 9 | .collaspe-leave, 10 | .collaspe-enter-to { 11 | transform: transformY(-100%); 12 | } -------------------------------------------------------------------------------- /src/views/company-help/company-help.vue: -------------------------------------------------------------------------------- 1 | 2 |company-help 待完善
3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /src/utils/uuid.js: -------------------------------------------------------------------------------- 1 | export function random4 () { 2 | return Math.floor((1 + Math.random()) * 0x10000) 3 | .toString(16) 4 | .substring(1); 5 | } 6 | 7 | export function uuid () { 8 | let id = ''; 9 | 10 | for (let i = 0; i < 7; i++) { 11 | id += random4(); 12 | } 13 | return id; 14 | } 15 | -------------------------------------------------------------------------------- /src/scss/mixins/scrollbar.styl: -------------------------------------------------------------------------------- 1 | @mixin scrollbar { // 页面滚动条 2 | &::-webkit-scrollbar { 3 | width: 4px; 4 | height: 4px; 5 | &-thumb { 6 | border-radius: 20px; 7 | background: #a5a5a5; 8 | box-shadow: inset 0 0 6px hsla(0,0%,80%,.3); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /code-standards/file.md: -------------------------------------------------------------------------------- 1 | ## 文件命名 2 | 3 | * 不能使用中文、数字(需要数字时用英文first、second字符代替) 4 | * 文件名使用全小写 5 | * vue、css、jpg等图片格式多单词文件名使用中划线`'-'`分隔 6 | 例如:follow-up-customer.vue、reset-common-style.css、radio-active.jpg 7 | * js多单词文件名使用`'.'`分隔 8 | 例如:build.systom.js 9 | 10 | ## 文件夹命名 11 | 12 | * 不能使用中文、数字(需要数字时用英文first、second字符代替) 13 | * 文件名使用全小写 14 | * 多单词分隔统一使用中划线命名 15 | -------------------------------------------------------------------------------- /src/common/js/dom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 操作DOM元素 3 | */ 4 | let collection = { 5 | /** 6 | * 判断是否包含某class样式 7 | * @param {元素} el 8 | * @param {样式名} className 9 | */ 10 | hasClass (el, className) { 11 | let reg = new RegExp("(^|\\s)" + className + "(\\s|$)"); 12 | return reg.test(el.className); 13 | } 14 | } 15 | 16 | export default collection; 17 | -------------------------------------------------------------------------------- /src/scss/reset.styl: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | } 4 | 5 | html, 6 | body { 7 | margin: 0; 8 | padding: 0; 9 | } 10 | 11 | ul, 12 | li { 13 | margin: 0; 14 | padding: 0; 15 | list-style: none; 16 | } 17 | 18 | dl, 19 | dt, 20 | dd, 21 | p { 22 | margin: 0; 23 | padding: 0; 24 | } 25 | 26 | a { 27 | text-decoration: none; 28 | } 29 | 30 | button { 31 | outline: none; 32 | } 33 | -------------------------------------------------------------------------------- /mocks/example/data.json: -------------------------------------------------------------------------------- 1 | /** 2 | * mock接口案例1 3 | * @url /example-data 4 | * Here you can write a detailed description 5 | * of the parameters of the information. 6 | */ 7 | 8 | { 9 | "code|1": [0, 0, 0, 0, 1], // simulation error code, 1/5 probability of error code 1. 10 | "data": { 11 | "list|5": [ 12 | {"title": "@title", "info": "@sentence(3, 5)", "link": "@url"} 13 | ] 14 | } 15 | } -------------------------------------------------------------------------------- /mocks/example/links.js: -------------------------------------------------------------------------------- 1 | /** 2 | * mock接口案例2 3 | * @url /example-links 4 | * Here you can write a detailed description 5 | * of the parameters of the information. 6 | */ 7 | 8 | module.exports = { 9 | "code": function () { // simulation error code, 1/10 probability of error code 1. 10 | return Math.random() < 0.1 ? 1 : 0; 11 | }, 12 | "list|5-10": [ 13 | {"title": "@title", "link": "@url"} 14 | ] 15 | }; -------------------------------------------------------------------------------- /src/scss/app.ss: -------------------------------------------------------------------------------- 1 | @import './config.styl'; 2 | @import './reset.styl'; 3 | @import './iconfont.styl'; 4 | @import './button.styl'; 5 | @import './animation/slide.styl'; 6 | @import './mixins/clearfix.styl'; 7 | @import './common.styl'; 8 | 9 | body { 10 | color: #333333; 11 | font-family: 'Microsoft YaHei','PingFang SC','Hiragino Sans GB','SimSun','sans-serif'; 12 | } 13 | 14 | .clearfix { 15 | @include clearfix; 16 | } -------------------------------------------------------------------------------- /test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from 'src/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /src/directive/heigh-light.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 高亮代码段内容 3 | */ 4 | import hljs from 'highlight.js'; 5 | import 'highlight.js/styles/googlecode.css'; // 样式文件 6 | 7 | function initHighLight (Vue) { 8 | Vue.directive('highlight', function (el) { 9 | let blocks = el.querySelectorAll('pre code'); 10 | 11 | blocks.forEach((block) => { 12 | hljs.highlightBlock(block); 13 | }); 14 | }); 15 | } 16 | 17 | export default initHighLight; 18 | -------------------------------------------------------------------------------- /src/utils/dom.js: -------------------------------------------------------------------------------- 1 | const dom = { 2 | nodeContains: function (root, el) { 3 | if (root.compareDocumentPosition) { 4 | return root === el || !!(root.compareDocumentPosition(el) & 16); 5 | } 6 | if (root.contains && el.nodeType === 1) { 7 | return root.contains(el) && root !== el; 8 | } 9 | while ((el = el.parentNode)) { 10 | if (el === root) return true; 11 | } 12 | return false; 13 | } 14 | }; 15 | 16 | export default dom; 17 | -------------------------------------------------------------------------------- /src/views/sys-setting/runners/runners.vue: -------------------------------------------------------------------------------- 1 | 2 |
6 |
39 | 40 | 44 |
45 | {{$t('login.loginBtn')}} 46 | 47 |114 | title 115 |
116 |content
119 |{{$t('welcom.sysTitle')}}
19 |{{$t('welcom.selfSearch')}}
25 |{{$t('welcom.support')}}
26 |{{$t('welcom.selfSearch')}}
32 |{{$t('welcom.support')}}
33 |{{$t('welcom.selfSearch')}}
39 |{{$t('welcom.support')}}
40 |广告图
6 |佣金
18 |