├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitattributes ├── .gitignore ├── .postcssrc.js ├── LICENSE ├── README.md ├── UPDATE.md ├── build ├── build.js ├── check-versions.js ├── setup-dev-server.js ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.build.conf.js ├── webpack.client.conf.js ├── webpack.dev.conf.js ├── webpack.prod.conf.js └── webpack.server.conf.js ├── config ├── development.env.js ├── index.js ├── production.env.js └── test.env.js ├── index.html ├── lib └── avue.js ├── main.js ├── package-lock.json ├── package.json ├── packages ├── crud-cascader │ └── index.js ├── crud-checkbox │ └── index.js ├── crud-date │ └── index.js ├── crud-input-number │ └── index.js ├── crud-input │ └── index.js ├── crud-radio │ └── index.js ├── crud-select │ └── index.js ├── crud-switch │ └── index.js ├── crud-time │ └── index.js ├── crud-ueditor │ └── index.js ├── crud │ ├── README.md │ ├── _index.js │ ├── index.js │ └── src │ │ ├── crud-cascader.vue │ │ ├── crud-checkbox.vue │ │ ├── crud-date.vue │ │ ├── crud-input-number.vue │ │ ├── crud-input.vue │ │ ├── crud-radio.vue │ │ ├── crud-select.vue │ │ ├── crud-switch.vue │ │ ├── crud-time.vue │ │ ├── crud-ueditor.vue │ │ └── main.vue ├── data-card │ ├── index.js │ └── src │ │ └── data-card.vue ├── data-display │ ├── index.js │ └── src │ │ └── data-display.vue ├── data-icons │ ├── index.js │ └── src │ │ └── data-icons.vue ├── data-tabs │ ├── index.js │ └── src │ │ └── data-tabs.vue ├── form │ ├── index.js │ └── src │ │ └── main.vue ├── index.js ├── mixins │ ├── crud-compoents.js │ └── crud.js ├── table-tree │ ├── index.js │ └── src │ │ ├── eval.js │ │ └── main.vue ├── theme-chalk │ └── src │ │ ├── common.scss │ │ ├── crud-quill │ │ ├── quill.bubble.css │ │ ├── quill.core.css │ │ └── quill.snow.css │ │ ├── data-card.scss │ │ ├── data-display.scss │ │ ├── data-icons.scss │ │ ├── data-tabs.scss │ │ └── element-ui.scss └── utils │ ├── util.js │ └── validate.js ├── server.js ├── src ├── App.vue ├── api │ ├── admin.js │ └── user.js ├── assets │ ├── css │ │ ├── GooFlow2.css │ │ ├── audio.css │ │ ├── bootstrap.png │ │ ├── bootstrap1.png │ │ ├── bootstrapStyle.css │ │ ├── common.css │ │ ├── decorator │ │ │ ├── common-65a7269c002e0125c893042d8c4b7fb9.png │ │ │ ├── common-d299f5a3da3ca22670ae5217440f4475-ie6.png │ │ │ ├── operations.png │ │ │ └── trans-1988001b82b1db43eb0708df3c9f2914.png │ │ ├── editechart.scss │ │ ├── font-awesome.css │ │ ├── font-awesome.min.css │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ ├── layer.css │ │ ├── line_conn.png │ │ ├── overview.css │ │ ├── pageTrans.css │ │ ├── skin333 │ │ │ ├── jedate.css │ │ │ ├── jedate.png │ │ │ ├── jedatefont.eot │ │ │ ├── jedatefont.svg │ │ │ ├── jedatefont.ttf │ │ │ └── jedatefont.woff │ │ ├── style-cloud.css │ │ └── ztree │ │ │ ├── demo.css │ │ │ ├── demo_fontclass.html │ │ │ ├── demo_symbol.html │ │ │ ├── demo_unicode.html │ │ │ ├── iconfont.css │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.js │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ ├── font │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── Simple-Line-Icons.dev.svg │ │ ├── Simple-Line-Icons.eot │ │ ├── Simple-Line-Icons.svg │ │ ├── Simple-Line-Icons.ttf │ │ ├── Simple-Line-Icons.woff │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ ├── iconfont.zip │ │ └── iconfont │ │ │ ├── demo.css │ │ │ ├── demo.html │ │ │ ├── iconfont.css │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ ├── icons │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ ├── images │ │ ├── bg │ │ │ ├── bg2.jpg │ │ │ └── bg3.jpg │ │ ├── body_bg.jpg │ │ ├── charts │ │ │ ├── Ldt1.png │ │ │ ├── Ldt2.png │ │ │ ├── Ldt3.png │ │ │ ├── b1.png │ │ │ ├── b2.png │ │ │ ├── b3.png │ │ │ ├── b4.png │ │ │ ├── b5.png │ │ │ ├── b6.png │ │ │ ├── b7.png │ │ │ ├── dt1.png │ │ │ ├── dt2.png │ │ │ ├── dt3.png │ │ │ ├── dt4.png │ │ │ ├── fm1.png │ │ │ ├── fm2.png │ │ │ ├── fm3.png │ │ │ ├── fm4.png │ │ │ ├── fm5.png │ │ │ ├── fm6.png │ │ │ ├── fm7.png │ │ │ ├── fm8.png │ │ │ ├── fm9.png │ │ │ ├── gx1.png │ │ │ ├── gx10.png │ │ │ ├── gx11.png │ │ │ ├── gx2.png │ │ │ ├── gx3.png │ │ │ ├── gx4.png │ │ │ ├── gx5.png │ │ │ ├── gx6.png │ │ │ ├── gx7.png │ │ │ ├── gx8.png │ │ │ ├── gx9.png │ │ │ ├── ld1.png │ │ │ ├── ld2.png │ │ │ ├── ld3.png │ │ │ ├── ld4.png │ │ │ ├── mj1.png │ │ │ ├── mj2.png │ │ │ ├── mj3.png │ │ │ ├── mj4.png │ │ │ ├── mj5.png │ │ │ ├── rl1.png │ │ │ ├── rl2.png │ │ │ ├── rl3.png │ │ │ ├── rl4.png │ │ │ ├── rl5.png │ │ │ ├── rl6.png │ │ │ ├── rl7.png │ │ │ ├── x1.png │ │ │ ├── x2.png │ │ │ ├── x3.png │ │ │ ├── x4.png │ │ │ ├── x5.png │ │ │ ├── xx1.png │ │ │ ├── xx2.png │ │ │ ├── xx3.png │ │ │ ├── xx4.png │ │ │ ├── xx5.png │ │ │ ├── yb1.png │ │ │ ├── yb2.png │ │ │ ├── yb3.png │ │ │ ├── yb4.png │ │ │ ├── z1.png │ │ │ ├── z10.png │ │ │ ├── z11.png │ │ │ ├── z12.png │ │ │ ├── z13.png │ │ │ ├── z2.png │ │ │ ├── z3.png │ │ │ ├── z4.png │ │ │ ├── z5.png │ │ │ ├── z6.png │ │ │ ├── z7.png │ │ │ ├── z8.png │ │ │ ├── z9.png │ │ │ ├── zx1.png │ │ │ └── zx2.png │ │ ├── datas │ │ │ ├── csv.png │ │ │ ├── excel.png │ │ │ └── mysql.png │ │ ├── empty-top.png │ │ ├── error-page │ │ │ ├── error-401.svg │ │ │ ├── error-404.svg │ │ │ └── error-500.svg │ │ ├── login-bg.jpg │ │ ├── logo-min.jpg │ │ ├── logo.jpg │ │ ├── qq-fance.jpg │ │ ├── qq-fance2.jpg │ │ ├── resize.png │ │ ├── resize2.png │ │ ├── talkingdata.png │ │ ├── theme │ │ │ ├── theme1.png │ │ │ └── theme2.png │ │ └── user.png │ ├── img │ │ ├── GooFlow_line_oper.png │ │ ├── bg-blue-wrap-data-grid.png │ │ ├── bullet_blue.png │ │ ├── code │ │ │ ├── qq-code.jpg │ │ │ └── wechat-code.jpg │ │ ├── gooflow_bg.png │ │ ├── gooflow_blank.gif │ │ ├── gooflow_blank2.gif │ │ ├── gooflow_blank2.htm │ │ ├── gooflow_btn_bg.png │ │ ├── gooflow_bullet.png │ │ ├── gooflow_icon.png │ │ ├── gooflow_icon2.png │ │ ├── gooflow_tip.png │ │ ├── hover-add-light.png │ │ ├── login.png │ │ ├── svg-sprite_2447687.svg │ │ └── view.png │ ├── js │ │ └── drag.js │ ├── json │ │ ├── bubble.json │ │ └── heatmap-1.json │ └── theme │ │ ├── index.js │ │ ├── theme.js │ │ └── theme2.js ├── components │ ├── basic-container │ │ └── main.vue │ ├── error-page │ │ ├── 403.vue │ │ ├── 404.vue │ │ └── 500.vue │ └── iframe │ │ └── main.vue ├── config │ └── env.js ├── const │ ├── dic.js │ ├── router │ │ ├── routerData.js │ │ └── routerOption.js │ └── website.js ├── docker │ └── Dockerfile ├── entry-client.js ├── entry-server.js ├── errorLog.js ├── filters │ └── index.js ├── main.js ├── mixins │ └── color.js ├── mock │ ├── admin.js │ ├── menu.js │ └── user.js ├── page │ ├── errlog │ │ ├── errorPage.vue │ │ ├── errorTestA.vue │ │ └── index.vue │ ├── index │ │ ├── index.vue │ │ ├── sidebar │ │ │ ├── index.vue │ │ │ ├── logo.vue │ │ │ └── sidebarItem.vue │ │ ├── tags.vue │ │ └── top │ │ │ ├── index.vue │ │ │ ├── top-breadcrumb.vue │ │ │ ├── top-color.vue │ │ │ ├── top-lock.vue │ │ │ ├── top-menu.vue │ │ │ └── top-theme.vue │ ├── lock │ │ └── index.vue │ ├── login │ │ ├── codelogin.vue │ │ ├── index.vue │ │ ├── thirdlogin.vue │ │ └── userlogin.vue │ └── wel.vue ├── panel │ ├── html2canvas.min.js │ ├── jquery.min.js │ └── sockjs-0.3.min.js ├── permission.js ├── router │ ├── _import.js │ ├── axios.js │ ├── page │ │ └── index.js │ ├── router.js │ └── views │ │ └── index.js ├── store │ ├── getters.js │ ├── index.js │ └── modules │ │ ├── admin.js │ │ ├── common.js │ │ ├── errLog.js │ │ ├── tags.js │ │ └── user.js ├── styles │ ├── animate │ │ └── vue-transition.scss │ ├── common.scss │ ├── echarts │ │ └── echart_style.scss │ ├── element-ui.scss │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── Simple-Line-Icons.dev.svg │ │ ├── Simple-Line-Icons.eot │ │ ├── Simple-Line-Icons.svg │ │ ├── Simple-Line-Icons.ttf │ │ ├── Simple-Line-Icons.woff │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ ├── iconfont.zip │ │ └── iconfont │ │ │ ├── demo.css │ │ │ ├── demo.html │ │ │ ├── iconfont.css │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ ├── icon_fonts │ │ └── font-awesome.css │ ├── mixin.scss │ ├── sidebar.scss │ ├── tags.scss │ ├── theme │ │ └── star.scss │ ├── top.scss │ └── variables.scss ├── util │ ├── auth.js │ ├── date.js │ ├── store.js │ ├── util.js │ ├── validate.js │ └── yun.js ├── vendor │ ├── Blob.js │ └── Export2Excel.js └── views │ └── echarts │ └── index.vue ├── static ├── cdn │ ├── animate │ │ └── 3.5.2 │ │ │ └── animate.css │ ├── axios │ │ └── 1.0.0 │ │ │ └── axios.min.js │ ├── echarts │ │ └── echarts.min.js │ ├── element-ui │ │ └── 2.4.0 │ │ │ ├── index.js │ │ │ └── theme-chalk │ │ │ ├── fonts │ │ │ ├── element-icons.ttf │ │ │ └── element-icons.woff │ │ │ └── index.css │ ├── iconfont │ │ └── 1.0.0 │ │ │ └── index.css │ ├── store │ │ └── 1.3.20 │ │ │ └── store.js │ ├── vue-router │ │ └── 3.0.1 │ │ │ └── vue-router.js │ ├── vue │ │ └── 2.5.2 │ │ │ └── vue.min.js │ └── vuex │ │ └── 2.4.1 │ │ └── vuex.min.js ├── img │ ├── bg │ │ └── star-squashed.jpeg │ ├── code │ │ ├── qq-code.jpg │ │ └── wechat-code.jpg │ ├── login.png │ └── mock │ │ └── card │ │ ├── card-1.jpg │ │ ├── card-2.jpg │ │ ├── card-3.jpg │ │ └── card-4.jpg └── util │ ├── aes.js │ └── screen │ ├── guge.png │ ├── huohu.png │ ├── screen.css │ └── screen.js ├── test └── unit │ ├── karma.conf.js │ └── specs │ └── Hello.spec.js └── tools ├── app.js ├── temp ├── api.js ├── index.vue └── option.js └── util └── validate.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "env", 5 | { 6 | "modules": false, 7 | "targets": { 8 | "browsers": [ 9 | "> 1%", 10 | "last 2 versions", 11 | "not ie <= 8" 12 | ] 13 | } 14 | } 15 | ], 16 | "stage-2" 17 | ], 18 | "plugins": [ 19 | "transform-runtime", 20 | "transform-vue-jsx" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | ** -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // http://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parser: 'babel-eslint', 6 | parserOptions: { 7 | sourceType: 'module' 8 | }, 9 | env: { 10 | browser: true, 11 | }, 12 | extends: 'airbnb-base', 13 | // required to lint *.vue files 14 | plugins: [ 15 | 'html' 16 | ], 17 | // check if imports actually resolve 18 | 'settings': { 19 | 'import/resolver': { 20 | 'webpack': { 21 | 'config': 'build/webpack.base.conf.js' 22 | } 23 | } 24 | }, 25 | // add your custom rules here 26 | 'rules': { 27 | // don't require .vue extension when importing 28 | 'import/extensions': ['error', 'always', { 29 | 'js': 'never', 30 | 'vue': 'never' 31 | }], 32 | // allow optionalDependencies 33 | 'import/no-extraneous-dependencies': ['error', { 34 | 'optionalDependencies': ['test/unit/index.js'] 35 | }], 36 | // allow debugger during development 37 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 38 | } 39 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=Vue 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode 3 | node_modules/ 4 | dist/ 5 | npm-debug.log* 6 | yarn-debug.log* 7 | yarn-error.log* 8 | .project 9 | # Editor directories and files 10 | .idea 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | // to edit target browsers: use "browserslist" field in package.json 6 | "autoprefixer": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Smallwei小伟 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 简介 2 | ## vue_cli_default是一个vue空项目模板 , 集成了 3 | - vue全家桶(Vue+Vue-router+Vuex+axios+webpack) 4 | - jq插件 5 | - Font Awesome字体库(http://fontawesome.dashgame.com/) 6 | - V-charts图表库(https://v-charts.js.org/#/) 7 | - element框架 8 | - scss解析器 9 | - less解析器 10 | - 路由 11 | - 缓存处理 12 | - 锚点跳转 13 | - 编译环境和线上环境之间的切换 14 | 15 | ## 基本功能: 16 | - 主题颜色配置 17 | - 主页面框架布局 18 | - 登录界面 19 | - 登录验证 20 | - 短信验证 21 | - 锁屏处理 22 | - 退出系统 23 | - 用户中心 24 | - 导航标签 25 | - 主题颜色切换 26 | - 主题模板切换 27 | 28 | ## 方便vue前端开发者直接使用该项目启动开发。 29 | ### 安装项目 30 | npm install 31 | ### 启动项目 32 | npm run serve 33 | ### 项目打包 34 | npm run build 35 | -------------------------------------------------------------------------------- /UPDATE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/UPDATE.md -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | const ora = require('ora') 5 | const rm = require('rimraf') 6 | const path = require('path') 7 | const chalk = require('chalk') 8 | const webpack = require('webpack') 9 | const config = require('../config') 10 | const webpackConfig = require('./webpack.prod.conf') 11 | console.log('NODE_ENV:' + process.env.NODE_ENV); 12 | const spinner = ora('building for production...') 13 | spinner.start() 14 | 15 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 16 | if (err) throw err 17 | webpack(webpackConfig, (err, stats) => { 18 | spinner.stop() 19 | if (err) throw err 20 | process.stdout.write(stats.toString({ 21 | colors: true, 22 | modules: false, 23 | children: false, // if you are using ts-loader, setting this to true will make typescript errors show up during build 24 | chunks: false, 25 | chunkModules: false 26 | }) + '\n\n') 27 | 28 | if (stats.hasErrors()) { 29 | console.log(chalk.red(' Build failed with errors.\n')) 30 | process.exit(1) 31 | } 32 | 33 | console.log(chalk.cyan(' Build complete.\n')) 34 | console.log(chalk.yellow( 35 | ' Tip: built files are meant to be served over an HTTP server.\n' + 36 | ' Opening index.html over file:// won\'t work.\n' 37 | )) 38 | }) 39 | }) -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec(cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } -------------------------------------------------------------------------------- /build/setup-dev-server.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | const MFS = require('memory-fs') 4 | const webpack = require('webpack') 5 | const chokidar = require('chokidar') 6 | const clientConfig = require('./webpack.client.conf') 7 | const serverConfig = require('./webpack.server.conf') 8 | 9 | const readFile = (fs, file) => { 10 | try { 11 | return fs.readFileSync(path.join(clientConfig.output.path, file), 'utf-8') 12 | } catch (e) {} 13 | } 14 | 15 | module.exports = function setupDevServer (app, templatePath, cb) { 16 | let bundle 17 | let template 18 | let clientManifest 19 | 20 | let ready 21 | const readyPromise = new Promise(r => { ready = r }) 22 | const update = () => { 23 | if (bundle && clientManifest) { 24 | ready() 25 | cb(bundle, { 26 | template, 27 | clientManifest 28 | }) 29 | } 30 | } 31 | 32 | // read template from disk and watch 33 | template = fs.readFileSync(templatePath, 'utf-8') 34 | chokidar.watch(templatePath).on('change', () => { 35 | template = fs.readFileSync(templatePath, 'utf-8') 36 | console.log('index.html template updated.') 37 | update() 38 | }) 39 | 40 | // modify client config to work with hot middleware 41 | clientConfig.entry.app = ['webpack-hot-middleware/client', clientConfig.entry.app] 42 | clientConfig.output.filename = '[name].js' 43 | clientConfig.plugins.push( 44 | new webpack.HotModuleReplacementPlugin(), 45 | new webpack.NoEmitOnErrorsPlugin() 46 | ) 47 | 48 | // dev middleware 49 | const clientCompiler = webpack(clientConfig) 50 | const devMiddleware = require('webpack-dev-middleware')(clientCompiler, { 51 | publicPath: clientConfig.output.publicPath, 52 | noInfo: true 53 | }) 54 | app.use(devMiddleware) 55 | clientCompiler.plugin('done', stats => { 56 | stats = stats.toJson() 57 | stats.errors.forEach(err => console.error(err)) 58 | stats.warnings.forEach(err => console.warn(err)) 59 | if (stats.errors.length) return 60 | clientManifest = JSON.parse(readFile( 61 | devMiddleware.fileSystem, 62 | 'vue-ssr-client-manifest.json' 63 | )) 64 | update() 65 | }) 66 | 67 | // hot middleware 68 | app.use(require('webpack-hot-middleware')(clientCompiler, { heartbeat: 5000 })) 69 | 70 | // watch and update server renderer 71 | const serverCompiler = webpack(serverConfig) 72 | const mfs = new MFS() 73 | serverCompiler.outputFileSystem = mfs 74 | serverCompiler.watch({}, (err, stats) => { 75 | if (err) throw err 76 | stats = stats.toJson() 77 | if (stats.errors.length) return 78 | 79 | // read bundle generated by vue-ssr-webpack-plugin 80 | bundle = JSON.parse(readFile(mfs, 'vue-ssr-server-bundle.json')) 81 | update() 82 | }) 83 | 84 | return readyPromise 85 | } 86 | -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' ? 9 | config.build.assetsSubDirectory : 10 | config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const postcssLoader = { 26 | loader: 'postcss-loader', 27 | options: { 28 | sourceMap: options.sourceMap 29 | } 30 | } 31 | 32 | // generate loader string to be used with extract text plugin 33 | function generateLoaders(loader, loaderOptions) { 34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 35 | 36 | if (loader) { 37 | loaders.push({ 38 | loader: loader + '-loader', 39 | options: Object.assign({}, loaderOptions, { 40 | sourceMap: options.sourceMap 41 | }) 42 | }) 43 | } 44 | 45 | // Extract CSS when that option is specified 46 | // (which is the case during production build) 47 | if (options.extract) { 48 | return ExtractTextPlugin.extract({ 49 | use: loaders, 50 | fallback: 'vue-style-loader' 51 | }) 52 | } else { 53 | return ['vue-style-loader'].concat(loaders) 54 | } 55 | } 56 | 57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 58 | return { 59 | css: generateLoaders(), 60 | postcss: generateLoaders(), 61 | less: generateLoaders('less'), 62 | sass: generateLoaders('sass', { 63 | indentedSyntax: true 64 | }), 65 | scss: generateLoaders('sass'), 66 | stylus: generateLoaders('stylus'), 67 | styl: generateLoaders('stylus') 68 | } 69 | } 70 | 71 | // Generate loaders for standalone style files (outside of .vue) 72 | exports.styleLoaders = function (options) { 73 | const output = [] 74 | const loaders = exports.cssLoaders(options) 75 | 76 | for (const extension in loaders) { 77 | const loader = loaders[extension] 78 | output.push({ 79 | test: new RegExp('\\.' + extension + '$'), 80 | use: loader 81 | }) 82 | } 83 | 84 | return output 85 | } 86 | 87 | exports.createNotifierCallback = () => { 88 | const notifier = require('node-notifier') 89 | 90 | return (severity, errors) => { 91 | if (severity !== 'error') return 92 | 93 | const error = errors[0] 94 | const filename = error.file && error.file.split('!').pop() 95 | 96 | notifier.notify({ 97 | title: packageConfig.name, 98 | message: severity + ': ' + error.name, 99 | subtitle: filename || '', 100 | icon: path.join(__dirname, 'logo.png') 101 | }) 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const webpack = require('webpack') 4 | const utils = require('./utils') 5 | const config = require('../config') 6 | const vueLoaderConfig = require('./vue-loader.conf') 7 | const env = require('../config/' + process.env.NODE_ENV + '.env.js') 8 | 9 | function resolve(dir) { 10 | return path.join(__dirname, '..', dir) 11 | } 12 | 13 | const createLintingRule = () => ({ 14 | test: /\.(js|vue)$/, 15 | loader: 'eslint-loader', 16 | enforce: 'pre', 17 | include: [resolve('src'), resolve('test')], 18 | options: { 19 | formatter: require('eslint-friendly-formatter'), 20 | emitWarning: !config.dev.showEslintErrorsInOverlay 21 | } 22 | }) 23 | 24 | module.exports = { 25 | context: path.resolve(__dirname, '../'), 26 | entry: { 27 | app: './src/entry-client.js' 28 | }, 29 | devtool: '#cheap-module-eval-source-map', 30 | output: { 31 | path: config.build.assetsRoot, 32 | filename: '[name].js', 33 | publicPath: process.env.NODE_ENV === 'production' ? 34 | config.build.assetsPublicPath : config.dev.assetsPublicPath 35 | }, 36 | externals: { 37 | 'vue': 'Vue', 38 | 'vue-router': 'VueRouter', 39 | 'vuex': 'Vuex', 40 | 'axios': 'axios', 41 | 'element-ui': 'ELEMENT', 42 | }, 43 | resolve: { 44 | extensions: ['.js', '.vue', '.json'], 45 | alias: { 46 | 'vue$': 'vue/dist/vue.esm.js', 47 | '@': resolve('src') 48 | } 49 | }, 50 | module: { 51 | rules: [ 52 | 53 | ...(config.dev.useEslint ? [createLintingRule()] : []), 54 | 55 | { 56 | test: /\.vue$/, 57 | loader: 'vue-loader', 58 | options: vueLoaderConfig 59 | }, 60 | { 61 | test: /\.js$/, 62 | loader: 'babel-loader', 63 | include: [ 64 | resolve('src'), 65 | resolve('test'), 66 | resolve('packages'), 67 | resolve('node_modules/webpack-dev-server/client') 68 | ] 69 | }, 70 | { 71 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 72 | loader: 'url-loader', 73 | options: { 74 | limit: 10000, 75 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 76 | } 77 | }, 78 | { 79 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 80 | loader: 'url-loader', 81 | options: { 82 | limit: 10000, 83 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 84 | } 85 | }, 86 | { 87 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 88 | loader: 'url-loader', 89 | options: { 90 | limit: 10000, 91 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 92 | } 93 | } 94 | ] 95 | }, 96 | plugins: [ 97 | new webpack.DefinePlugin({ 98 | 'process.env': JSON.stringify(env) 99 | }), 100 | ], 101 | node: { 102 | // prevent webpack from injecting useless setImmediate polyfill because Vue 103 | // source contains it (although only uses it if it's native). 104 | setImmediate: false, 105 | // prevent webpack from injecting mocks to Node native modules 106 | // that does not make sense for the client 107 | dgram: 'empty', 108 | fs: 'empty', 109 | net: 'empty', 110 | tls: 'empty', 111 | child_process: 'empty' 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /build/webpack.build.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const ExtractTextPlugin = require("extract-text-webpack-plugin"); 3 | const CleanWebpackPlugin = require("clean-webpack-plugin"); 4 | const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); 5 | const baseWebpackConfig = require('./webpack.base.conf') 6 | module.exports = { 7 | //入口文件的配置项 8 | entry: { 9 | entry: './packages/index.js' 10 | }, 11 | //出口文件的配置项 12 | output: { 13 | //输出的路径,用了Node语法 14 | path: path.resolve(__dirname, '../lib'), 15 | //输出的文件名称 16 | filename: 'avue.js' 17 | }, 18 | resolve: { 19 | extensions: ['.js', '.vue', '.json'], 20 | alias: { 21 | 'avue': path.resolve('packages'), 22 | } 23 | }, 24 | //模块:例如解读CSS,图片如何转换,压缩 25 | module: { 26 | rules: [{ 27 | test: /\.vue$/, 28 | loader: 'vue-loader', 29 | exclude: /node_modules/ 30 | }, { 31 | test: /\.js$/, //是一个正则,代表js或者jsx后缀的文件要使用 下面的loader 32 | loader: 'babel-loader', 33 | exclude: /node_modules/ 34 | }, 35 | { 36 | test: /\.(css|scss)$/, 37 | loader: "style-loader!css-loader!sass-loader", 38 | exclude: /node_modules/ 39 | } 40 | ] 41 | }, 42 | //插件,用于生产模版和各项功能 43 | plugins: [ 44 | new CleanWebpackPlugin([path.resolve(__dirname, '../lib')]), 45 | new ExtractTextPlugin(path.resolve('../lib/avue.css')), 46 | new UglifyJSPlugin({ 47 | uglifyOptions: { 48 | compress: { 49 | warnings: false 50 | } 51 | }, 52 | sourceMap: false, 53 | parallel: true 54 | }) 55 | ], 56 | devServer: {} 57 | } 58 | -------------------------------------------------------------------------------- /build/webpack.client.conf.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack') 2 | const merge = require('webpack-merge') 3 | const base = require('./webpack.prod.conf') 4 | const SWPrecachePlugin = require('sw-precache-webpack-plugin') 5 | const VueSSRClientPlugin = require('vue-server-renderer/client-plugin') 6 | 7 | const config = merge(base, { 8 | entry: { 9 | app: './src/entry-client.js' 10 | }, 11 | plugins: [ 12 | // strip dev-only code in Vue source 13 | new webpack.DefinePlugin({ 14 | 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'), 15 | 'process.env.VUE_ENV': '"client"' 16 | }), 17 | new VueSSRClientPlugin() 18 | ] 19 | }) 20 | 21 | 22 | module.exports = config 23 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const path = require('path') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 11 | const portfinder = require('portfinder') 12 | 13 | const HOST = process.env.HOST 14 | const PORT = process.env.PORT && Number(process.env.PORT) 15 | console.log('NODE_ENV:' + process.env.NODE_ENV); 16 | const devWebpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.dev.cssSourceMap, 20 | usePostCSS: true 21 | }) 22 | }, 23 | // cheap-module-eval-source-map is faster for development 24 | devtool: config.dev.devtool, 25 | 26 | // these devServer options should be customized in /config/index.js 27 | devServer: { 28 | clientLogLevel: 'warning', 29 | historyApiFallback: { 30 | rewrites: [{ 31 | from: /.*/, 32 | to: path.posix.join(config.dev.assetsPublicPath, 'index.html') 33 | }, ], 34 | }, 35 | hot: true, 36 | contentBase: false, // since we use CopyWebpackPlugin. 37 | compress: true, 38 | host: HOST || '127.0.0.1', 39 | port: PORT || config.dev.port, 40 | open: config.dev.autoOpenBrowser, 41 | overlay: config.dev.errorOverlay ? { 42 | warnings: false, 43 | errors: true 44 | } : false, 45 | publicPath: config.dev.assetsPublicPath, 46 | proxy: config.dev.proxyTable, 47 | quiet: true, // necessary for FriendlyErrorsPlugin 48 | watchOptions: { 49 | poll: config.dev.poll, 50 | } 51 | }, 52 | plugins: [ 53 | new webpack.HotModuleReplacementPlugin(), 54 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 55 | new webpack.NoEmitOnErrorsPlugin(), 56 | // https://github.com/ampedandwired/html-webpack-plugin 57 | new HtmlWebpackPlugin({ 58 | filename: 'index.html', 59 | template: 'index.html', 60 | inject: true, 61 | title: 'avue', 62 | path: config.dev.assetsPublicPath + config.dev.assetsSubDirectory 63 | }), 64 | // copy custom static assets 65 | new CopyWebpackPlugin([{ 66 | from: path.resolve(__dirname, '../static'), 67 | to: config.dev.assetsSubDirectory, 68 | ignore: ['.*'] 69 | }]) 70 | ] 71 | }) 72 | 73 | module.exports = new Promise((resolve, reject) => { 74 | portfinder.basePort = process.env.PORT || config.dev.port 75 | portfinder.getPort((err, port) => { 76 | if (err) { 77 | reject(err) 78 | } else { 79 | // publish the new Port, necessary for e2e tests 80 | process.env.PORT = port 81 | // add port to devServer config 82 | devWebpackConfig.devServer.port = port 83 | 84 | // Add FriendlyErrorsPlugin 85 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 86 | compilationSuccessInfo: { 87 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 88 | }, 89 | onErrors: config.dev.notifyOnErrors ? 90 | utils.createNotifierCallback() : undefined 91 | })) 92 | 93 | resolve(devWebpackConfig) 94 | } 95 | }) 96 | }) 97 | -------------------------------------------------------------------------------- /build/webpack.server.conf.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack') 2 | const merge = require('webpack-merge') 3 | var config = require('../config') 4 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const base = require('./webpack.base.conf') 6 | const nodeExternals = require('webpack-node-externals') 7 | const VueSSRServerPlugin = require('vue-server-renderer/server-plugin') 8 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 9 | const utils = require('./utils') 10 | module.exports = merge(base, { 11 | module: { 12 | rules: utils.styleLoaders({ 13 | sourceMap: config.build.productionSourceMap, 14 | extract: true 15 | }) 16 | }, 17 | target: 'node', 18 | devtool: '#source-map', 19 | entry: './src/entry-server.js', 20 | output: { 21 | filename: 'server-bundle.js', 22 | libraryTarget: 'commonjs2' 23 | }, 24 | // https://webpack.js.org/configuration/externals/#externals 25 | // https://github.com/liady/webpack-node-externals 26 | externals: nodeExternals({ 27 | // do not externalize CSS files in case we need to import it from a dep 28 | whitelist: /\.css$/ 29 | }), 30 | plugins: [ 31 | new ExtractTextPlugin({ 32 | filename: utils.assetsPath('css/[name].[contenthash].css') 33 | }), 34 | // Compress extracted CSS. We are using this plugin so that possible 35 | // duplicated CSS from different components can be deduped. 36 | new OptimizeCSSPlugin({ 37 | cssProcessorOptions: { 38 | safe: true 39 | } 40 | }), 41 | new webpack.DefinePlugin({ 42 | 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'), 43 | 'process.env.VUE_ENV': '"server"' 44 | }), 45 | new VueSSRServerPlugin() 46 | ] 47 | }) 48 | -------------------------------------------------------------------------------- /config/development.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: 'development' 3 | } -------------------------------------------------------------------------------- /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 | index: path.resolve(__dirname, '../dist/index.html'), 7 | assetsRoot: path.resolve(__dirname, '../dist'), 8 | assetsSubDirectory: 'static', 9 | assetsPublicPath: './', 10 | productionSourceMap: false, 11 | // Gzip off by default as many popular static hosts such as 12 | // Surge or Netlify already gzip all static assets for you. 13 | // Before setting to `true`, make sure to: 14 | // npm install --save-dev compression-webpack-plugin 15 | productionGzip: false, 16 | productionGzipExtensions: ['js', 'css'], 17 | // Run the build command with an extra argument to 18 | // View the bundle analyzer report after build finishes: 19 | // `npm run build --report` 20 | // Set to `true` or `false` to always turn it on or off 21 | bundleAnalyzerReport: process.env.npm_config_report 22 | }, 23 | dev: { 24 | port: 8000, 25 | autoOpenBrowser: true, 26 | assetsSubDirectory: 'static', 27 | host: '0.0.0.0', 28 | assetsPublicPath: '/', 29 | proxyTable: {}, 30 | // CSS Sourcemaps off by default because relative paths are "buggy" 31 | // with this option, according to the CSS-Loader README 32 | // (https://github.com/webpack/css-loader#sourcemaps) 33 | // In our experience, they generally work as expected, 34 | // just be aware of this issue when enabling this option. 35 | cssSourceMap: false 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /config/production.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /config/test.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: 'test' 3 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 快速开发框架 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /packages/crud-cascader/index.js: -------------------------------------------------------------------------------- 1 | 2 | import CrudCascader from '../crud/src/crud-cascader'; 3 | 4 | /* istanbul ignore next */ 5 | CrudCascader.install = function (Vue) { 6 | Vue.component(CrudCascader.name, CrudCascader); 7 | }; 8 | 9 | export default CrudCascader; -------------------------------------------------------------------------------- /packages/crud-checkbox/index.js: -------------------------------------------------------------------------------- 1 | 2 | import CrudCheckBox from '../crud/src/crud-checkbox'; 3 | 4 | /* istanbul ignore next */ 5 | CrudCheckBox.install = function (Vue) { 6 | Vue.component(CrudCheckBox.name, CrudCheckBox); 7 | }; 8 | 9 | export default CrudCheckBox; -------------------------------------------------------------------------------- /packages/crud-date/index.js: -------------------------------------------------------------------------------- 1 | 2 | import CrudData from '../crud/src/crud-date'; 3 | 4 | /* istanbul ignore next */ 5 | CrudData.install = function (Vue) { 6 | Vue.component(CrudData.name, CrudData); 7 | }; 8 | 9 | export default CrudData; -------------------------------------------------------------------------------- /packages/crud-input-number/index.js: -------------------------------------------------------------------------------- 1 | 2 | import CrudInputNumber from '../crud/src/crud-input-number'; 3 | 4 | /* istanbul ignore next */ 5 | CrudInputNumber.install = function (Vue) { 6 | Vue.component(CrudInputNumber.name, CrudInputNumber); 7 | }; 8 | 9 | export default CrudInputNumber; -------------------------------------------------------------------------------- /packages/crud-input/index.js: -------------------------------------------------------------------------------- 1 | 2 | import CrudInput from '../crud/src/crud-input'; 3 | 4 | /* istanbul ignore next */ 5 | CrudInput.install = function (Vue) { 6 | Vue.component(CrudInput.name, CrudInput); 7 | }; 8 | 9 | export default CrudInput; -------------------------------------------------------------------------------- /packages/crud-radio/index.js: -------------------------------------------------------------------------------- 1 | import CrudRadio from '../crud/src/crud-radio'; 2 | 3 | /* istanbul ignore next */ 4 | CrudRadio.install = function (Vue) { 5 | Vue.component(CrudRadio.name, CrudRadio); 6 | }; 7 | 8 | export default CrudRadio; -------------------------------------------------------------------------------- /packages/crud-select/index.js: -------------------------------------------------------------------------------- 1 | 2 | import CrudSelect from '../crud/src/crud-select'; 3 | 4 | /* istanbul ignore next */ 5 | CrudSelect.install = function (Vue) { 6 | Vue.component(CrudSelect.name, CrudSelect); 7 | }; 8 | 9 | export default CrudSelect; -------------------------------------------------------------------------------- /packages/crud-switch/index.js: -------------------------------------------------------------------------------- 1 | import CrudSwitch from '../crud/src/crud-switch'; 2 | 3 | /* istanbul ignore next */ 4 | CrudSwitch.install = function(Vue) { 5 | Vue.component(CrudSwitch.name, CrudSwitch); 6 | }; 7 | 8 | export default CrudSwitch; -------------------------------------------------------------------------------- /packages/crud-time/index.js: -------------------------------------------------------------------------------- 1 | import CrudTime from '../crud/src/crud-time'; 2 | 3 | /* istanbul ignore next */ 4 | CrudTime.install = function (Vue) { 5 | Vue.component(CrudTime.name, CrudTime); 6 | }; 7 | 8 | export default CrudTime; 9 | -------------------------------------------------------------------------------- /packages/crud-ueditor/index.js: -------------------------------------------------------------------------------- 1 | import CrudUeditor from '../crud/src/crud-ueditor.vue'; 2 | 3 | /* istanbul ignore next */ 4 | CrudUeditor.install = function (Vue) { 5 | Vue.component(CrudUeditor.name, CrudUeditor); 6 | }; 7 | 8 | export default CrudUeditor; 9 | -------------------------------------------------------------------------------- /packages/crud/_index.js: -------------------------------------------------------------------------------- 1 | import AvueCurdCheckbox from './src/crud-checkbox'; 2 | import AvueCurdDate from './src/crud-date'; 3 | import AvueCurdTime from './src/crud-time'; 4 | import AvueCurdInput from './src/crud-input'; 5 | import AvueCurdRadio from './src/crud-radio'; 6 | import AvueCurdSelect from './src/crud-secect'; 7 | import AvueCurdCascader from './src/crud-cascader'; 8 | import AvueCurdInputNumber from './src/crud-input-number'; 9 | import AvueCurdUeditor from './src/crud-ueditor'; 10 | import AvueCurdSwitch from './src/crud-switch'; 11 | import AvueCrud from './src/main'; 12 | const components = [ 13 | AvueCrud, 14 | AvueCurdCheckbox, 15 | AvueCurdDate, 16 | AvueCurdTime, 17 | AvueCurdInput, 18 | AvueCurdRadio, 19 | AvueCurdSelect, 20 | AvueCurdCascader, 21 | AvueCurdInputNumber, 22 | AvueCurdUeditor, 23 | AvueCurdSwitch 24 | ] 25 | 26 | /* istanbul ignore next */ 27 | export default function(Vue) { 28 | components.map(component => { 29 | Vue.component(component.name, component); 30 | }); 31 | }; 32 | 33 | export { 34 | AvueCrud, 35 | AvueCurdCheckbox, 36 | AvueCurdDate, 37 | AvueCurdTime, 38 | AvueCurdInput, 39 | AvueCurdRadio, 40 | AvueCurdSelect, 41 | AvueCurdInputNumber, 42 | AvueCurdUeditor, 43 | AvueCurdSwitch 44 | }; -------------------------------------------------------------------------------- /packages/crud/index.js: -------------------------------------------------------------------------------- 1 | import Crud from './src/main'; 2 | 3 | /* istanbul ignore next */ 4 | Crud.install = function (Vue) { 5 | Vue.component(Crud.name, Crud); 6 | }; 7 | 8 | export default Crud; -------------------------------------------------------------------------------- /packages/crud/src/crud-cascader.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 56 | 57 | 59 | -------------------------------------------------------------------------------- /packages/crud/src/crud-checkbox.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 37 | 38 | 40 | -------------------------------------------------------------------------------- /packages/crud/src/crud-date.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 47 | 48 | 50 | -------------------------------------------------------------------------------- /packages/crud/src/crud-input-number.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 56 | 57 | 59 | -------------------------------------------------------------------------------- /packages/crud/src/crud-input.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 55 | 56 | 58 | -------------------------------------------------------------------------------- /packages/crud/src/crud-radio.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 33 | 34 | 36 | -------------------------------------------------------------------------------- /packages/crud/src/crud-select.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 43 | 44 | 46 | -------------------------------------------------------------------------------- /packages/crud/src/crud-switch.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 38 | 39 | 41 | -------------------------------------------------------------------------------- /packages/crud/src/crud-time.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 41 | 42 | 44 | 45 | -------------------------------------------------------------------------------- /packages/crud/src/crud-ueditor.vue: -------------------------------------------------------------------------------- 1 | 12 | 58 | 59 | 60 | 72 | -------------------------------------------------------------------------------- /packages/data-card/index.js: -------------------------------------------------------------------------------- 1 | 2 | import DataCard from './src/data-card.vue'; 3 | 4 | /* istanbul ignore next */ 5 | DataCard.install = function (Vue) { 6 | Vue.component(DataCard.name, DataCard); 7 | }; 8 | 9 | export default DataCard; -------------------------------------------------------------------------------- /packages/data-card/src/data-card.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 42 | 43 | 46 | -------------------------------------------------------------------------------- /packages/data-display/index.js: -------------------------------------------------------------------------------- 1 | 2 | import DataDisplay from './src/data-display.vue'; 3 | 4 | /* istanbul ignore next */ 5 | DataDisplay.install = function (Vue) { 6 | Vue.component(DataDisplay.name, DataDisplay); 7 | }; 8 | 9 | export default DataDisplay; -------------------------------------------------------------------------------- /packages/data-display/src/data-display.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 36 | -------------------------------------------------------------------------------- /packages/data-icons/index.js: -------------------------------------------------------------------------------- 1 | 2 | import DataIcons from './src/data-icons.vue'; 3 | 4 | /* istanbul ignore next */ 5 | DataIcons.install = function (Vue) { 6 | Vue.component(DataIcons.name, DataIcons); 7 | }; 8 | 9 | export default DataIcons; -------------------------------------------------------------------------------- /packages/data-icons/src/data-icons.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 40 | 41 | 44 | -------------------------------------------------------------------------------- /packages/data-tabs/index.js: -------------------------------------------------------------------------------- 1 | 2 | import DataTabs from './src/data-tabs.vue'; 3 | 4 | /* istanbul ignore next */ 5 | DataTabs.install = function (Vue) { 6 | Vue.component(DataTabs.name, DataTabs); 7 | }; 8 | 9 | export default DataTabs; -------------------------------------------------------------------------------- /packages/data-tabs/src/data-tabs.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 41 | 42 | 45 | -------------------------------------------------------------------------------- /packages/form/index.js: -------------------------------------------------------------------------------- 1 | import Form from './src/main'; 2 | 3 | /* istanbul ignore next */ 4 | Form.install = function (Vue) { 5 | Vue.component(Form.name, Form); 6 | }; 7 | 8 | export default Form; -------------------------------------------------------------------------------- /packages/index.js: -------------------------------------------------------------------------------- 1 | import Crud from './crud/index.js' 2 | import CrudCheckbox from './crud-checkbox/index.js' 3 | import CrudDate from './crud-date/index.js' 4 | import CrudTime from './crud-time/index.js' 5 | import CrudInput from './crud-input/index.js' 6 | import CrudRadio from './crud-radio/index.js' 7 | import CrudSelect from './crud-select/index.js' 8 | import CrudCascader from './crud-cascader/index.js' 9 | import CrudNumberInput from './crud-input-number/index.js' 10 | import CrudUeditor from './crud-ueditor/index.js' 11 | import CrudSwitch from './crud-switch/index.js' 12 | import DataDisplay from './data-display/index.js' 13 | import DataCard from './data-card/index.js' 14 | import DataTabs from './data-tabs/index.js' 15 | import DataIcons from './data-icons/index.js' 16 | import Form from './form/index.js' 17 | import TableTree from './table-tree'; 18 | import './theme-chalk/src/common.scss' 19 | const components = [ 20 | Crud, 21 | Form, 22 | CrudCheckbox, 23 | CrudDate, 24 | CrudTime, 25 | CrudInput, 26 | CrudRadio, 27 | CrudSelect, 28 | CrudCascader, 29 | CrudNumberInput, 30 | CrudUeditor, 31 | CrudSwitch, 32 | DataDisplay, 33 | DataCard, 34 | DataIcons, 35 | DataTabs, 36 | TableTree, 37 | ] 38 | const install = function(Vue, axios, opts = {}) { 39 | //注入axios; 40 | Vue.prototype.$http = axios; 41 | const AVUE = { 42 | clientHeight: document.documentElement.clientHeight 43 | }; 44 | components.map(component => { 45 | Vue.component(component.name, component); 46 | }); 47 | 48 | AVUE.size = opts.size || ''; 49 | Vue.prototype.$AVUE = AVUE; 50 | } 51 | 52 | if (typeof window !== 'undefined' && window.Vue && window.axios) { 53 | install(window.Vue, window.axios); 54 | } 55 | export default { 56 | version: '1.4.8', 57 | Crud, 58 | Form, 59 | CrudCheckbox, 60 | CrudDate, 61 | CrudTime, 62 | CrudInput, 63 | CrudRadio, 64 | CrudSelect, 65 | CrudCascader, 66 | CrudNumberInput, 67 | CrudUeditor, 68 | CrudSwitch, 69 | DataDisplay, 70 | DataCard, 71 | DataIcons, 72 | DataTabs, 73 | TableTree 74 | } -------------------------------------------------------------------------------- /packages/mixins/crud-compoents.js: -------------------------------------------------------------------------------- 1 | export default function() { 2 | return { 3 | props: { 4 | label: { 5 | type: String, 6 | default: '' 7 | }, 8 | size: { 9 | type: String, 10 | default: '' 11 | }, 12 | disabled: { 13 | type: Boolean, 14 | default: false 15 | }, 16 | clearable: { 17 | type: Boolean, 18 | default: true 19 | }, 20 | type: { 21 | type: String, 22 | default: "" 23 | }, 24 | dic: { 25 | type: Array, 26 | default: () => [] 27 | }, 28 | placeholder: { 29 | type: String, 30 | default: '' 31 | }, 32 | min: { 33 | type: Number, 34 | }, 35 | max: { 36 | type: Number, 37 | }, 38 | border: { 39 | type: Boolean, 40 | default: false 41 | }, 42 | props: { 43 | type: Object, 44 | default () { 45 | return { 46 | label: 'label', 47 | value: 'value', 48 | children: 'children' 49 | }; 50 | } 51 | } 52 | }, 53 | data() { 54 | return { 55 | text: undefined 56 | }; 57 | }, 58 | watch: { 59 | value: function(n, o) { 60 | this.text = this.value; 61 | } 62 | }, 63 | computed: { 64 | valueKey: function() { 65 | return this.props.value || 'value'; 66 | }, 67 | labelKey: function() { 68 | return this.props.label || 'label'; 69 | }, 70 | childrenKey: function() { 71 | return this.props.children || 'children'; 72 | } 73 | }, 74 | created() { 75 | this.text = this.value; 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /packages/table-tree/index.js: -------------------------------------------------------------------------------- 1 | import TableTree from './src/main'; 2 | 3 | /* istanbul ignore next */ 4 | TableTree.install = function(Vue) { 5 | Vue.component(TableTree.name, TableTree); 6 | }; 7 | 8 | export default TableTree; -------------------------------------------------------------------------------- /packages/table-tree/src/eval.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @Author: jianglei 3 | * @Date: 2017-10-12 12:06:49 4 | */ 5 | 'use strict' 6 | import Vue from 'vue' 7 | export default function treeToArray(data, expandAll, parent = null, level = null) { 8 | let tmp = [] 9 | Array.from(data).forEach(function(record) { 10 | if (record._expanded === undefined) { 11 | Vue.set(record, '_expanded', expandAll) 12 | } 13 | let _level = 1 14 | if (level !== undefined && level !== null) { 15 | _level = level + 1 16 | } 17 | Vue.set(record, '_level', _level) 18 | // 如果有父元素 19 | if (parent) { 20 | Vue.set(record, 'parent', parent) 21 | } 22 | tmp.push(record) 23 | if (record.children && record.children.length > 0) { 24 | const children = treeToArray(record.children, expandAll, record, _level) 25 | tmp = tmp.concat(children) 26 | } 27 | }) 28 | return tmp 29 | } 30 | -------------------------------------------------------------------------------- /packages/theme-chalk/src/common.scss: -------------------------------------------------------------------------------- 1 | @import './element-ui.scss'; 2 | @import './data-display.scss'; 3 | @import './data-card.scss'; 4 | @import './data-tabs.scss'; 5 | @import './data-icons.scss'; 6 | @import './crud-quill/quill.core.css'; 7 | @import './crud-quill/quill.snow.css'; 8 | @import './crud-quill/quill.bubble.css'; 9 | -------------------------------------------------------------------------------- /packages/theme-chalk/src/data-card.scss: -------------------------------------------------------------------------------- 1 | .data-card{ 2 | $height: 340px; 3 | .item { 4 | position: relative; 5 | margin: 0 auto; 6 | margin-bottom: 50px; 7 | width: 230px; 8 | height: $height; 9 | overflow: hidden; 10 | border-radius: 5px; 11 | border-color: #fff; 12 | border-width: 1px; 13 | border-style: solid; 14 | &:hover .item-text { 15 | top: 0; 16 | } 17 | } 18 | .item-img { 19 | width: 100%; 20 | background: red; 21 | border-radius: 5px; 22 | border-bottom-left-radius: 0; 23 | border-bottom-right-radius: 0; 24 | } 25 | .item-text { 26 | position: absolute; 27 | top: 150px; 28 | padding: 20px 15px; 29 | width: 100%; 30 | height: $height; 31 | overflow: auto; 32 | box-sizing: border-box; 33 | border-radius: 5px; 34 | border-top-left-radius: 0; 35 | border-top-right-radius: 0; 36 | opacity: 0.9; 37 | transition: top 0.4s; 38 | & > p { 39 | font-size: 12px; 40 | line-height: 25px; 41 | text-indent: 2em; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /packages/theme-chalk/src/data-display.scss: -------------------------------------------------------------------------------- 1 | .avue-data-display{ 2 | .item { 3 | display: flex; 4 | align-items: center; 5 | flex-direction: column; 6 | margin: 5px 0; 7 | text-align: center; 8 | } 9 | 10 | .count { 11 | margin: 8px 0; 12 | font-weight: bold; 13 | font-size: 32px; 14 | color: #15A0FF; 15 | } 16 | 17 | .title { 18 | color: #999; 19 | } 20 | 21 | .splitLine { 22 | display: block; 23 | margin: 0 auto; 24 | width: 24px; 25 | height: 1px; 26 | background: #9B9B9B; 27 | } 28 | } -------------------------------------------------------------------------------- /packages/theme-chalk/src/data-icons.scss: -------------------------------------------------------------------------------- 1 | .data-icons{ 2 | .item { 3 | display: flex; 4 | align-items: center; 5 | justify-content: space-between; 6 | width: 80px; 7 | margin: 0 auto; 8 | } 9 | .item-icon { 10 | margin-top: 3px; 11 | margin-right: 8px; 12 | & > i { 13 | font-size: 46px !important; 14 | } 15 | } 16 | .item-info { 17 | line-height: 25px; 18 | & > span { 19 | color: #999; 20 | font-size: 12px; 21 | } 22 | } 23 | .item--easy { 24 | flex-direction: column; 25 | & > .item-icon { 26 | margin: 0; 27 | } 28 | & > .item-info { 29 | margin-top: -15px; 30 | & > span { 31 | font-size: 14px; 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /packages/theme-chalk/src/data-tabs.scss: -------------------------------------------------------------------------------- 1 | .data-tabs{ 2 | .item { 3 | position: relative; 4 | margin: 15px; 5 | padding: 12px; 6 | height: 144px; 7 | border-radius: 4px; 8 | box-sizing: border-box; 9 | overflow: hidden; 10 | color: #fff; 11 | } 12 | .item-header { 13 | position: relative; 14 | & > p { 15 | margin: 0px; 16 | font-size: 14px; 17 | } 18 | & > span { 19 | position: absolute; 20 | right: 0px; 21 | top: 0px; 22 | padding: 2px 8px; 23 | border-radius: 4px; 24 | font-size: 12px; 25 | background: rgba(255, 255, 255, 0.3); 26 | } 27 | } 28 | .item-body { 29 | & > h2 { 30 | margin: 0; 31 | font-size: 32px; 32 | line-height: 60px; 33 | } 34 | } 35 | .item-footer { 36 | line-height: 16px; 37 | & > span { 38 | font-size: 10px; 39 | } 40 | & > p { 41 | margin: 0px; 42 | font-size: 12px; 43 | } 44 | } 45 | .item-tip { 46 | display: flex; 47 | align-items: center; 48 | justify-content: center; 49 | position: absolute; 50 | width: 80px; 51 | height: 80px; 52 | bottom: 10px; 53 | right: 10px; 54 | border: 2px solid #fff; 55 | border-radius: 100%; 56 | font-size: 48px; 57 | transform: rotate(-40deg); 58 | opacity: 0.1; 59 | } 60 | } -------------------------------------------------------------------------------- /packages/theme-chalk/src/element-ui.scss: -------------------------------------------------------------------------------- 1 | .el-select, 2 | .el-date-editor.el-input, 3 | .el-date-editor.el-input__inner, 4 | .el-cascader, 5 | .el-input-number { 6 | width: 100% !important; 7 | } -------------------------------------------------------------------------------- /packages/utils/validate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 判断是否为空 3 | */ 4 | export function validatenull(val) { 5 | if (typeof val == 'boolean') { 6 | return false; 7 | } 8 | if (val instanceof Array) { 9 | if (val.length == 0) return true; 10 | } else if (val instanceof Object) { 11 | if (JSON.stringify(val) === '{}') return true; 12 | } else { 13 | if (val == 'null' || val == null || val == 'undefined' || val == undefined || val == '') return true; 14 | return false; 15 | } 16 | return false; 17 | }; 18 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 19 | -------------------------------------------------------------------------------- /src/api/admin.js: -------------------------------------------------------------------------------- 1 | import { userTableData, roleTableData } from '@/mock/admin' 2 | import { baseUrl } from '@/config/env' 3 | import { DIC } from '@/const/dic' 4 | export const getUserData = (page) => { 5 | return new Promise((resolve, reject) => { 6 | resolve({ data: userTableData }); 7 | }) 8 | } 9 | 10 | export const getRoleData = (page) => { 11 | return new Promise((resolve, reject) => { 12 | resolve({ data: roleTableData }); 13 | }) 14 | } 15 | 16 | export const getDic = (type) => { 17 | return new Promise((resolve, reject) => { 18 | resolve({ data: DIC[type] }); 19 | }) 20 | } -------------------------------------------------------------------------------- /src/api/user.js: -------------------------------------------------------------------------------- 1 | import request from '@/router/axios' 2 | import { userInfo, tableData } from '@/mock/user' 3 | import { menu, menuAll } from '@/mock/menu' 4 | import { baseUrl } from '@/config/env' 5 | export const loginByUsername = (username, password, code, redomStr) => { 6 | return new Promise((resolve, reject) => { 7 | resolve({ data: new Date().getTime() }); 8 | }) 9 | } 10 | 11 | export const getUserInfo = () => { 12 | return new Promise((resolve, reject) => { 13 | resolve({ data: userInfo }); 14 | }) 15 | } 16 | export const RefeshToken = () => { 17 | return new Promise((resolve, reject) => { 18 | resolve({ data: new Date().getTime() }); 19 | }) 20 | } 21 | 22 | export const getMenu = (parentId) => { 23 | return new Promise((resolve, reject) => { 24 | if (parentId != 1) parentId = 0; 25 | resolve({ data: menu[parentId] }); 26 | }) 27 | } 28 | export const getMenuAll = () => { 29 | return new Promise((resolve, reject) => { 30 | resolve({ data: menu[0] }); 31 | }) 32 | } 33 | 34 | export const getTableData = (page) => { 35 | return new Promise((resolve, reject) => { 36 | resolve({ data: tableData }); 37 | }) 38 | } 39 | export const logout = () => { 40 | return new Promise((resolve, reject) => { 41 | resolve(); 42 | }) 43 | } -------------------------------------------------------------------------------- /src/assets/css/bootstrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/bootstrap.png -------------------------------------------------------------------------------- /src/assets/css/bootstrap1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/bootstrap1.png -------------------------------------------------------------------------------- /src/assets/css/decorator/common-65a7269c002e0125c893042d8c4b7fb9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/decorator/common-65a7269c002e0125c893042d8c4b7fb9.png -------------------------------------------------------------------------------- /src/assets/css/decorator/common-d299f5a3da3ca22670ae5217440f4475-ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/decorator/common-d299f5a3da3ca22670ae5217440f4475-ie6.png -------------------------------------------------------------------------------- /src/assets/css/decorator/operations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/decorator/operations.png -------------------------------------------------------------------------------- /src/assets/css/decorator/trans-1988001b82b1db43eb0708df3c9f2914.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/decorator/trans-1988001b82b1db43eb0708df3c9f2914.png -------------------------------------------------------------------------------- /src/assets/css/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/iconfont.eot -------------------------------------------------------------------------------- /src/assets/css/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/css/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/iconfont.woff -------------------------------------------------------------------------------- /src/assets/css/line_conn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/line_conn.png -------------------------------------------------------------------------------- /src/assets/css/skin333/jedate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/skin333/jedate.png -------------------------------------------------------------------------------- /src/assets/css/skin333/jedatefont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/skin333/jedatefont.eot -------------------------------------------------------------------------------- /src/assets/css/skin333/jedatefont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/skin333/jedatefont.ttf -------------------------------------------------------------------------------- /src/assets/css/skin333/jedatefont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/skin333/jedatefont.woff -------------------------------------------------------------------------------- /src/assets/css/ztree/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/ztree/iconfont.eot -------------------------------------------------------------------------------- /src/assets/css/ztree/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/ztree/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/css/ztree/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/css/ztree/iconfont.woff -------------------------------------------------------------------------------- /src/assets/font/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/font/FontAwesome.otf -------------------------------------------------------------------------------- /src/assets/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/assets/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/assets/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/assets/font/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/font/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/assets/fonts/Simple-Line-Icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/Simple-Line-Icons.eot -------------------------------------------------------------------------------- /src/assets/fonts/Simple-Line-Icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/Simple-Line-Icons.ttf -------------------------------------------------------------------------------- /src/assets/fonts/Simple-Line-Icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/Simple-Line-Icons.woff -------------------------------------------------------------------------------- /src/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/assets/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/iconfont.eot -------------------------------------------------------------------------------- /src/assets/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/iconfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/iconfont.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/iconfont.zip -------------------------------------------------------------------------------- /src/assets/fonts/iconfont/demo.css: -------------------------------------------------------------------------------- 1 | *{margin: 0;padding: 0;list-style: none;} 2 | /* 3 | KISSY CSS Reset 4 | 理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。 5 | 2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。 6 | 3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。 7 | 特色:1. 适应中文;2. 基于最新主流浏览器。 8 | 维护:玉伯, 正淳 9 | */ 10 | 11 | /** 清除内外边距 **/ 12 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ 13 | dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ 14 | pre, /* text formatting elements 文本格式元素 */ 15 | form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */ 16 | th, td /* table elements 表格元素 */ { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | /** 设置默认字体 **/ 22 | body, 23 | button, input, select, textarea /* for ie */ { 24 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif; 25 | } 26 | h1, h2, h3, h4, h5, h6 { font-size: 100%; } 27 | address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */ 28 | code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */ 29 | small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */ 30 | 31 | /** 重置列表元素 **/ 32 | ul, ol { list-style: none; } 33 | 34 | /** 重置文本格式元素 **/ 35 | a { text-decoration: none; } 36 | a:hover { text-decoration: underline; } 37 | 38 | 39 | /** 重置表单元素 **/ 40 | legend { color: #000; } /* for ie6 */ 41 | fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */ 42 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */ 43 | /* 注:optgroup 无法扶正 */ 44 | 45 | /** 重置表格元素 **/ 46 | table { border-collapse: collapse; border-spacing: 0; } 47 | 48 | /* 清除浮动 */ 49 | .ks-clear:after, .clear:after { 50 | content: '\20'; 51 | display: block; 52 | height: 0; 53 | clear: both; 54 | } 55 | .ks-clear, .clear { 56 | *zoom: 1; 57 | } 58 | 59 | .main {padding: 30px 100px;} 60 | .main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;} 61 | 62 | .helps{margin-top:40px;} 63 | .helps pre{ 64 | padding:20px; 65 | margin:10px 0; 66 | border:solid 1px #e7e1cd; 67 | background-color: #fffdef; 68 | overflow: auto; 69 | } 70 | 71 | .icon_lists li{ 72 | float:left; 73 | width: 100px; 74 | height:180px; 75 | text-align: center; 76 | } 77 | .icon_lists .icon{ 78 | font-size: 42px; 79 | line-height: 100px; 80 | margin: 10px 0; 81 | color:#333; 82 | -webkit-transition: font-size 0.25s ease-out 0s; 83 | -moz-transition: font-size 0.25s ease-out 0s; 84 | transition: font-size 0.25s ease-out 0s; 85 | 86 | } 87 | .icon_lists .icon:hover{ 88 | font-size: 100px; 89 | } 90 | -------------------------------------------------------------------------------- /src/assets/fonts/iconfont/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.eot?t=1470294453'); /* IE9*/ 4 | src: url('iconfont.eot?t=1470294453#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('iconfont.woff?t=1470294453') format('woff'), /* chrome, firefox */ 6 | url('iconfont.ttf?t=1470294453') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('iconfont.svg?t=1470294453#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family:"iconfont" !important; 12 | font-size:16px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -webkit-text-stroke-width: 0.2px; 16 | -moz-osx-font-smoothing: grayscale; 17 | } 18 | .ifont-add:before { content: "\e600"; } 19 | .ifont-arrowdown:before { content: "\e601"; } 20 | .ifont-arrowleft:before { content: "\e602"; } 21 | .ifont-arrowright:before { content: "\e603"; } 22 | .ifont-arrowup:before { content: "\e604"; } 23 | .ifont-disksave:before { content: "\e605"; } 24 | .ifont-folderopen:before { content: "\e606"; } 25 | .ifont-folder:before { content: "\e607"; } 26 | .ifont-link:before { content: "\e608"; } 27 | .ifont-redo:before { content: "\e609"; } 28 | .ifont-refresh:before { content: "\e60a"; } 29 | .ifont-run:before { content: "\e60b"; } 30 | .ifont-search:before { content: "\e60c"; } 31 | .ifont-selector:before { content: "\e60d"; } 32 | .ifont-undo:before { content: "\e60e"; } 33 | .ifont-compare:before { content: "\e60f"; } 34 | .ifont-component:before { content: "\e610"; } 35 | .ifont-datafilter:before { content: "\e611"; } 36 | .ifont-mapping:before { content: "\e612"; } 37 | .ifont-mappingnoborder:before { content: "\e613"; } 38 | .ifont-max:before { content: "\e614"; } 39 | .ifont-maxnoborder:before { content: "\e615"; } 40 | .ifont-mysqlin:before { content: "\e616"; } 41 | .ifont-mysqlout:before { content: "\e617"; } 42 | .ifont-oraclein:before { content: "\e618"; } 43 | .ifont-oracleout:before { content: "\e619"; } 44 | .ifont-sql:before { content: "\e61a"; } 45 | .ifont-sqlnoborder:before { content: "\e61b"; } 46 | .ifont-flow:before { content: "\e61c"; } 47 | .ifont-puzzle:before { content: "\e61d"; } 48 | -------------------------------------------------------------------------------- /src/assets/fonts/iconfont/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/iconfont/iconfont.eot -------------------------------------------------------------------------------- /src/assets/fonts/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/fonts/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/fonts/iconfont/iconfont.woff -------------------------------------------------------------------------------- /src/assets/icons/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/icons/iconfont.eot -------------------------------------------------------------------------------- /src/assets/icons/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/icons/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/icons/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/icons/iconfont.woff -------------------------------------------------------------------------------- /src/assets/images/bg/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/bg/bg2.jpg -------------------------------------------------------------------------------- /src/assets/images/bg/bg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/bg/bg3.jpg -------------------------------------------------------------------------------- /src/assets/images/body_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/body_bg.jpg -------------------------------------------------------------------------------- /src/assets/images/charts/Ldt1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/Ldt1.png -------------------------------------------------------------------------------- /src/assets/images/charts/Ldt2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/Ldt2.png -------------------------------------------------------------------------------- /src/assets/images/charts/Ldt3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/Ldt3.png -------------------------------------------------------------------------------- /src/assets/images/charts/b1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/b1.png -------------------------------------------------------------------------------- /src/assets/images/charts/b2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/b2.png -------------------------------------------------------------------------------- /src/assets/images/charts/b3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/b3.png -------------------------------------------------------------------------------- /src/assets/images/charts/b4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/b4.png -------------------------------------------------------------------------------- /src/assets/images/charts/b5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/b5.png -------------------------------------------------------------------------------- /src/assets/images/charts/b6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/b6.png -------------------------------------------------------------------------------- /src/assets/images/charts/b7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/b7.png -------------------------------------------------------------------------------- /src/assets/images/charts/dt1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/dt1.png -------------------------------------------------------------------------------- /src/assets/images/charts/dt2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/dt2.png -------------------------------------------------------------------------------- /src/assets/images/charts/dt3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/dt3.png -------------------------------------------------------------------------------- /src/assets/images/charts/dt4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/dt4.png -------------------------------------------------------------------------------- /src/assets/images/charts/fm1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/fm1.png -------------------------------------------------------------------------------- /src/assets/images/charts/fm2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/fm2.png -------------------------------------------------------------------------------- /src/assets/images/charts/fm3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/fm3.png -------------------------------------------------------------------------------- /src/assets/images/charts/fm4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/fm4.png -------------------------------------------------------------------------------- /src/assets/images/charts/fm5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/fm5.png -------------------------------------------------------------------------------- /src/assets/images/charts/fm6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/fm6.png -------------------------------------------------------------------------------- /src/assets/images/charts/fm7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/fm7.png -------------------------------------------------------------------------------- /src/assets/images/charts/fm8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/fm8.png -------------------------------------------------------------------------------- /src/assets/images/charts/fm9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/fm9.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx1.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx10.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx11.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx2.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx3.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx4.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx5.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx6.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx7.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx8.png -------------------------------------------------------------------------------- /src/assets/images/charts/gx9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/gx9.png -------------------------------------------------------------------------------- /src/assets/images/charts/ld1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/ld1.png -------------------------------------------------------------------------------- /src/assets/images/charts/ld2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/ld2.png -------------------------------------------------------------------------------- /src/assets/images/charts/ld3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/ld3.png -------------------------------------------------------------------------------- /src/assets/images/charts/ld4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/ld4.png -------------------------------------------------------------------------------- /src/assets/images/charts/mj1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/mj1.png -------------------------------------------------------------------------------- /src/assets/images/charts/mj2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/mj2.png -------------------------------------------------------------------------------- /src/assets/images/charts/mj3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/mj3.png -------------------------------------------------------------------------------- /src/assets/images/charts/mj4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/mj4.png -------------------------------------------------------------------------------- /src/assets/images/charts/mj5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/mj5.png -------------------------------------------------------------------------------- /src/assets/images/charts/rl1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/rl1.png -------------------------------------------------------------------------------- /src/assets/images/charts/rl2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/rl2.png -------------------------------------------------------------------------------- /src/assets/images/charts/rl3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/rl3.png -------------------------------------------------------------------------------- /src/assets/images/charts/rl4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/rl4.png -------------------------------------------------------------------------------- /src/assets/images/charts/rl5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/rl5.png -------------------------------------------------------------------------------- /src/assets/images/charts/rl6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/rl6.png -------------------------------------------------------------------------------- /src/assets/images/charts/rl7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/rl7.png -------------------------------------------------------------------------------- /src/assets/images/charts/x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/x1.png -------------------------------------------------------------------------------- /src/assets/images/charts/x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/x2.png -------------------------------------------------------------------------------- /src/assets/images/charts/x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/x3.png -------------------------------------------------------------------------------- /src/assets/images/charts/x4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/x4.png -------------------------------------------------------------------------------- /src/assets/images/charts/x5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/x5.png -------------------------------------------------------------------------------- /src/assets/images/charts/xx1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/xx1.png -------------------------------------------------------------------------------- /src/assets/images/charts/xx2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/xx2.png -------------------------------------------------------------------------------- /src/assets/images/charts/xx3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/xx3.png -------------------------------------------------------------------------------- /src/assets/images/charts/xx4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/xx4.png -------------------------------------------------------------------------------- /src/assets/images/charts/xx5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/xx5.png -------------------------------------------------------------------------------- /src/assets/images/charts/yb1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/yb1.png -------------------------------------------------------------------------------- /src/assets/images/charts/yb2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/yb2.png -------------------------------------------------------------------------------- /src/assets/images/charts/yb3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/yb3.png -------------------------------------------------------------------------------- /src/assets/images/charts/yb4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/yb4.png -------------------------------------------------------------------------------- /src/assets/images/charts/z1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z1.png -------------------------------------------------------------------------------- /src/assets/images/charts/z10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z10.png -------------------------------------------------------------------------------- /src/assets/images/charts/z11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z11.png -------------------------------------------------------------------------------- /src/assets/images/charts/z12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z12.png -------------------------------------------------------------------------------- /src/assets/images/charts/z13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z13.png -------------------------------------------------------------------------------- /src/assets/images/charts/z2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z2.png -------------------------------------------------------------------------------- /src/assets/images/charts/z3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z3.png -------------------------------------------------------------------------------- /src/assets/images/charts/z4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z4.png -------------------------------------------------------------------------------- /src/assets/images/charts/z5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z5.png -------------------------------------------------------------------------------- /src/assets/images/charts/z6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z6.png -------------------------------------------------------------------------------- /src/assets/images/charts/z7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z7.png -------------------------------------------------------------------------------- /src/assets/images/charts/z8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z8.png -------------------------------------------------------------------------------- /src/assets/images/charts/z9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/z9.png -------------------------------------------------------------------------------- /src/assets/images/charts/zx1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/zx1.png -------------------------------------------------------------------------------- /src/assets/images/charts/zx2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/charts/zx2.png -------------------------------------------------------------------------------- /src/assets/images/datas/csv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/datas/csv.png -------------------------------------------------------------------------------- /src/assets/images/datas/excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/datas/excel.png -------------------------------------------------------------------------------- /src/assets/images/datas/mysql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/datas/mysql.png -------------------------------------------------------------------------------- /src/assets/images/empty-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/empty-top.png -------------------------------------------------------------------------------- /src/assets/images/login-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/login-bg.jpg -------------------------------------------------------------------------------- /src/assets/images/logo-min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/logo-min.jpg -------------------------------------------------------------------------------- /src/assets/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/logo.jpg -------------------------------------------------------------------------------- /src/assets/images/qq-fance.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/qq-fance.jpg -------------------------------------------------------------------------------- /src/assets/images/qq-fance2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/qq-fance2.jpg -------------------------------------------------------------------------------- /src/assets/images/resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/resize.png -------------------------------------------------------------------------------- /src/assets/images/resize2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/resize2.png -------------------------------------------------------------------------------- /src/assets/images/talkingdata.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/talkingdata.png -------------------------------------------------------------------------------- /src/assets/images/theme/theme1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/theme/theme1.png -------------------------------------------------------------------------------- /src/assets/images/theme/theme2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/theme/theme2.png -------------------------------------------------------------------------------- /src/assets/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/images/user.png -------------------------------------------------------------------------------- /src/assets/img/GooFlow_line_oper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/GooFlow_line_oper.png -------------------------------------------------------------------------------- /src/assets/img/bg-blue-wrap-data-grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/bg-blue-wrap-data-grid.png -------------------------------------------------------------------------------- /src/assets/img/bullet_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/bullet_blue.png -------------------------------------------------------------------------------- /src/assets/img/code/qq-code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/code/qq-code.jpg -------------------------------------------------------------------------------- /src/assets/img/code/wechat-code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/code/wechat-code.jpg -------------------------------------------------------------------------------- /src/assets/img/gooflow_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/gooflow_bg.png -------------------------------------------------------------------------------- /src/assets/img/gooflow_blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/gooflow_blank.gif -------------------------------------------------------------------------------- /src/assets/img/gooflow_blank2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/gooflow_blank2.gif -------------------------------------------------------------------------------- /src/assets/img/gooflow_blank2.htm: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | gooflow_blank2 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/assets/img/gooflow_btn_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/gooflow_btn_bg.png -------------------------------------------------------------------------------- /src/assets/img/gooflow_bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/gooflow_bullet.png -------------------------------------------------------------------------------- /src/assets/img/gooflow_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/gooflow_icon.png -------------------------------------------------------------------------------- /src/assets/img/gooflow_icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/gooflow_icon2.png -------------------------------------------------------------------------------- /src/assets/img/gooflow_tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/gooflow_tip.png -------------------------------------------------------------------------------- /src/assets/img/hover-add-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/hover-add-light.png -------------------------------------------------------------------------------- /src/assets/img/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/login.png -------------------------------------------------------------------------------- /src/assets/img/view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/assets/img/view.png -------------------------------------------------------------------------------- /src/assets/js/drag.js: -------------------------------------------------------------------------------- 1 | // 拖拽插件 2 | var drag = false; 3 | var attr; 4 | Vue.directive('drag',//自定义指令 JS 5 | { 6 | bind: function (el, binding) { 7 | let oDiv = el; //当前元素 8 | let self = this; //上下文 9 | oDiv.onmousedown = function (e) { 10 | //鼠标按下,计算当前元素距离可视区的距离 11 | 12 | document.onmousemove=function(e){ 13 | $('.drag-target-list').mouseover(function () { 14 | drag = true; 15 | if($(this).hasClass('attrX')){ 16 | attr="x" 17 | }; 18 | if($(this).hasClass('attrY')){ 19 | attr="y" 20 | }; 21 | }).mouseout(function () { 22 | drag = false; 23 | if($(this).hasClass('attrX')){ 24 | attr="x" 25 | }; 26 | if($(this).hasClass('attrY')){ 27 | attr="y" 28 | }; 29 | }); 30 | if (drag == true) { 31 | binding.value({text:$(el).find('span').text(),type:attr}) 32 | document.onmousemove = null; 33 | document.onmouseup = null; 34 | } 35 | 36 | } 37 | document.onmouseup = function (e) { 38 | 39 | }; 40 | }; 41 | } 42 | } 43 | ); 44 | function mm(a) 45 | { 46 | return /(\x0f[^\x0f]+)\x0f[\s\S]*\1/.test("\x0f"+a.join("\x0f\x0f") +"\x0f"); 47 | } 48 | -------------------------------------------------------------------------------- /src/assets/json/heatmap-1.json: -------------------------------------------------------------------------------- 1 | [[0, 0, 10], [0, 1, 19], [0, 2, 8], [0, 3, 24], [0, 4, 67], [1, 0, 92], [1, 1, 58], [1, 2, 78], [1, 3, 117], [1, 4, 48], [2, 0, 35], [2, 1, 15], [2, 2, 123], [2, 3, 64], [2, 4, 52], [3, 0, 72], [3, 1, 132], [3, 2, 114], [3, 3, 19], [3, 4, 16], [4, 0, 38], [4, 1, 5], [4, 2, 8], [4, 3, 117], [4, 4, 115], [5, 0, 88], [5, 1, 32], [5, 2, 12], [5, 3, 6], [5, 4, 120], [6, 0, 13], [6, 1, 44], [6, 2, 88], [6, 3, 98], [6, 4, 96], [7, 0, 31], [7, 1, 1], [7, 2, 82], [7, 3, 32], [7, 4, 30], [8, 0, 85], [8, 1, 97], [8, 2, 123], [8, 3, 64], [8, 4, 84], [9, 0, 47], [9, 1, 114], [9, 2, 31], [9, 3, 48], [9, 4, 91]] 2 | -------------------------------------------------------------------------------- /src/assets/theme/index.js: -------------------------------------------------------------------------------- 1 | import theme1 from './theme' 2 | import theme2 from './theme2' 3 | 4 | export { theme1, theme2 } 5 | -------------------------------------------------------------------------------- /src/components/basic-container/main.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | 15 | 21 | -------------------------------------------------------------------------------- /src/components/error-page/404.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 32 | 92 | -------------------------------------------------------------------------------- /src/components/error-page/500.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 39 | 112 | 113 | -------------------------------------------------------------------------------- /src/config/env.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 配置编译环境和线上环境之间的切换 3 | * 4 | * baseUrl: 老项目域名地址 5 | * khglUrl: 客户管理域名地址 6 | * dicUrl : 字典服务器地址 7 | * routerMode: 路由模式 8 | * imgBaseUrl: 图片所在域名地址 9 | * welUrl :默认欢迎页 10 | * 11 | */ 12 | 13 | 14 | let baseUrl = ''; 15 | let iconfontVersion = ['567566_r22zi6t8noas8aor']; 16 | let iconfontUrl = `/t/font_$key.css`; 17 | let codeUrl = `${baseUrl}/code` 18 | const env = process.env 19 | if (env.NODE_ENV == 'development') { 20 | baseUrl = ``; // 开发环境地址 21 | } else if (env.NODE_ENV == 'production') { 22 | baseUrl = ``; //生产环境地址 23 | } else if (env.NODE_ENV == 'test') { 24 | baseUrl = ``; //测试环境地址 25 | } 26 | export { 27 | baseUrl, 28 | iconfontUrl, 29 | iconfontVersion, 30 | codeUrl, 31 | env 32 | } 33 | -------------------------------------------------------------------------------- /src/const/dic.js: -------------------------------------------------------------------------------- 1 | export const DIC = { 2 | SEX: [{ 3 | label: '男', 4 | value: 0 5 | }, { 6 | label: '女', 7 | value: 1 8 | }], 9 | POSTIONDATA: [{ 10 | label: '左对齐', 11 | value: 'left' 12 | }, { 13 | label: '居中', 14 | value: 'center' 15 | }, { 16 | label: '右对齐', 17 | value: 'right' 18 | }], 19 | TYPE: [{ 20 | label: '一级1', 21 | value: 0, 22 | children: [{ 23 | label: '一级1二级1', 24 | value: 2, 25 | }] 26 | }, { 27 | label: '一级2', 28 | value: 1, 29 | children: [{ 30 | label: '一级2二级1', 31 | value: 2, 32 | }] 33 | } 34 | 35 | ], 36 | STATE: [{ 37 | label: '有效', 38 | value: 0 39 | }, { 40 | label: '无效', 41 | value: 1 42 | }], 43 | GRADE: [{ 44 | label: "管理员", 45 | value: 0 46 | }, 47 | { 48 | label: "二级管理员", 49 | value: 1 50 | } 51 | ], 52 | VAILDATA: [{ 53 | label: "激活", 54 | value: true 55 | }, 56 | { 57 | label: "禁用", 58 | value: false 59 | } 60 | ], 61 | CRUDTYPE: [{ 62 | label: "选择框", 63 | value: 'select' 64 | }, 65 | { 66 | label: "文本框", 67 | value: 'text' 68 | }, 69 | { 70 | label: "多行文本框", 71 | value: 'textarea' 72 | }, 73 | { 74 | label: "单选框", 75 | value: 'radio' 76 | }, 77 | { 78 | label: "多选框", 79 | value: 'checkbox' 80 | }, 81 | { 82 | label: "日期框", 83 | value: 'date' 84 | } 85 | ], 86 | DATALIST: [{ 87 | label: 'SEX', 88 | value: 'SEX', 89 | }, { 90 | label: 'STATE', 91 | value: 'STATE', 92 | }, { 93 | label: 'GRADE', 94 | value: 'GRADE', 95 | }] 96 | } 97 | -------------------------------------------------------------------------------- /src/const/router/routerData.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | id: 0, 4 | name: "smallwei", 5 | git: "https://gitee.com/smallweigit/avue" 6 | }, 7 | { 8 | id: 1, 9 | name: "lengleng", 10 | git: "https://gitee.com/log4j/pig" 11 | } 12 | ] -------------------------------------------------------------------------------- /src/const/router/routerOption.js: -------------------------------------------------------------------------------- 1 | import { 2 | DIC 3 | } from '@/const/dic' 4 | export default { 5 | border: true, 6 | index: true, 7 | selection: true, 8 | delBtn: false, 9 | editBtn: false, 10 | page: false, 11 | height: '500', 12 | menuWidth: '150', 13 | dicData: DIC, 14 | column: [{ 15 | label: "姓名", 16 | prop: "name" 17 | }, { 18 | label: "git地址", 19 | prop: "git", 20 | solt: true, 21 | }] 22 | }; 23 | -------------------------------------------------------------------------------- /src/const/website.js: -------------------------------------------------------------------------------- 1 | export default { 2 | title: "ETL", 3 | logo: "A", 4 | author: "dongzhouc", 5 | whiteList: ["/login", "/404", "/401", "/lock"], 6 | lockPage: '/lock', 7 | info: { 8 | title: "", 9 | list: [ 10 | '', 11 | ] 12 | }, 13 | wel: { 14 | title: '', 15 | list: [ 16 | '', 17 | ] 18 | }, 19 | 20 | 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx 2 | VOLUME /tmp 3 | ENV LANG en_US.UTF-8 4 | ADD ./dist/ /usr/share/nginx/html/ 5 | EXPOSE 80 6 | EXPOSE 443 -------------------------------------------------------------------------------- /src/entry-client.js: -------------------------------------------------------------------------------- 1 | import { createApp } from './main' 2 | const { app, router, store } = createApp() 3 | if (window.__INITIAL_STATE__) { 4 | store.replaceState(window.__INITIAL_STATE__) 5 | } 6 | router.onReady(() => { 7 | app.$mount('#app') 8 | }) -------------------------------------------------------------------------------- /src/entry-server.js: -------------------------------------------------------------------------------- 1 | import { createApp } from './main' 2 | 3 | const isDev = process.env.NODE_ENV !== 'production' 4 | 5 | // This exported function will be called by `bundleRenderer`. 6 | // This is where we perform data-prefetching to determine the 7 | // state of our application before actually rendering it. 8 | // Since data fetching is async, this function is expected to 9 | // return a Promise that resolves to the app instance. 10 | export default context => { 11 | return new Promise((resolve, reject) => { 12 | const s = isDev && Date.now() 13 | const { app, router, store } = createApp() 14 | 15 | const { url } = context 16 | const { fullPath } = router.resolve(url).route 17 | 18 | if (fullPath !== url) { 19 | return reject({ url: fullPath }) 20 | } 21 | 22 | // set router's location 23 | router.push(url) 24 | 25 | // wait until router has resolved possible async hooks 26 | router.onReady(() => { 27 | const matchedComponents = router.getMatchedComponents() 28 | // no matched routes 29 | if (!matchedComponents.length) { 30 | return reject({ code: 404 }) 31 | } 32 | // Call fetchData hooks on components matched by the route. 33 | // A preFetch hook dispatches a store action and returns a Promise, 34 | // which is resolved when the action is complete and store state has been 35 | // updated. 36 | Promise.all(matchedComponents.map(({ asyncData }) => asyncData && asyncData({ 37 | store, 38 | route: router.currentRoute 39 | }))).then(() => { 40 | isDev && console.log(`data pre-fetch: ${Date.now() - s}ms`) 41 | // After all preFetch hooks are resolved, our store is now 42 | // filled with the state needed to render the app. 43 | // Expose the state on the render context, and let the request handler 44 | // inline the state in the HTML response. This allows the client-side 45 | // store to pick-up the server-side state without having to duplicate 46 | // the initial data fetching on the client. 47 | context.state = store.state 48 | resolve(app) 49 | }).catch(reject) 50 | }, reject) 51 | }) 52 | } 53 | -------------------------------------------------------------------------------- /src/errorLog.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import store from './store' 3 | Vue.config.errorHandler = function (err, vm, info, a) { 4 | 5 | Vue.nextTick(() => { 6 | store.commit('ADD_LOG', { 7 | message: err.message, 8 | stack: err.stack, 9 | info: info, 10 | url: window.location.href 11 | }) 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import axios from './router/axios'; 3 | import VueAxios from 'vue-axios'; 4 | import App from './App'; 5 | import './permission'; // 权限 6 | import './errorLog'; // 错误日志 7 | import 'babel-polyfill'; 8 | import router from './router/router'; 9 | import store from './store'; 10 | import ELEMENT from 'element-ui'; 11 | import { 12 | loadStyle 13 | } from './util/util' 14 | import * as urls from '@/config/env'; 15 | import { 16 | iconfontUrl, 17 | iconfontVersion 18 | } from '@/config/env'; 19 | import * as filters from './filters' // 全局filter 20 | import './styles/common.scss'; 21 | // 引用fa图标字体 22 | import './styles/icon_fonts/font-awesome.css' 23 | import Avue from '@smallwei/avue'; 24 | import '@smallwei/avue/lib/index.css'; 25 | Vue.use(Avue); 26 | import basicContainer from './components/basic-container/main' 27 | import VueClipboard from 'vue-clipboard2' 28 | 29 | 30 | 31 | // 引用echarts 32 | // import myCharts from 'echarts' 33 | 34 | 35 | 36 | import jq from './panel/jquery.min.js' 37 | import './../src/assets/css/ztree/iconfont.css' 38 | import './assets/css/font-awesome.min.css' 39 | 40 | 41 | 42 | 43 | 44 | 45 | Vue.use(VueClipboard) 46 | 47 | Vue.use(VueAxios, axios) 48 | 49 | Vue.component('basicContainer', basicContainer) 50 | 51 | Object.keys(urls).forEach(key => { 52 | Vue.prototype[key] = urls[key]; 53 | }) 54 | 55 | Object.keys(filters).forEach(key => { 56 | Vue.filter(key, filters[key]) 57 | }) 58 | 59 | iconfontVersion.forEach(ele => { 60 | loadStyle(iconfontUrl.replace('$key', ele)); 61 | }) 62 | 63 | Vue.config.productionTip = false; 64 | 65 | 66 | export function createApp() { 67 | const app = new Vue({ 68 | router, 69 | store, 70 | render: h => h(App) 71 | }) 72 | return { 73 | app, 74 | router, 75 | store 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/mock/admin.js: -------------------------------------------------------------------------------- 1 | import Mock from 'mockjs' 2 | import { 3 | dateFormat 4 | } from '@/filters/' 5 | let userList = [] 6 | for (let i = 0; i < 2; i++) { 7 | userList.push(Mock.mock({ 8 | id: '@increment', 9 | name: Mock.mock('@cname'), 10 | username: Mock.mock('@last'), 11 | ueditor: `

${Mock.mock('@cname')}

`, 12 | grade: [0, 1], 13 | state: 0, 14 | date: dateFormat(new Date()), 15 | })) 16 | } 17 | export const userTableData = { 18 | total: 11, 19 | pageSize: 10, 20 | tableData: userList 21 | }; 22 | 23 | 24 | let roleList = [] 25 | for (let i = 0; i < 2; i++) { 26 | roleList.push(Mock.mock({ 27 | id: '@increment', 28 | name: Mock.mock('@cname'), 29 | date: dateFormat(new Date()), 30 | check: [1, 3, 5] 31 | })) 32 | } 33 | export const roleTableData = { 34 | total: 11, 35 | pageSize: 10, 36 | tableData: roleList 37 | }; 38 | -------------------------------------------------------------------------------- /src/mock/menu.js: -------------------------------------------------------------------------------- 1 | import { 2 | baseUrl 3 | } from '@/config/env' 4 | const first = [{ 5 | id: 1, 6 | label: "echarts集合", 7 | icon: 'icon-biaoge', 8 | children: [ 9 | { 10 | id: 11, 11 | label: "柱状图", 12 | href: '/echarts/index', 13 | // query: {//传递参数使用 14 | // a: 1 15 | // }, 16 | icon: 'anticon anticon-bar-chart', 17 | meta: {}, 18 | children: [] 19 | } 20 | ], 21 | }, ] 22 | const second = [] 23 | export const menu = [first, second]; 24 | -------------------------------------------------------------------------------- /src/mock/user.js: -------------------------------------------------------------------------------- 1 | import Mock from 'mockjs' 2 | export const userInfo = { 3 | userInfo: { 4 | username: 'admin', 5 | name: 'avue', 6 | avatar: 'https://gitee.com/uploads/61/632261_smallweigit.jpg', 7 | }, 8 | roles: ['admin'], 9 | permission: [ 10 | 'sys_crud_btn_add', 11 | 'sys_crud_btn_export', 12 | 'sys_menu_btn_add', 13 | 'sys_menu_btn_edit', 14 | 'sys_menu_btn_del', 15 | 'sys_role_btn1', 16 | 'sys_role_btn2', 17 | 'sys_role_btn3', 18 | 'sys_role_btn4', 19 | 'sys_role_btn5', 20 | 'sys_role_btn6', 21 | ], //权限级别 22 | } 23 | let List = [] 24 | for (let i = 0; i < 5; i++) { 25 | List.push(Mock.mock({ 26 | id: '@increment', 27 | name: Mock.mock('@cname'), 28 | username: Mock.mock('@last'), 29 | type: [0, 2], 30 | 'number|0-100': 0, 31 | 'sex|0-1': 0, 32 | "grade|1-2": true, 33 | address: Mock.mock('@cparagraph(1, 3)'), 34 | check: [1, 3, 4] 35 | })) 36 | } 37 | export const tableData = { 38 | total: 11, 39 | pageSize: 10, 40 | tableData: List 41 | }; 42 | -------------------------------------------------------------------------------- /src/page/errlog/errorPage.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 50 | 51 | 68 | -------------------------------------------------------------------------------- /src/page/errlog/errorTestA.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /src/page/errlog/index.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 50 | 51 | 79 | -------------------------------------------------------------------------------- /src/page/index/index.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 92 | 93 | 114 | -------------------------------------------------------------------------------- /src/page/index/sidebar/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 44 | 46 | 47 | -------------------------------------------------------------------------------- /src/page/index/sidebar/logo.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 41 | 42 | -------------------------------------------------------------------------------- /src/page/index/sidebar/sidebarItem.vue: -------------------------------------------------------------------------------- 1 | 24 | 59 | 68 | 69 | -------------------------------------------------------------------------------- /src/page/index/top/top-breadcrumb.vue: -------------------------------------------------------------------------------- 1 | 8 | 24 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/page/index/top/top-color.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 21 | 22 | 31 | -------------------------------------------------------------------------------- /src/page/index/top/top-lock.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 60 | 61 | 64 | -------------------------------------------------------------------------------- /src/page/index/top/top-menu.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 55 | 56 | 62 | -------------------------------------------------------------------------------- /src/page/index/top/top-theme.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 60 | 61 | 63 | -------------------------------------------------------------------------------- /src/page/lock/index.vue: -------------------------------------------------------------------------------- 1 | 24 | 80 | 81 | -------------------------------------------------------------------------------- /src/page/login/thirdlogin.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 24 | 25 | 50 | -------------------------------------------------------------------------------- /src/page/wel.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 87 | 88 | 136 | -------------------------------------------------------------------------------- /src/router/_import.js: -------------------------------------------------------------------------------- 1 | module.exports = (file, path) => { 2 | if (!path) path = 'page' 3 | return require(`../${path}/${file}.vue`) 4 | } -------------------------------------------------------------------------------- /src/router/axios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * http配置 4 | * 5 | */ 6 | // 引入axios以及element ui中的loading和message组件 7 | import axios from 'axios' 8 | import store from '../store' 9 | import router from '../router/router'; 10 | import { getToken, setToken, removeToken } from '@/util/auth'; 11 | import NProgress from 'nprogress' // progress bar 12 | import 'nprogress/nprogress.css'// progress bar style 13 | axios.defaults.timeout = 10000; 14 | //跨域请求,允许保存cookie 15 | axios.defaults.withCredentials = true; 16 | NProgress.configure({ showSpinner: false })// NProgress Configuration 17 | let cfg, msg; 18 | msg = '服务器君开小差了,请稍后再试'; 19 | //HTTPrequest拦截 20 | axios.interceptors.request.use(config => { 21 | NProgress.start() // start progress bar 22 | // if (store.getters.token) { 23 | // config.headers['X-Token'] = getToken() // 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改 24 | // } 25 | return config 26 | }, error => { 27 | console.log('err' + error)// for debug 28 | return Promise.reject(error) 29 | }) 30 | //HTTPresponse拦截 31 | axios.interceptors.response.use(data => { 32 | NProgress.done(); 33 | return data 34 | }, error => { 35 | NProgress.done(); 36 | return Promise.reject(new Error(msg)); 37 | 38 | }) 39 | 40 | export default axios -------------------------------------------------------------------------------- /src/router/page/index.js: -------------------------------------------------------------------------------- 1 | import Layout from '@/page/index/' 2 | 3 | export default [{ 4 | path: '/', 5 | redirect: 'wel', 6 | hidden: true 7 | }, { 8 | path: '/login', 9 | name: '登录页', 10 | component: () => 11 | import ('@/page/login/index'), 12 | meta: { 13 | keepAlive: true, 14 | } 15 | }, 16 | { 17 | path: '/lock', 18 | name: '锁屏页', 19 | component: () => 20 | import ('@/page/lock/index'), 21 | }, 22 | 23 | ] 24 | -------------------------------------------------------------------------------- /src/router/router.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import VueRouter from 'vue-router'; 3 | import Layout from '@/page/index/' 4 | import PageRouter from './page/' 5 | import ViewsRouter from './views/' 6 | const _import = require('./_import'); 7 | Vue.use(VueRouter); 8 | export default new VueRouter({ 9 | scrollBehavior(to, from, savedPosition) { 10 | if (savedPosition) { 11 | return savedPosition 12 | } else { 13 | if (from.meta.keepAlive) { 14 | from.meta.savedPosition = document.body.scrollTop; 15 | } 16 | return { 17 | x: 0, 18 | y: to.meta.savedPosition || 0 19 | } 20 | } 21 | }, 22 | }); 23 | export const asyncRouterMap = [].concat(PageRouter, ViewsRouter) 24 | -------------------------------------------------------------------------------- /src/router/views/index.js: -------------------------------------------------------------------------------- 1 | import Layout from '@/page/index/'; 2 | 3 | export default [ 4 | { 5 | path: '/wel', 6 | component: Layout, 7 | redirect: '/wel/index', 8 | children: [{ 9 | path: 'index', 10 | name: '首页', 11 | component: () => 12 | import ('@/page/wel'), 13 | }] 14 | }, 15 | { 16 | path: '/echarts', 17 | component: Layout, 18 | redirect: '/echarts/index', 19 | children: [{ 20 | path: 'index', 21 | name: '柱状图', 22 | component: () => 23 | import ( /* webpackChunkName: "utils" */ '@/views/echarts/index') 24 | }] 25 | }, 26 | 27 | ]; 28 | -------------------------------------------------------------------------------- /src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | tag: state => state.tags.tag, 3 | website: state => state.common.website, 4 | userInfo: state => state.user.userInfo, 5 | theme: state => state.common.theme, 6 | themeName: state => state.common.themeName, 7 | isCollapse: state => state.common.isCollapse, 8 | isLock: state => state.common.isLock, 9 | isFullScren: state => state.common.isFullScren, 10 | lockPasswd: state => state.common.lockPasswd, 11 | tagList: state => state.tags.tagList, 12 | tagCurrent: state => state.tags.tagCurrent, 13 | tagWel: state => state.tags.tagWel, 14 | token: state => state.user.token, 15 | roles: state => state.user.roles, 16 | permission: state => state.user.permission, 17 | menu: state => state.user.menu, 18 | menuAll: state => state.user.menuAll, 19 | errLog: state => state.errLog.errLog, 20 | } 21 | export default getters -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import user from './modules/user' 4 | import common from './modules/common' 5 | import tags from './modules/tags' 6 | import admin from './modules/admin' 7 | import errLog from './modules/errLog' 8 | import getters from './getters' 9 | 10 | Vue.use(Vuex) 11 | const store = new Vuex.Store({ 12 | modules: { 13 | user, 14 | common, 15 | errLog, 16 | admin, 17 | tags 18 | }, 19 | getters, 20 | }) 21 | 22 | export default store 23 | -------------------------------------------------------------------------------- /src/store/modules/admin.js: -------------------------------------------------------------------------------- 1 | import { getUserData, getRoleData } from '@/api/admin' 2 | const user = { 3 | state: { 4 | 5 | }, 6 | actions: { 7 | GetUserData({ commit, state, dispatch }, page) { 8 | return new Promise((resolve, reject) => { 9 | getUserData(page).then(res => { 10 | const data = res.data; 11 | resolve(data); 12 | }) 13 | }) 14 | }, 15 | GetRoleData({ commit, state, dispatch }, page) { 16 | return new Promise((resolve, reject) => { 17 | getRoleData(page).then(res => { 18 | const data = res.data; 19 | resolve(data); 20 | }) 21 | }) 22 | }, 23 | 24 | }, 25 | mutations: { 26 | 27 | } 28 | 29 | } 30 | export default user -------------------------------------------------------------------------------- /src/store/modules/errLog.js: -------------------------------------------------------------------------------- 1 | import { setStore, getStore } from '@/util/store' 2 | const errLog = { 3 | state: { 4 | errLog: getStore({ name: 'errLog' }) || [], 5 | }, 6 | mutations: { 7 | ADD_LOG: (state, log) => { 8 | state.errLog.push(log) 9 | setStore({ name: 'errLog', content: state.errLog }) 10 | }, 11 | CLEAR_ALL_LOG: (state, action) => { 12 | state.errLog = []; 13 | setStore({ name: 'errLog', content: state.errLog }) 14 | } 15 | } 16 | 17 | }; 18 | 19 | export default errLog; -------------------------------------------------------------------------------- /src/store/modules/tags.js: -------------------------------------------------------------------------------- 1 | import { setStore, getStore, removeStore } from '@/util/store' 2 | import { validatenull } from "@/util/validate" 3 | const tagObj = { 4 | label: '', 5 | value: '', 6 | query: '', 7 | num: '', 8 | close: true, 9 | } 10 | function setFistTag(list) { 11 | if (list.length == 1) { 12 | list[0].close = false; 13 | } else { 14 | list.some(a => { 15 | a.close = true 16 | }) 17 | } 18 | return list; 19 | 20 | } 21 | const navs = { 22 | state: { 23 | tagList: getStore({ name: 'tagList' }) || [], 24 | tag: getStore({ name: 'tag' }) || tagObj, 25 | tagWel: { 26 | label: "首页", 27 | value: "/wel/index" 28 | }, 29 | tagCurrent: getStore({ name: 'tagCurrent' }) || [], 30 | }, 31 | actions: { 32 | 33 | }, 34 | mutations: { 35 | ADD_TAG: (state, action) => { 36 | state.tag = action; 37 | setStore({ name: 'tag', content: state.tag, type: 'session' }) 38 | if (state.tagList.some(a => a.value === action.value)) return 39 | state.tagList.push({ 40 | label: action.label, 41 | value: action.value, 42 | query: action.query, 43 | }) 44 | state.tagList = setFistTag(state.tagList); 45 | setStore({ name: 'tagList', content: state.tagList, type: 'session' }) 46 | }, 47 | SET_TAG_CURRENT: (state, tagCurrent) => { 48 | state.tagCurrent = tagCurrent; 49 | setStore({ name: 'tagCurrent', content: state.tagCurrent, type: 'session' }) 50 | }, 51 | SET_TAG: (state, value) => { 52 | state.tagList.forEach((ele, num) => { 53 | if (ele.value === value) { 54 | state.tag = state.tagList[num]; 55 | setStore({ name: 'tag', content: state.tag, type: 'session' }) 56 | } 57 | }); 58 | }, 59 | DEL_ALL_TAG: (state, action) => { 60 | state.tag = tagObj; 61 | state.tagList = []; 62 | state.tagList.push(state.tagWel); 63 | removeStore({ name: 'tag' }); 64 | removeStore({ name: 'tagList' }); 65 | }, 66 | DEL_TAG_OTHER: (state, action) => { 67 | state.tagList.forEach((ele, num) => { 68 | if (ele.value === state.tag.value) { 69 | state.tagList = state.tagList.slice(num, num + 1) 70 | state.tag = state.tagList[0]; 71 | state.tagList[0].close = false; 72 | setStore({ name: 'tag', content: state.tag, type: 'session' }) 73 | setStore({ name: 'tagList', content: state.tagList, type: 'session' }) 74 | } 75 | }) 76 | 77 | }, 78 | DEL_TAG: (state, action) => { 79 | state.tagList.forEach((ele, num) => { 80 | if (ele.value === action.value) { 81 | state.tagList.splice(num, 1) 82 | state.tagList = setFistTag(state.tagList); 83 | setStore({ name: 'tag', content: state.tag, type: 'session' }) 84 | setStore({ name: 'tagList', content: state.tagList, type: 'session' }) 85 | } 86 | }) 87 | }, 88 | } 89 | } 90 | export default navs -------------------------------------------------------------------------------- /src/styles/animate/vue-transition.scss: -------------------------------------------------------------------------------- 1 | // 过渡动画 横向渐变 2 | .fade-transverse-leave-active, 3 | .fade-transverse-enter-active { 4 | transition: all .5s; 5 | } 6 | 7 | .fade-transverse-enter { 8 | opacity: 0; 9 | transform: translateX(-30px); 10 | } 11 | 12 | .fade-transverse-leave-to { 13 | opacity: 0; 14 | transform: translateX(30px); 15 | } 16 | 17 | // 过渡动画 缩放渐变 18 | .fade-scale-leave-active, 19 | .fade-scale-enter-active { 20 | transition: all .5s; 21 | } 22 | 23 | .fade-scale-enter { 24 | opacity: 0; 25 | transform: scale(1.2); 26 | } 27 | 28 | .fade-scale-leave-to { 29 | opacity: 0; 30 | transform: scale(0.8); 31 | } -------------------------------------------------------------------------------- /src/styles/common.scss: -------------------------------------------------------------------------------- 1 | .anticon { 2 | vertical-align: middle; 3 | margin-right: 5px; 4 | width: 24px; 5 | text-align: center; 6 | font-size: 18px; 7 | } 8 | 9 | // 全局变量 10 | @import './variables.scss'; 11 | // ele样式覆盖 12 | @import './element-ui.scss'; 13 | // 顶部右侧显示 14 | @import './top.scss'; 15 | // 导航标签 16 | @import './tags.scss'; 17 | // 工具类函数 18 | @import './mixin.scss'; 19 | // 侧面导航栏 20 | @import './sidebar.scss'; 21 | // 动画 22 | @import './animate/vue-transition.scss'; 23 | //主题 24 | @import './theme/star.scss'; 25 | .h1, 26 | .h2, 27 | .h3, 28 | .h4, 29 | .h5, 30 | .h6, 31 | h1, 32 | h2, 33 | h3, 34 | h4, 35 | h5, 36 | h6 { 37 | font-weight: 500; 38 | } 39 | 40 | @include scrollBar(); 41 | body, 42 | div, 43 | dl, 44 | dt, 45 | dd, 46 | ul, 47 | ol, 48 | li, 49 | h1, 50 | h2, 51 | h3, 52 | h4, 53 | h5, 54 | h6, 55 | pre, 56 | form, 57 | fieldset, 58 | input, 59 | p, 60 | blockquote, 61 | th, 62 | td { 63 | margin: 0; 64 | padding: 0; 65 | } 66 | 67 | body { 68 | font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei"; 69 | line-height: 2; 70 | } 71 | 72 | html, 73 | body { 74 | height: 100%; 75 | } 76 | 77 | fieldset, 78 | img { 79 | border: 0; 80 | } 81 | 82 | ol, 83 | ul { 84 | list-style: none; 85 | } 86 | 87 | em { 88 | font-style: normal; 89 | } 90 | 91 | input, 92 | button, 93 | select, 94 | textarea { 95 | outline: none; 96 | } 97 | 98 | textarea { 99 | resize: none; 100 | } 101 | 102 | //禁用了文本的拖拉,尤其在谷歌下 103 | p { 104 | text-align: justify; 105 | text-justify: distribute; 106 | } 107 | 108 | //为了使文本段落左右两边对齐 109 | p { 110 | word-wrap: break-word 111 | } 112 | 113 | a { 114 | text-decoration: none; 115 | } 116 | 117 | i { 118 | display: inline-block; 119 | } 120 | 121 | 122 | /*a:hover { color: #f60; text-decoration:none; }*/ 123 | 124 | address, 125 | cite, 126 | code, 127 | em, 128 | th { 129 | font-weight: normal; 130 | font-style: normal; 131 | } 132 | 133 | a { 134 | color: inherit; 135 | text-decoration: none; 136 | display: inline-block; 137 | } 138 | 139 | 140 | /*a:link{color:#009;}*/ 141 | 142 | 143 | /*a:visited{color:#800080;}*/ 144 | 145 | a:hover, 146 | a:active, 147 | a:focus { 148 | text-decoration: underline; 149 | } 150 | 151 | table { 152 | border-collapse: collapse; 153 | border-spacing: 0; 154 | } 155 | 156 | .hidden { 157 | display: none; 158 | } 159 | 160 | .padding { 161 | padding: 0 !important; 162 | } 163 | 164 | .margin { 165 | margin: 0 !important; 166 | } 167 | 168 | .pull-right { 169 | float: right !important; 170 | ; 171 | } 172 | 173 | .pull-left { 174 | float: left !important; 175 | } 176 | 177 | .pull-center { 178 | text-align: center; 179 | } 180 | 181 | .pull-flex { 182 | display: flex; 183 | } 184 | 185 | .pull-overflow { 186 | overflow: hidden; 187 | } 188 | 189 | .pull-auto { 190 | height: auto; 191 | overflow: hidden; 192 | } 193 | 194 | .pull-height { 195 | height: 100%; 196 | overflow: hidden; 197 | } 198 | 199 | .pull-fixed { 200 | position: fixed; 201 | left: 0; 202 | top: 0; 203 | } 204 | 205 | .text-white { 206 | color: #fff; 207 | } 208 | -------------------------------------------------------------------------------- /src/styles/echarts/echart_style.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/echarts/echart_style.scss -------------------------------------------------------------------------------- /src/styles/element-ui.scss: -------------------------------------------------------------------------------- 1 | .el-dropdown-menu__item { 2 | font-size: 12px; 3 | line-height: 28px; 4 | } 5 | 6 | .el-menu--horizontal { 7 | border-bottom: none !important; 8 | } 9 | 10 | .el-menu { 11 | border-right: none !important; 12 | } 13 | 14 | .el-menu--display, 15 | .el-menu--display+.el-submenu__icon-arrow { 16 | display: none; 17 | } 18 | 19 | .el-dropdown-menu__item--divided:before, 20 | .el-menu, 21 | .el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, 22 | .el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, 23 | .el-menu--horizontal>.el-submenu .el-submenu__title:hover { 24 | background-color: transparent; 25 | } -------------------------------------------------------------------------------- /src/styles/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/styles/fonts/Simple-Line-Icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/Simple-Line-Icons.eot -------------------------------------------------------------------------------- /src/styles/fonts/Simple-Line-Icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/Simple-Line-Icons.ttf -------------------------------------------------------------------------------- /src/styles/fonts/Simple-Line-Icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/Simple-Line-Icons.woff -------------------------------------------------------------------------------- /src/styles/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/styles/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/styles/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/styles/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/styles/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/styles/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/styles/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/iconfont.eot -------------------------------------------------------------------------------- /src/styles/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/iconfont.ttf -------------------------------------------------------------------------------- /src/styles/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/iconfont.woff -------------------------------------------------------------------------------- /src/styles/fonts/iconfont.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/iconfont.zip -------------------------------------------------------------------------------- /src/styles/fonts/iconfont/demo.css: -------------------------------------------------------------------------------- 1 | *{margin: 0;padding: 0;list-style: none;} 2 | /* 3 | KISSY CSS Reset 4 | 理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。 5 | 2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。 6 | 3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。 7 | 特色:1. 适应中文;2. 基于最新主流浏览器。 8 | 维护:玉伯, 正淳 9 | */ 10 | 11 | /** 清除内外边距 **/ 12 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ 13 | dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ 14 | pre, /* text formatting elements 文本格式元素 */ 15 | form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */ 16 | th, td /* table elements 表格元素 */ { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | /** 设置默认字体 **/ 22 | body, 23 | button, input, select, textarea /* for ie */ { 24 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif; 25 | } 26 | h1, h2, h3, h4, h5, h6 { font-size: 100%; } 27 | address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */ 28 | code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */ 29 | small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */ 30 | 31 | /** 重置列表元素 **/ 32 | ul, ol { list-style: none; } 33 | 34 | /** 重置文本格式元素 **/ 35 | a { text-decoration: none; } 36 | a:hover { text-decoration: underline; } 37 | 38 | 39 | /** 重置表单元素 **/ 40 | legend { color: #000; } /* for ie6 */ 41 | fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */ 42 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */ 43 | /* 注:optgroup 无法扶正 */ 44 | 45 | /** 重置表格元素 **/ 46 | table { border-collapse: collapse; border-spacing: 0; } 47 | 48 | /* 清除浮动 */ 49 | .ks-clear:after, .clear:after { 50 | content: '\20'; 51 | display: block; 52 | height: 0; 53 | clear: both; 54 | } 55 | .ks-clear, .clear { 56 | *zoom: 1; 57 | } 58 | 59 | .main {padding: 30px 100px;} 60 | .main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;} 61 | 62 | .helps{margin-top:40px;} 63 | .helps pre{ 64 | padding:20px; 65 | margin:10px 0; 66 | border:solid 1px #e7e1cd; 67 | background-color: #fffdef; 68 | overflow: auto; 69 | } 70 | 71 | .icon_lists li{ 72 | float:left; 73 | width: 100px; 74 | height:180px; 75 | text-align: center; 76 | } 77 | .icon_lists .icon{ 78 | font-size: 42px; 79 | line-height: 100px; 80 | margin: 10px 0; 81 | color:#333; 82 | -webkit-transition: font-size 0.25s ease-out 0s; 83 | -moz-transition: font-size 0.25s ease-out 0s; 84 | transition: font-size 0.25s ease-out 0s; 85 | 86 | } 87 | .icon_lists .icon:hover{ 88 | font-size: 100px; 89 | } 90 | -------------------------------------------------------------------------------- /src/styles/fonts/iconfont/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.eot?t=1470294453'); /* IE9*/ 4 | src: url('iconfont.eot?t=1470294453#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('iconfont.woff?t=1470294453') format('woff'), /* chrome, firefox */ 6 | url('iconfont.ttf?t=1470294453') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('iconfont.svg?t=1470294453#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family:"iconfont" !important; 12 | font-size:16px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -webkit-text-stroke-width: 0.2px; 16 | -moz-osx-font-smoothing: grayscale; 17 | } 18 | .ifont-add:before { content: "\e600"; } 19 | .ifont-arrowdown:before { content: "\e601"; } 20 | .ifont-arrowleft:before { content: "\e602"; } 21 | .ifont-arrowright:before { content: "\e603"; } 22 | .ifont-arrowup:before { content: "\e604"; } 23 | .ifont-disksave:before { content: "\e605"; } 24 | .ifont-folderopen:before { content: "\e606"; } 25 | .ifont-folder:before { content: "\e607"; } 26 | .ifont-link:before { content: "\e608"; } 27 | .ifont-redo:before { content: "\e609"; } 28 | .ifont-refresh:before { content: "\e60a"; } 29 | .ifont-run:before { content: "\e60b"; } 30 | .ifont-search:before { content: "\e60c"; } 31 | .ifont-selector:before { content: "\e60d"; } 32 | .ifont-undo:before { content: "\e60e"; } 33 | .ifont-compare:before { content: "\e60f"; } 34 | .ifont-component:before { content: "\e610"; } 35 | .ifont-datafilter:before { content: "\e611"; } 36 | .ifont-mapping:before { content: "\e612"; } 37 | .ifont-mappingnoborder:before { content: "\e613"; } 38 | .ifont-max:before { content: "\e614"; } 39 | .ifont-maxnoborder:before { content: "\e615"; } 40 | .ifont-mysqlin:before { content: "\e616"; } 41 | .ifont-mysqlout:before { content: "\e617"; } 42 | .ifont-oraclein:before { content: "\e618"; } 43 | .ifont-oracleout:before { content: "\e619"; } 44 | .ifont-sql:before { content: "\e61a"; } 45 | .ifont-sqlnoborder:before { content: "\e61b"; } 46 | .ifont-flow:before { content: "\e61c"; } 47 | .ifont-puzzle:before { content: "\e61d"; } 48 | -------------------------------------------------------------------------------- /src/styles/fonts/iconfont/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/iconfont/iconfont.eot -------------------------------------------------------------------------------- /src/styles/fonts/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /src/styles/fonts/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/src/styles/fonts/iconfont/iconfont.woff -------------------------------------------------------------------------------- /src/styles/mixin.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix { 2 | &:after { 3 | content: ""; 4 | display: table; 5 | clear: both; 6 | } 7 | } 8 | 9 | @mixin scrollBar { 10 | ::-webkit-scrollbar-track-piece { 11 | background-color: transparent; 12 | } 13 | ::-webkit-scrollbar { 14 | width: 7px; 15 | height: 7px; 16 | background-color: transparent; 17 | } 18 | ::-webkit-scrollbar-thumb { 19 | border-radius: 5px; 20 | background-color: hsla(220, 4%, 58%, .3); 21 | } 22 | } 23 | 24 | @mixin radius($width, $size, $color) { 25 | width: $width; 26 | height: $width; 27 | line-height: $width; 28 | border-radius: $width; 29 | text-align: center; 30 | border-width: $size; 31 | border-style: solid; 32 | border-color: $color; 33 | } 34 | 35 | @mixin relative { 36 | position: relative; 37 | width: 100%; 38 | height: 100%; 39 | } 40 | 41 | @mixin pct($pct) { 42 | width: #{$pct}; 43 | position: relative; 44 | margin: 0 auto; 45 | } 46 | 47 | @mixin triangle($width, $height, $color, $direction) { 48 | $width: $width/2; 49 | $color-border-style: $height solid $color; 50 | $transparent-border-style: $width solid transparent; 51 | height: 0; 52 | width: 0; 53 | @if $direction==up { 54 | border-bottom: $color-border-style; 55 | border-left: $transparent-border-style; 56 | border-right: $transparent-border-style; 57 | } 58 | @else if $direction==right { 59 | border-left: $color-border-style; 60 | border-top: $transparent-border-style; 61 | border-bottom: $transparent-border-style; 62 | } 63 | @else if $direction==down { 64 | border-top: $color-border-style; 65 | border-left: $transparent-border-style; 66 | border-right: $transparent-border-style; 67 | } 68 | @else if $direction==left { 69 | border-right: $color-border-style; 70 | border-top: $transparent-border-style; 71 | border-bottom: $transparent-border-style; 72 | } 73 | } -------------------------------------------------------------------------------- /src/styles/sidebar.scss: -------------------------------------------------------------------------------- 1 | .sidebar-container { 2 | background: #00142a; 3 | transition: width .6s; 4 | &.is-active{ 5 | width: 64px !important; 6 | } 7 | } 8 | .el-menu-item.is-active{ 9 | color: $mainBg !important; 10 | } 11 | .nest-menu .el-submenu>.el-submenu__title, 12 | .el-submenu .el-menu-item { 13 | background-color: #021d3a !important; 14 | &:hover{ 15 | background: #00142a !important; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/styles/tags.scss: -------------------------------------------------------------------------------- 1 | .tags-breadcrumb { 2 | display: flex; 3 | align-items: center; 4 | padding: 0 16px; 5 | height: 50px; 6 | } 7 | 8 | .tags-breadcrumb-list { 9 | padding: 0 15px; 10 | } 11 | 12 | .tag-collapse { 13 | font-size: 36px !important; 14 | } 15 | 16 | .tag-collapse.tag-collapse_right { 17 | transform: rotate(90deg); 18 | } 19 | 20 | .tags-container { 21 | position: relative; 22 | box-sizing: border-box; 23 | overflow: hidden; 24 | box-shadow: 0 1px 4px rgba(0, 21, 41, .08); 25 | .tags-box { 26 | position: relative; 27 | box-sizing: border-box; 28 | padding-right: 106px; 29 | width: 100%; 30 | height: 40px; 31 | } 32 | .tags-list { 33 | position: absolute; 34 | padding: 2px 10px; 35 | overflow: visible; 36 | white-space: nowrap; 37 | transition: left .3s ease; 38 | } 39 | .tag-item-icon { 40 | color: #eee; 41 | font-size: 11px !important; 42 | } 43 | .tag-item { 44 | position: relative; 45 | display: inline-block; 46 | height: 30px; 47 | line-height: 30px; 48 | margin: 2px 4px 2px 0; 49 | padding: 0 10px; 50 | border: 1px solid #eee; 51 | border-radius: 3px; 52 | color: #495060!important; 53 | font-size: 12px; 54 | vertical-align: middle; 55 | opacity: 1; 56 | overflow: hidden; 57 | cursor: pointer; 58 | &.is-active { 59 | .tag-item-icon { 60 | color: $mainBg; 61 | } 62 | border-color: $mainBg; 63 | } 64 | } 65 | .tag-text { 66 | margin-left: 8px; 67 | } 68 | .tag-close { 69 | margin-left: 8px; 70 | } 71 | .tag-item:hover { 72 | opacity: .85; 73 | } 74 | .tags-menu { 75 | position: absolute; 76 | top: 0; 77 | right: 0; 78 | display: flex; 79 | align-items: center; 80 | padding: 0 15px; 81 | height: 100%; 82 | box-sizing: border-box; 83 | background-color: #fff; 84 | box-shadow: -3px 0 15px 3px rgba(0, 0, 0, 0.1); 85 | } 86 | } 87 | 88 | .contextmenu { 89 | margin: 0; 90 | top: 64px; 91 | list-style-type: none; 92 | padding: 5px 0; 93 | border-radius: 4px; 94 | font-size: 12px; 95 | font-weight: 400; 96 | color: #333; 97 | box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3); 98 | li { 99 | margin: 0; 100 | height: 32px; 101 | line-height: 32px; 102 | padding: 0 15px; 103 | cursor: pointer; 104 | &:hover { 105 | background: #eee; 106 | } 107 | } 108 | } -------------------------------------------------------------------------------- /src/styles/theme/star.scss: -------------------------------------------------------------------------------- 1 | .theme-star { 2 | .avue-contail { 3 | background-image: url("/static/img/bg/star-squashed.jpeg"); 4 | background-size: 100% 100%; 5 | } 6 | .el-card { 7 | opacity: .9; 8 | } 9 | .top { 10 | .el-dropdown { 11 | color: #fff; 12 | i { 13 | color: #fff; 14 | } 15 | } 16 | .top-item { 17 | i { 18 | color: #fff; 19 | } 20 | } 21 | } 22 | .avue-tabs { 23 | padding: 0 20px !important; 24 | } 25 | .sidebar-container, 26 | .logo, 27 | .el-menu-item, 28 | .el-submenu__title, 29 | .el-menu { 30 | background-color: transparent !important 31 | } 32 | .logo_title, 33 | .tags-breadcrumb 34 | { 35 | color: #fff !important; 36 | i { 37 | color: #fff; 38 | } 39 | } 40 | .el-menu--horizontal>.el-menu-item.is-active { 41 | border-bottom: none; 42 | } 43 | .top { 44 | border-bottom: none; 45 | } 46 | .tags-menu { 47 | background-color: rgba(0, 0, 0, .6) !important; 48 | } 49 | .tag-item { 50 | color: #fff !important; 51 | border: none !important; 52 | background-color: rgba(255, 255, 255, .5); 53 | &.is-active { 54 | color: #fff !important; 55 | background-color: rgba(0, 0, 0, .4); 56 | .tag-item-icon { 57 | color: #fff !important; 58 | } 59 | } 60 | } 61 | .nest-menu .el-submenu>.el-submenu__title:hover, 62 | .el-submenu .el-menu-item:hover { 63 | background-color: rgba(0, 0, 0, .4) !important; 64 | } 65 | .el-menu-item { 66 | &.is-active, 67 | &.siderbar-active { 68 | background-color: rgba(0, 0, 0, .4) !important; 69 | span { 70 | color: #fff !important; 71 | } 72 | } 73 | color: #fff !important; 74 | i { 75 | color: #fff !important; 76 | } 77 | } 78 | .el-submenu__title { 79 | color: #fff !important; 80 | i { 81 | color: #fff !important; 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/styles/top.scss: -------------------------------------------------------------------------------- 1 | .top { 2 | align-items: center; 3 | border-bottom: 1px solid #eee; 4 | color: rgba(0, 0, 0, .65); 5 | display: flex; 6 | font-size: 18px; 7 | height: 64px; 8 | line-height: 1; 9 | padding: 0 10px; 10 | white-space: nowrap; 11 | } 12 | 13 | .top-title { 14 | overflow: hidden; 15 | text-overflow: ellipsis; 16 | white-space: nowrap; 17 | font-size: inherit; 18 | font-weight: 400; 19 | flex: 1; 20 | } 21 | 22 | .top-userImg { 23 | margin: 0 8px 0 10px; 24 | padding: 2px; 25 | width: 30px; 26 | height: 30px; 27 | border-radius: 100%; 28 | box-sizing: border-box; 29 | border: 1px solid #eee; 30 | } 31 | 32 | .top-button { 33 | display: flex; 34 | align-items: center; 35 | } 36 | 37 | .top-item { 38 | margin-right: 12px; 39 | } -------------------------------------------------------------------------------- /src/styles/variables.scss: -------------------------------------------------------------------------------- 1 | //main 2 | $mainBg: #409eff; 3 | -------------------------------------------------------------------------------- /src/util/auth.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | import store from '@/store' 3 | const TokenKey = 'x-access-token' 4 | 5 | export function getToken() { 6 | return Cookies.get(TokenKey) 7 | } 8 | 9 | export function setToken(token) { 10 | return Cookies.set(TokenKey, token) 11 | } 12 | 13 | export function removeToken() { 14 | return Cookies.remove(TokenKey) 15 | } 16 | -------------------------------------------------------------------------------- /src/util/date.js: -------------------------------------------------------------------------------- 1 | export const calcDate = (date1, date2) => { 2 | var date3 = date2 - date1; 3 | 4 | var days = Math.floor(date3 / (24 * 3600 * 1000)) 5 | 6 | var leave1 = date3 % (24 * 3600 * 1000) //计算天数后剩余的毫秒数 7 | var hours = Math.floor(leave1 / (3600 * 1000)) 8 | 9 | var leave2 = leave1 % (3600 * 1000) //计算小时数后剩余的毫秒数 10 | var minutes = Math.floor(leave2 / (60 * 1000)) 11 | 12 | var leave3 = leave2 % (60 * 1000) //计算分钟数后剩余的毫秒数 13 | var seconds = Math.round(date3 / 1000) 14 | return { 15 | days: days, 16 | hours: hours, 17 | minutes: minutes, 18 | seconds: seconds, 19 | } 20 | } -------------------------------------------------------------------------------- /src/util/store.js: -------------------------------------------------------------------------------- 1 | import { 2 | validatenull 3 | } from '@/util/validate'; 4 | /** 5 | * 存储localStorage 6 | */ 7 | export const setStore = (params) => { 8 | let { 9 | name, 10 | content, 11 | type, 12 | datetime 13 | } = params; 14 | let obj = { 15 | dataType: typeof(content), 16 | content: content, 17 | type: type, 18 | datetime: new Date().getTime() 19 | } 20 | if (type) window.sessionStorage.setItem(name, JSON.stringify(obj)); 21 | else window.localStorage.setItem(name, JSON.stringify(obj)); 22 | } 23 | /** 24 | * 获取localStorage 25 | */ 26 | 27 | export const getStore = (params) => { 28 | let { 29 | name, 30 | type, 31 | debug 32 | } = params; 33 | let obj = {}, 34 | content; 35 | obj = window.localStorage.getItem(name); 36 | if (validatenull(obj)) obj = window.sessionStorage.getItem(name); 37 | if (validatenull(obj)) return; 38 | obj = JSON.parse(obj); 39 | if (debug) { 40 | return obj; 41 | } 42 | if (obj.dataType == 'string') { 43 | content = obj.content; 44 | } else if (obj.dataType == 'number') { 45 | content = Number(obj.content); 46 | } else if (obj.dataType == 'boolean') { 47 | content = eval(obj.content); 48 | } else if (obj.dataType == 'object') { 49 | content = obj.content; 50 | } 51 | return content; 52 | } 53 | /** 54 | * 删除localStorage 55 | */ 56 | export const removeStore = params => { 57 | let { 58 | name 59 | } = params; 60 | window.localStorage.removeItem(name); 61 | window.sessionStorage.removeItem(name); 62 | } 63 | 64 | /** 65 | * 获取全部localStorage 66 | */ 67 | export const getAllStore = (params) => { 68 | let list = []; 69 | let { 70 | type 71 | } = params; 72 | for (let i = 1; i <= window.sessionStorage.length; i++) { 73 | if (type) { 74 | list.push({ 75 | name: window.sessionStorage.key(i), 76 | content: getStore({ 77 | name: window.sessionStorage.key(i), 78 | type: 'session' 79 | }) 80 | }) 81 | } else { 82 | list.push(getStore({ 83 | name: window.localStorage.key(i), 84 | content: getStore({ 85 | name: window.localStorage.key(i), 86 | }) 87 | })) 88 | } 89 | } 90 | 91 | return list; 92 | 93 | } 94 | 95 | /** 96 | * 清空全部localStorage 97 | */ 98 | export const clearStore = (params) => { 99 | let { 100 | type 101 | } = params; 102 | if (type) { 103 | window.sessionStorage.clear(); 104 | return 105 | } 106 | window.localStorage.clear() 107 | } -------------------------------------------------------------------------------- /src/views/echarts/index.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 66 | 72 | -------------------------------------------------------------------------------- /static/cdn/element-ui/2.4.0/theme-chalk/fonts/element-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/cdn/element-ui/2.4.0/theme-chalk/fonts/element-icons.ttf -------------------------------------------------------------------------------- /static/cdn/element-ui/2.4.0/theme-chalk/fonts/element-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/cdn/element-ui/2.4.0/theme-chalk/fonts/element-icons.woff -------------------------------------------------------------------------------- /static/cdn/iconfont/1.0.0/index.css: -------------------------------------------------------------------------------- 1 | 2 | [class^="icon-"]{ 3 | font-family: "iconfont" !important; 4 | /* 以下内容参照第三方图标库本身的规则 */ 5 | font-size: 18px !important; 6 | font-style: normal; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | .el-menu-item [class^=icon-] { 11 | margin-right: 5px; 12 | width: 24px; 13 | text-align: center; 14 | font-size: 18px; 15 | vertical-align: middle; 16 | } 17 | .el-submenu [class^=icon-] { 18 | vertical-align: middle; 19 | margin-right: 5px; 20 | width: 24px; 21 | text-align: center; 22 | font-size: 18px; 23 | } 24 | -------------------------------------------------------------------------------- /static/img/bg/star-squashed.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/img/bg/star-squashed.jpeg -------------------------------------------------------------------------------- /static/img/code/qq-code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/img/code/qq-code.jpg -------------------------------------------------------------------------------- /static/img/code/wechat-code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/img/code/wechat-code.jpg -------------------------------------------------------------------------------- /static/img/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/img/login.png -------------------------------------------------------------------------------- /static/img/mock/card/card-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/img/mock/card/card-1.jpg -------------------------------------------------------------------------------- /static/img/mock/card/card-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/img/mock/card/card-2.jpg -------------------------------------------------------------------------------- /static/img/mock/card/card-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/img/mock/card/card-3.jpg -------------------------------------------------------------------------------- /static/img/mock/card/card-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/img/mock/card/card-4.jpg -------------------------------------------------------------------------------- /static/util/screen/guge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/util/screen/guge.png -------------------------------------------------------------------------------- /static/util/screen/huohu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggYolkPie/vue-cli-default/5a16668014e51fa82766ee5636b08a015829f1fe/static/util/screen/huohu.png -------------------------------------------------------------------------------- /static/util/screen/screen.css: -------------------------------------------------------------------------------- 1 | .el-tip { 2 | position: fixed; 3 | left: 50%; 4 | top: 50%; 5 | width: 500px; 6 | padding: 8px 16px; 7 | margin: 0; 8 | margin-left: -250px; 9 | margin-top: -60px; 10 | box-sizing: border-box; 11 | border-radius: 4px; 12 | position: relative; 13 | background-color: #fff; 14 | overflow: hidden; 15 | opacity: 1; 16 | display: flex; 17 | align-items: center; 18 | transition: opacity .2s; 19 | } 20 | 21 | .el-tip--warning { 22 | background-color: #fdf6ec; 23 | color: #e6a23c; 24 | } 25 | 26 | .el-tip__title { 27 | line-height: 18px; 28 | } 29 | .el-tip_img img{ 30 | width: 80px; 31 | height: 80px; 32 | } -------------------------------------------------------------------------------- /static/util/screen/screen.js: -------------------------------------------------------------------------------- 1 | function util() { 2 | this.flag = true; 3 | var body = document.body; 4 | var safe = this; 5 | var validVersion = function () { 6 | var browser = navigator.appName 7 | var b_version = navigator.appVersion 8 | var version = b_version.split(";"); 9 | var trim_Version = version[1].replace(/[ ]/g, ""); 10 | if (trim_Version == 'WOW64') { 11 | safe.flag = false 12 | } else if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE6.0") { 13 | safe.flag = false 14 | } 15 | else if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE7.0") { 16 | safe.flag = false 17 | } 18 | else if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE8.0") { 19 | safe.flag = false 20 | } 21 | else if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE9.0") { 22 | safe.flag = false 23 | } 24 | } 25 | this.setBody = function () { 26 | var str = '
' + 27 | '
' + 28 | '' + 29 | '您乘坐的浏览器版本太低了,你可以把浏览器从兼容模式调到极速模式' + 30 | '
实在不行就换浏览器吧;' + 31 | '
' + 32 | '
' + 33 | '' + 34 | '' + 35 | '
' + 36 | '
' + 37 | '
'; 38 | body.innerHTML = str + body.innerHTML 39 | } 40 | this.init = function () { 41 | validVersion();//检测浏览器的版本 42 | return this; 43 | } 44 | } 45 | 46 | var creen = new util().init(); 47 | var flag = creen.flag; 48 | if (!flag) { 49 | creen.setBody(); 50 | } -------------------------------------------------------------------------------- /test/unit/karma.conf.js: -------------------------------------------------------------------------------- 1 | var webpackConfig = require('../../build/webpack.test.conf') 2 | 3 | module.exports = function (config) { 4 | config.set({ 5 | // 浏览器 6 | browsers: ['PhantomJS'], 7 | // 测试框架 8 | frameworks: ['mocha', 'sinon-chai', 'phantomjs-shim'], 9 | // 测试报告 10 | reporters: ['spec', 'coverage'], 11 | // 测试入口文件 12 | files: ['./index.js'], 13 | // 预处理器 karma-webpack 14 | preprocessors: { 15 | './index.js': ['webpack', 'sourcemap'] 16 | }, 17 | // Webpack配置 18 | webpack: webpackConfig, 19 | // Webpack中间件 20 | webpackMiddleware: { 21 | noInfo: true 22 | }, 23 | // 测试覆盖率报告 24 | // https://github.com/karma-runner/karma-coverage/blob/master/docs/configuration.md 25 | coverageReporter: { 26 | dir: './coverage', 27 | reporters: [ 28 | { type: 'lcov', subdir: '.' }, 29 | { type: 'text-summary' } 30 | ] 31 | } 32 | }) 33 | } -------------------------------------------------------------------------------- /test/unit/specs/Hello.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' // 导入Vue用于生成Vue实例 2 | import Hello from '@/components/Hello' // 导入组件 3 | // 测试脚本里面应该包括一个或多个describe块,称为测试套件(test suite) 4 | describe('Hello.vue', () => { 5 | // 每个describe块应该包括一个或多个it块,称为测试用例(test case) 6 | it('should render correct contents', () => { 7 | const Constructor = Vue.extend(Hello) // 获得Hello组件实例 8 | const vm = new Constructor().$mount() // 将组件挂在到DOM上 9 | //断言:DOM中class为hello的元素中的h1元素的文本内容为Welcome to Your Vue.js App 10 | expect(vm.$el.querySelector('.hello h1').textContent) 11 | .to.equal('Welcome to Your Vue.js App') 12 | }) 13 | }) -------------------------------------------------------------------------------- /tools/app.js: -------------------------------------------------------------------------------- 1 | const cc = require('conventional-changelog') 2 | const fs = require('fs') 3 | const ph = require('path') 4 | const inquirer = require('inquirer') 5 | const curVersion = require('../package.json').version 6 | const filePath = './src/views'; 7 | const tempPath = './tools/temp'; 8 | const validate = require('./util/validate') 9 | const release = async () => { 10 | console.log(`Current version: ${curVersion}`) 11 | const { 12 | name 13 | } = await inquirer.prompt([{ 14 | name: 'name', 15 | message: `请输入模板名称?`, 16 | type: 'input', 17 | validate: function (input) { 18 | var done = this.async(); 19 | if (validate.validatenull(input)) { 20 | done('模板名称不能为空'); 21 | return; 22 | } 23 | done(null, true); 24 | } 25 | }]) 26 | 27 | const { 28 | path 29 | } = await inquirer.prompt([{ 30 | name: 'path', 31 | message: `请输入接口路径(/admin/user)?`, 32 | type: 'input', 33 | validate: function (input) { 34 | var done = this.async(); 35 | if (validate.validatenull(input)) { 36 | done('接口路径不能为空'); 37 | return; 38 | } 39 | done(null, true); 40 | } 41 | }]) 42 | 43 | const { 44 | dic 45 | } = await inquirer.prompt([{ 46 | name: 'dic', 47 | message: `请输入字典集合(用,隔开)?`, 48 | type: 'input' 49 | }]) 50 | 51 | const { 52 | id 53 | } = await inquirer.prompt([{ 54 | name: 'id', 55 | default: 'id', 56 | message: `请输入主键ID(默认为id)?`, 57 | type: 'input', 58 | }]) 59 | 60 | let content = [{ 61 | title: 'api.js', 62 | list: ['path'], 63 | value: '', 64 | }, 65 | { 66 | title: 'index.vue', 67 | list: ['name', 'id'], 68 | value: '', 69 | }, 70 | { 71 | title: 'option.js', 72 | list: ['dic'], 73 | value: '', 74 | } 75 | ] 76 | 77 | 78 | const mkdirPath = `${filePath}/${name}`; 79 | if (!fs.existsSync(mkdirPath)) { 80 | fs.mkdirSync(mkdirPath); 81 | } 82 | 83 | content.forEach(ele => { 84 | ele.value = fs.readFileSync(`${tempPath}/${ele.title}`, "utf-8"); 85 | ele.list.forEach(param => { 86 | ele.value = ele.value.replace(new RegExp(`{{${param}}}`, "ig"), eval(param)); 87 | }) 88 | fs.createWriteStream(`${mkdirPath}/${ele.title}`); 89 | fs.writeFileSync(`${mkdirPath}/${ele.title}`, ele.value); 90 | }) 91 | 92 | console.log('模板生成完成'); 93 | 94 | 95 | 96 | } 97 | release().catch(err => { 98 | console.error(err) 99 | process.exit(1) 100 | }) 101 | -------------------------------------------------------------------------------- /tools/temp/api.js: -------------------------------------------------------------------------------- 1 | import request from '@/router/axios' 2 | 3 | const path = '{{path}}'; 4 | export function getList(query) { 5 | return request({ 6 | url: `${path}/page`, 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | export function addObj(obj) { 13 | return request({ 14 | url: `${path}`, 15 | method: 'post', 16 | data: obj 17 | }) 18 | } 19 | 20 | export function delObj(id) { 21 | return request({ 22 | url: `${path}/${id}`, 23 | method: 'delete' 24 | }) 25 | } 26 | 27 | export function putObj(obj) { 28 | return request({ 29 | url: `${path}`, 30 | method: 'put', 31 | data: obj 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /tools/temp/option.js: -------------------------------------------------------------------------------- 1 | export default { 2 | height:'auto', 3 | index: true, 4 | indexLabel:'序号' 5 | border: true, 6 | stripe: true, 7 | selection: true, 8 | menuWidth: 300, 9 | menuAlign: 'center', 10 | editBtn: false, 11 | delBtn: false, 12 | align: 'center', 13 | dic: '{{dic}}', 14 | column: [] 15 | }; 16 | -------------------------------------------------------------------------------- /tools/util/validate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 判断是否为空 3 | */ 4 | module.exports.validatenull = (val) => { 5 | if (typeof val == 'boolean') { 6 | return false; 7 | } 8 | if (val instanceof Array) { 9 | if (val.length == 0) return true; 10 | } else if (val instanceof Object) { 11 | if (JSON.stringify(val) === '{}') return true; 12 | } else { 13 | if (val == 'null' || val == null || val == 'undefined' || val == undefined || val == '') return true; 14 | return false; 15 | } 16 | return false; 17 | }; 18 | --------------------------------------------------------------------------------