diff --git a/.babelrc b/.babelrc deleted file mode 100755 index 3a280ba3..00000000 --- a/.babelrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "presets": [ - ["env", { - "modules": false, - "targets": { - "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] - } - }], - "stage-2" - ], - "plugins": ["transform-vue-jsx", "transform-runtime"] -} diff --git a/.editorconfig b/.editorconfig deleted file mode 100755 index 9d08a1a8..00000000 --- a/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/.eslintignore b/.eslintignore deleted file mode 100755 index ff3710d8..00000000 --- a/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -/build/ -/config/ -/dist/ -/*.js -/src/plugin/vue-bigdata-table -/src/pages/demo/charts diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100755 index 2e2e2118..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,25 +0,0 @@ -// https://eslint.org/docs/user-guide/configuring - -module.exports = { - root: true, - parser: 'babel-eslint', - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - }, - // https://github.com/standard/standard/blob/master/docs/RULES-en.md - extends: 'standard', - // required to lint *.vue files - plugins: [ - 'html' - ], - // add your custom rules here - rules: { - // allow async-await - 'generator-star-spacing': 'off', - // allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' - } -} diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 3dc5abc8..00000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.css linguist-language=JavaScript \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100755 index 34db77c9..00000000 --- a/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -.DS_Store -node_modules/ -/dist/ -npm-debug.log* -yarn-debug.log* -yarn-error.log* -*.sketch -/docs/.vuepress/dist/ - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -other -package-lock.json -design diff --git a/.postcssrc.js b/.postcssrc.js deleted file mode 100755 index 249472da..00000000 --- a/.postcssrc.js +++ /dev/null @@ -1,9 +0,0 @@ -// https://github.com/michael-ciniawsky/postcss-load-config - -module.exports = { - "plugins": { - // to edit target browsers: use "browserslist" field in package.json - "postcss-import": {}, - "autoprefixer": {} - } -} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..14a86455 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "files.exclude": {} +} \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 4b66e078..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 李杨 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100755 index 45b12c9f..00000000 --- a/README.md +++ /dev/null @@ -1,101 +0,0 @@ -D2Admin 是一个开源的管理系统前端集成方案,为了方便开发者快速进行管理系统开发而设计 - -## 仓库和文档 - -本项目仓库在 Github 和 Gitee 同步发布 - -[中文文档](http://d2admin.fairyever.com/zh/) - -**完整版** - -[Github 仓库](https://github.com/d2-projects/d2-admin) | -[码云仓库](https://gitee.com/fairyever/d2-admin) | -[预览地址](https://fairyever.gitee.io/d2-admin-preview) - -**简化版模板** - -[Github 仓库](https://github.com/d2-projects/d2-admin-start-kit) | -[码云仓库](https://gitee.com/fairyever/d2-admin-start-kit) | -[预览地址](https://fairyever.gitee.io/d2-admin-start-kit-preview/#/index) - -因为现在集成了很多的插件和组件,首次加载会占用很多的时间,虽然已经做了首屏加载动画,但还是建议您在发布之前一定要删除没有用到的代码,比如项目没有用到图表、示例、插件组件 - - - -## 功能 - -* 首屏加载等待动画 避免首次加载白屏尴尬 -* 简约主题 -* 每个插件和组件都配有介绍文档 -* 图片资源 sketch 源文件( 可以在这个文件内重新生成所有图片资源 ) -* 登陆和注销 -* 根据路由自动生成菜单 -* 可折叠侧边栏 -* 方便的菜单设置 -* 多国语言支持 -* 富文本编辑器 -* Markdown 编辑器 -* 全屏功能 -* Fontawesome 图标库 -* 图标选择器(组件) -* 自动引入下载的 SVG 图标 -* 前端假数据支持( mock ) -* 集成蚂蚁金服出品的 G2 图表 -* 图表自适应可拖拽大小的卡片容器(示例) -* 简化剪贴板操作 -* 简化Cookie操作 -* 时间日期计算工具 -* 导入 Excel ( xlsx 格式 + csv 格式 ) -* 数据导出 Excel ( xlsx 格式 + csv 格式 ) -* 数据导出文本 -* 数字动画 -* 可拖拽调整大小的切分布局 -* 可拖拽调整大小和位置的网格布局 -* 提供三种方便的页面容器组件(正常卡片,隐形容器,填满页面) -* 代码高亮显示 -* 加载并解析(或者直接指定资源) markdown 文件 -* GitHub 样式的 markdown 显示组件 -* markdown 内代码高亮 -* 为 markdown 扩展了百度云链接解析和优化显示 -* 右键菜单组件 -* 自定义滚动条和滚动控制 -* 内置5种主题 -* 公用样式抽离,方便的主题定制 -* 支持百万级数据量的表格组件 -* 打包后随意目录部署(已经做好兼容设置) -* 支持临时菜单配置 -* 提供“试验台”功能 方便展示系统功能调用方法 `1.1.4 +` -* 多标签页模式 `1.1.4 +` -* 美化滚动条 `1.1.4 +` -* 持久化存储 `1.1.4 +` - -## 加入小组 - -D2Admin 是完全开源免费的管理系统集成方案,由 [FairyEver](https://github.com/FairyEver) 在工作之余完全由兴趣驱动完成,如果你也一样喜欢前端开发,欢迎加入我们的讨论/学习群,群内可以`提问答疑`,`分享学习资料`或者随便扯淡 - - - -## 获取代码 - -有两种方式可以获得 D2Admin 的代码 - -* 在 [releases](https://github.com/d2-projects/d2-admin/releases) 页面下载最新的发行版。发行版一般是完成了某个大升级或者修复重要 bug 后发布的压缩包,你可以下载下来直接使用 - -* Fork 仓库到你的 github 然后克隆到本地,然后使用 master 分支继续你的开发。这种方式得到的是最新的代码,但是会有未完成的新功能。**不建议使用这种方式** - -* 由于 github 访问较慢,推荐前往码云仓库下载 [gitee.com/fairyever/d2-admin](https://gitee.com/fairyever/d2-admin),码云上的仓库**在每次发布版本才会更新**,所以如果你选择此方法,请直接 fork 仓库并克隆到本地 - -> 码云的仓库由 github 同步,但是发行版和标签同步有一些问题,所以推荐直接 fork 仓库 - -## 觉得不错 赏个咖啡 让作者打起精神 ~ - - - - -更多介绍和使用方法见 [文档](http://d2admin.fairyever.com/zh/) - -## 朋友的开源项目 - -* [avue](https://github.com/nmxiaowei/avue) - - \ No newline at end of file diff --git a/build/build.js b/build/build.js deleted file mode 100755 index 193ed055..00000000 --- a/build/build.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict' -// 检查依赖版本 -require('./check-versions')() - -// 设置 NODE_ENV -process.env.NODE_ENV = 'production' - -// loading模块 https://www.npmjs.com/package/ora -const ora = require('ora') -// 删除模块 https://www.npmjs.com/package/rimraf -const rm = require('rimraf') -// path -const path = require('path') -// 输出彩色的文字 https://www.npmjs.com/package/chalk -const chalk = require('chalk') -// webpack -const webpack = require('webpack') -// 设置 这个文件里只用到了 config.build -const config = require('../config') -// webpack 生产环境的核心配置文件 -const webpackConfig = require('./webpack.prod.conf') - -// 定义一个 loading 并开始 -const spinner = ora('building for production...') -spinner.start() - -rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { - if (err) throw err - webpack(webpackConfig, (err, stats) => { - spinner.stop() - if (err) throw err - process.stdout.write(stats.toString({ - colors: true, - modules: false, - children: false, // if you are using ts-loader, setting this to true will make tyescript errors show up during build - chunks: false, - chunkModules: false - }) + '\n\n') - - if (stats.hasErrors()) { - console.log(chalk.red(' Build failed with errors.\n')) - process.exit(1) - } - - console.log(chalk.cyan(' Build complete.\n')) - console.log(chalk.yellow( - ' Tip: built files are meant to be served over an HTTP server.\n' + - ' Opening index.html over file:// won\'t work.\n' - )) - }) -}) diff --git a/build/check-versions.js b/build/check-versions.js deleted file mode 100755 index 3ef972a0..00000000 --- a/build/check-versions.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict' -const chalk = require('chalk') -const semver = require('semver') -const packageConfig = require('../package.json') -const shell = require('shelljs') - -function exec (cmd) { - return require('child_process').execSync(cmd).toString().trim() -} - -const versionRequirements = [ - { - name: 'node', - currentVersion: semver.clean(process.version), - versionRequirement: packageConfig.engines.node - } -] - -if (shell.which('npm')) { - versionRequirements.push({ - name: 'npm', - currentVersion: exec('npm --version'), - versionRequirement: packageConfig.engines.npm - }) -} - -module.exports = function () { - const warnings = [] - - for (let i = 0; i < versionRequirements.length; i++) { - const mod = versionRequirements[i] - - if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { - warnings.push(mod.name + ': ' + - chalk.red(mod.currentVersion) + ' should be ' + - chalk.green(mod.versionRequirement) - ) - } - } - - if (warnings.length) { - console.log('') - console.log(chalk.yellow('To use this template, you must update following to modules:')) - console.log() - - for (let i = 0; i < warnings.length; i++) { - const warning = warnings[i] - console.log(' ' + warning) - } - - console.log() - process.exit(1) - } -} diff --git a/build/utils.js b/build/utils.js deleted file mode 100755 index e534fb0f..00000000 --- a/build/utils.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict' -const path = require('path') -const config = require('../config') -const ExtractTextPlugin = require('extract-text-webpack-plugin') -const packageConfig = require('../package.json') - -exports.assetsPath = function (_path) { - const assetsSubDirectory = process.env.NODE_ENV === 'production' - ? config.build.assetsSubDirectory - : config.dev.assetsSubDirectory - - return path.posix.join(assetsSubDirectory, _path) -} - -exports.cssLoaders = function (options) { - options = options || {} - - const cssLoader = { - loader: 'css-loader', - options: { - sourceMap: options.sourceMap - } - } - - const postcssLoader = { - loader: 'postcss-loader', - options: { - sourceMap: options.sourceMap - } - } - - // generate loader string to be used with extract text plugin - function generateLoaders (loader, loaderOptions) { - const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] - - if (loader) { - loaders.push({ - loader: loader + '-loader', - options: Object.assign({}, loaderOptions, { - sourceMap: options.sourceMap - }) - }) - } - - // Extract CSS when that option is specified - // (which is the case during production build) - if (options.extract) { - return ExtractTextPlugin.extract({ - use: loaders, - fallback: 'vue-style-loader' - }) - } else { - return ['vue-style-loader'].concat(loaders) - } - } - - // https://vue-loader.vuejs.org/en/configurations/extract-css.html - return { - css: generateLoaders(), - postcss: generateLoaders(), - less: generateLoaders('less'), - sass: generateLoaders('sass', { indentedSyntax: true }), - scss: generateLoaders('sass'), - stylus: generateLoaders('stylus'), - styl: generateLoaders('stylus') - } -} - -// Generate loaders for standalone style files (outside of .vue) -exports.styleLoaders = function (options) { - const output = [] - const loaders = exports.cssLoaders(options) - - for (const extension in loaders) { - const loader = loaders[extension] - output.push({ - test: new RegExp('\\.' + extension + '$'), - use: loader - }) - } - - return output -} - -exports.createNotifierCallback = () => { - const notifier = require('node-notifier') - - return (severity, errors) => { - if (severity !== 'error') return - - const error = errors[0] - const filename = error.file && error.file.split('!').pop() - - notifier.notify({ - title: packageConfig.name, - message: severity + ': ' + error.name, - subtitle: filename || '', - icon: path.join(__dirname, 'logo.png') - }) - } -} diff --git a/build/vue-loader.conf.js b/build/vue-loader.conf.js deleted file mode 100755 index 0f0ddbc6..00000000 --- a/build/vue-loader.conf.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict' -const utils = require('./utils') -const config = require('../config') -const isProduction = process.env.NODE_ENV === 'production' -const sourceMapEnabled = isProduction - ? config.build.productionSourceMap - : config.dev.cssSourceMap - -module.exports = { - loaders: { - ...utils.cssLoaders({ - sourceMap: sourceMapEnabled, - extract: isProduction - }), - i18n: '@kazupon/vue-i18n-loader' - }, - cssSourceMap: sourceMapEnabled, - cacheBusting: config.dev.cacheBusting, - transformToRequire: { - video: ['src', 'poster'], - source: 'src', - img: 'src', - image: 'xlink:href' - } -} diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js deleted file mode 100755 index 24889520..00000000 --- a/build/webpack.base.conf.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict' -const path = require('path') -const utils = require('./utils') -const webpack = require('webpack') -const config = require('../config') -const vueLoaderConfig = require('./vue-loader.conf') - -function resolve (dir) { - return path.join(__dirname, '..', dir) -} - -const createLintingRule = () => ({ - test: /\.(js|vue)$/, - loader: 'eslint-loader', - enforce: 'pre', - include: [resolve('src'), resolve('test')], - options: { - formatter: require('eslint-friendly-formatter'), - emitWarning: !config.dev.showEslintErrorsInOverlay - } -}) - -module.exports = { - context: path.resolve(__dirname, '../'), - entry: { - app: ['babel-polyfill', './src/main.js'] - }, - output: { - path: config.build.assetsRoot, - filename: '[name].js', - publicPath: process.env.NODE_ENV === 'production' - ? config.build.assetsPublicPath - : config.dev.assetsPublicPath - }, - resolve: { - extensions: ['.js', '.vue', '.json'], - alias: { - 'vue$': 'vue/dist/vue.esm.js', - '@': resolve('src'), - } - }, - module: { - rules: [ - ...(config.dev.useEslint ? [createLintingRule()] : []), - { - test: /\.vue$/, - loader: 'vue-loader', - options: vueLoaderConfig - }, - { - test: /\.js$/, - loader: 'babel-loader', - include: [resolve('src'), resolve('test')] - }, - { - test: /\.svg$/, - loader: 'svg-sprite-loader', - include: [resolve('src/assets/icons/svg')], - options: { - symbolId: 'd2-[name]' - } - }, - { - test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, - loader: 'url-loader', - exclude: [resolve('src/assets/icons/svg')], - options: { - limit: 10000, - name: utils.assetsPath('img/[name].[hash:7].[ext]') - } - }, - { - test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, - loader: 'url-loader', - options: { - limit: 10000, - name: utils.assetsPath('media/[name].[hash:7].[ext]') - } - }, - { - test: /\.scss$/, - loaders: ["style", "css", "sass"] - }, - { - test: /\.less$/, - loaders: ["style", "css", "less"] - }, - { - test: /\.md$/, - loaders: ["text-loader"] - }, - { - test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, - loader: 'url-loader', - options: { - limit: 10000, - name: utils.assetsPath('fonts/[name].[hash:7].[ext]') - } - } - ] - }, - node: { - // prevent webpack from injecting useless setImmediate polyfill because Vue - // source contains it (although only uses it if it's native). - setImmediate: false, - // prevent webpack from injecting mocks to Node native modules - // that does not make sense for the client - dgram: 'empty', - fs: 'empty', - net: 'empty', - tls: 'empty', - child_process: 'empty' - } -} diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js deleted file mode 100755 index 03e94282..00000000 --- a/build/webpack.dev.conf.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict' -const utils = require('./utils') -const webpack = require('webpack') -const config = require('../config') -const merge = require('webpack-merge') -const baseWebpackConfig = require('./webpack.base.conf') -const HtmlWebpackPlugin = require('html-webpack-plugin') -const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') -const portfinder = require('portfinder') - -const HOST = process.env.HOST -const PORT = process.env.PORT && Number(process.env.PORT) - -const devWebpackConfig = merge(baseWebpackConfig, { - module: { - rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) - }, - // cheap-module-eval-source-map is faster for development - devtool: config.dev.devtool, - - // these devServer options should be customized in /config/index.js - devServer: { - clientLogLevel: 'warning', - historyApiFallback: true, - hot: true, - compress: true, - host: HOST || config.dev.host, - port: PORT || config.dev.port, - open: config.dev.autoOpenBrowser, - overlay: config.dev.errorOverlay - ? { warnings: false, errors: true } - : false, - publicPath: config.dev.assetsPublicPath, - proxy: config.dev.proxyTable, - quiet: true, // necessary for FriendlyErrorsPlugin - watchOptions: { - poll: config.dev.poll, - } - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env': require('../config/dev.env') - }), - new webpack.HotModuleReplacementPlugin(), - new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. - new webpack.NoEmitOnErrorsPlugin(), - // https://github.com/ampedandwired/html-webpack-plugin - new HtmlWebpackPlugin({ - filename: 'index.html', - template: 'index.html', - inject: true - }), - ] -}) - -module.exports = new Promise((resolve, reject) => { - portfinder.basePort = process.env.PORT || config.dev.port - portfinder.getPort((err, port) => { - if (err) { - reject(err) - } else { - // publish the new Port, necessary for e2e tests - process.env.PORT = port - // add port to devServer config - devWebpackConfig.devServer.port = port - - // Add FriendlyErrorsPlugin - devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ - compilationSuccessInfo: { - messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], - }, - onErrors: config.dev.notifyOnErrors - ? utils.createNotifierCallback() - : undefined - })) - - resolve(devWebpackConfig) - } - }) -}) diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js deleted file mode 100755 index 5b53b9a0..00000000 --- a/build/webpack.prod.conf.js +++ /dev/null @@ -1,145 +0,0 @@ -'use strict' -const path = require('path') -const utils = require('./utils') -const webpack = require('webpack') -const config = require('../config') -const merge = require('webpack-merge') -const baseWebpackConfig = require('./webpack.base.conf') -const CopyWebpackPlugin = require('copy-webpack-plugin') -const HtmlWebpackPlugin = require('html-webpack-plugin') -const ExtractTextPlugin = require('extract-text-webpack-plugin') -const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') -const UglifyJsPlugin = require('uglifyjs-webpack-plugin') - -const env = require('../config/prod.env') - -const webpackConfig = merge(baseWebpackConfig, { - module: { - rules: utils.styleLoaders({ - sourceMap: config.build.productionSourceMap, - extract: true, - usePostCSS: true - }) - }, - devtool: config.build.productionSourceMap ? config.build.devtool : false, - output: { - path: config.build.assetsRoot, - filename: utils.assetsPath('js/[name].[chunkhash].js'), - chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') - }, - plugins: [ - // http://vuejs.github.io/vue-loader/en/workflow/production.html - new webpack.DefinePlugin({ - 'process.env': env - }), - new UglifyJsPlugin({ - uglifyOptions: { - compress: { - warnings: false - } - }, - sourceMap: config.build.productionSourceMap, - parallel: true - }), - // extract css into its own file - new ExtractTextPlugin({ - filename: utils.assetsPath('css/[name].[contenthash].css'), - // Setting the following option to `false` will not extract CSS from codesplit chunks. - // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. - // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, - // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 - allChunks: true, - }), - // Compress extracted CSS. We are using this plugin so that possible - // duplicated CSS from different components can be deduped. - new OptimizeCSSPlugin({ - cssProcessorOptions: config.build.productionSourceMap - ? { safe: true, map: { inline: false } } - : { safe: true } - }), - // generate dist index.html with correct asset hash for caching. - // you can customize output by editing /index.html - // see https://github.com/ampedandwired/html-webpack-plugin - new HtmlWebpackPlugin({ - filename: config.build.index, - template: 'index.html', - inject: true, - minify: { - removeComments: true, - collapseWhitespace: true, - removeAttributeQuotes: true - // more options: - // https://github.com/kangax/html-minifier#options-quick-reference - }, - // necessary to consistently work with multiple chunks via CommonsChunkPlugin - chunksSortMode: 'dependency' - }), - // keep module.id stable when vender modules does not change - new webpack.HashedModuleIdsPlugin(), - // enable scope hoisting - new webpack.optimize.ModuleConcatenationPlugin(), - // split vendor js into its own file - new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - minChunks (module) { - // any required modules inside node_modules are extracted to vendor - return ( - module.resource && - /\.js$/.test(module.resource) && - module.resource.indexOf( - path.join(__dirname, '../node_modules') - ) === 0 - ) - } - }), - // extract webpack runtime and module manifest to its own file in order to - // prevent vendor hash from being updated whenever app bundle is updated - new webpack.optimize.CommonsChunkPlugin({ - name: 'manifest', - minChunks: Infinity - }), - // This instance extracts shared chunks from code splitted chunks and bundles them - // in a separate chunk, similar to the vendor chunk - // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk - new webpack.optimize.CommonsChunkPlugin({ - name: 'app', - async: 'vendor-async', - children: true, - minChunks: 3 - }), - - // copy custom static assets - new CopyWebpackPlugin([ - { - from: path.resolve(__dirname, '../static'), - to: config.build.assetsSubDirectory, - ignore: ['.*'] - } - ]) - ] -}) - -if (config.build.productionGzip) { - const CompressionWebpackPlugin = require('compression-webpack-plugin') - - webpackConfig.plugins.push( - new CompressionWebpackPlugin({ - asset: '[path].gz[query]', - algorithm: 'gzip', - test: new RegExp( - '\\.(' + - config.build.productionGzipExtensions.join('|') + - ')$' - ), - threshold: 10240, - minRatio: 0.8 - }) - ) -} - -if (config.build.bundleAnalyzerReport) { - const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin - webpackConfig.plugins.push(new BundleAnalyzerPlugin()) -} - -module.exports = webpackConfig diff --git a/config/dev.env.js b/config/dev.env.js deleted file mode 100755 index 1e22973a..00000000 --- a/config/dev.env.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' -const merge = require('webpack-merge') -const prodEnv = require('./prod.env') - -module.exports = merge(prodEnv, { - NODE_ENV: '"development"' -}) diff --git a/config/index.js b/config/index.js deleted file mode 100755 index 4bad2e0f..00000000 --- a/config/index.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict' -// Template version: 1.2.7 -// see http://vuejs-templates.github.io/webpack for documentation. - -const path = require('path') - -module.exports = { - dev: { - - // Paths - assetsSubDirectory: 'static', - assetsPublicPath: '/', - proxyTable: {}, - - // Various Dev Server settings - host: 'localhost', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined - autoOpenBrowser: true, - errorOverlay: true, - notifyOnErrors: true, - poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- - - // Use Eslint Loader? - // If true, your code will be linted during bundling and - // linting errors and warnings will be shown in the console. - useEslint: true, - // If true, eslint errors and warnings will also be shown in the error overlay - // in the browser. - showEslintErrorsInOverlay: false, - - /** - * Source Maps - */ - - // https://webpack.js.org/configuration/devtool/#development - devtool: 'eval-source-map', - - // If you have problems debugging vue-files in devtools, - // set this to false - it *may* help - // https://vue-loader.vuejs.org/en/options.html#cachebusting - cacheBusting: true, - - // CSS Sourcemaps off by default because relative paths are "buggy" - // with this option, according to the CSS-Loader README - // (https://github.com/webpack/css-loader#sourcemaps) - // In our experience, they generally work as expected, - // just be aware of this issue when enabling this option. - cssSourceMap: false, - }, - - build: { - // Template for index.html - index: path.resolve(__dirname, '../dist/index.html'), - - // Paths - assetsRoot: path.resolve(__dirname, '../dist'), - assetsSubDirectory: 'static', - // 请根据你的站点地址修改这里 - assetsPublicPath: '/d2-admin-preview/', - - /** - * Source Maps - */ - - productionSourceMap: true, - // https://webpack.js.org/configuration/devtool/#production - devtool: '#source-map', - - // Gzip off by default as many popular static hosts such as - // Surge or Netlify already gzip all static assets for you. - // Before setting to `true`, make sure to: - // npm install --save-dev compression-webpack-plugin - productionGzip: false, - productionGzipExtensions: ['js', 'css'], - - // Run the build command with an extra argument to - // View the bundle analyzer report after build finishes: - // `npm run build --report` - // Set to `true` or `false` to always turn it on or off - bundleAnalyzerReport: process.env.npm_config_report - } -} diff --git a/config/prod.env.js b/config/prod.env.js deleted file mode 100755 index a6f99761..00000000 --- a/config/prod.env.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict' -module.exports = { - NODE_ENV: '"production"' -} diff --git a/deploy/doc.sh b/deploy/doc.sh deleted file mode 100755 index bf28e118..00000000 --- a/deploy/doc.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env sh - -# 确保脚本抛出遇到的错误 -set -e - -# 生成静态文件 -npm run doc:build - -# 进入生成的文件夹 -cd docs/.vuepress/dist - -git init -git add -A -git commit -m 'deploy' - -# 如果发布到 https://.github.io -# git push -f git@github.com:/.github.io.git master - -# 如果发布到 https://.github.io/ -# git push -f git@github.com:FairyEver/d2-admin.git master:gh-pages -git push -f git@gitee.com:fairyever/d2-admin-doc.git master - -cd - - -echo "publish to http://d2admin.fairyever.com/zh/" \ No newline at end of file diff --git a/deploy/github.sh b/deploy/github.sh deleted file mode 100755 index 9343b2e2..00000000 --- a/deploy/github.sh +++ /dev/null @@ -1,7 +0,0 @@ -set -e - -git add --all - -git commit -m 'no message' - -git push \ No newline at end of file diff --git a/deploy/preview.sh b/deploy/preview.sh deleted file mode 100755 index ad4b631b..00000000 --- a/deploy/preview.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env sh - -# 确保脚本抛出遇到的错误 -set -e - -# 生成静态文件 -npm run build - -# 进入生成的文件夹 -cd dist - -# 如果是发布到自定义域名 -# echo 'www.example.com' > CNAME - -git init -git add -A -git commit -m 'deploy' - -# 如果发布到 https://.github.io -# git push -f git@github.com:/.github.io.git master - -# 如果发布到 https://.github.io/ -git push -f git@gitee.com:fairyever/d2-admin-preview.git master - -cd - - -echo "publish to https://fairyever.gitee.io/d2-admin-preview/#/index" \ No newline at end of file diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js deleted file mode 100644 index 1247cba0..00000000 --- a/docs/.vuepress/config.js +++ /dev/null @@ -1,134 +0,0 @@ -module.exports = { - locales: { - '/': { - lang: 'en-US', - title: 'D2 Admin', - description: 'Elegant management system front-end integration' - }, - '/zh/': { - lang: 'zh-CN', - title: 'D2 Admin', - description: '优雅的管理系统前端集成方案' - } - }, - head: [ - ['link', { rel: 'icon', href: `/logo@2x.png` }], - ['script', {}, 'var _hmt = _hmt || [];(function() {var hm = document.createElement("script");hm.src = "https://hm.baidu.com/hm.js?be9d34853430c136b5d62c3081d556a5";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm, s);})();'] - ], - themeConfig: { - // 项目仓库地址 - repo: 'https://github.com/d2-projects/d2-admin', - // 自定义仓库链接文字 - repoLabel: '查看源码', - // 文档不是放在仓库的根目录下 - docsDir: 'docs', - // 默认是 false, 设置为 true 来启用 - editLinks: true, - // 多国语言 - locales: { - '/': { - selectText: 'Languages', - label: 'English', - editLinkText: 'Edit this page on GitHub', - lastUpdated: 'Last update', - nav: [ - { text: 'preview', link: 'https://fairyever.gitee.io/d2-admin-preview/#/index' } - ] - }, - '/zh/': { - selectText: '选择语言', - label: '简体中文', - editLinkText: '在 GitHub 上编辑此页', - lastUpdated: '最后更新', - nav: [ - { text: '指南', link: '/zh/guide/' }, - { text: '插件', link: '/zh/plugins/' }, - { text: '组件', link: '/zh/components/' }, - { text: '文章', link: '/zh/article/' }, - { text: '其它', link: '/zh/others/' }, - { text: '预览', link: 'https://fairyever.gitee.io/d2-admin-preview/#/index' } - ], - sidebar: { - '/zh/guide/': sideBarGuide('指南'), - '/zh/plugins/': sideBarPlugins('插件'), - '/zh/components/': sideBarComponents('组件'), - '/zh/article/': sideBarArticle('版本更新'), - '/zh/others/': sideBarOthers('其它') - } - } - } - } -} - -function sideBarGuide (title) { - return [ - { - title, - collapsable: false, - children: [ - '', - 'question', - 'pr', - 'change-log' - ] - } - ] -} - -function sideBarPlugins () { - return [ - '', - 'data-export', - 'data-import', - 'i18n', - 'mock' - ] -} - -function sideBarComponents (title) { - return [ - { - title, - collapsable: false, - children: [ - '', - 'charts', - 'charts-new', - 'container', - 'count-up', - 'highlight', - 'icon-select', - 'icon-svg', - 'icon', - 'markdown' - ] - } - ] -} - -function sideBarArticle (titleUpdate) { - return [ - { - title: titleUpdate, - collapsable: false, - children: [ - '', - 'update/1.1.4', - 'update/0.0.0' - ] - } - ] -} - -function sideBarOthers (title) { - return [ - { - title, - collapsable: false, - children: [ - '', - 'css' - ] - } - ] -} diff --git a/docs/.vuepress/override.styl b/docs/.vuepress/override.styl deleted file mode 100644 index daf6b999..00000000 --- a/docs/.vuepress/override.styl +++ /dev/null @@ -1 +0,0 @@ -$accentColor = #409EFF \ No newline at end of file diff --git a/docs/.vuepress/public/logo@2x.png.REMOVED.git-id b/docs/.vuepress/public/logo@2x.png.REMOVED.git-id deleted file mode 100644 index c43aa1d8..00000000 --- a/docs/.vuepress/public/logo@2x.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -d9ade30cf874de657275755e4783fde51f2f6ffc \ No newline at end of file diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 539d9be0..00000000 --- a/docs/README.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -home: true -heroImage: /logo@2x.png -actionText: Get Started → -actionLink: /zh/guide/ -features: -- title: Vue-Powered - details: Enjoy the dev experience of Vue + webpack, Ultra fast virtual DOM and the most economical optimization. -- title: Rich integration - details: The plug-ins and components that are likely to be used are ready for you. Some come from third parties, others are designed for d2admin. -- title: ElementUI component library - details: Integrated and robust ElementUI, and use any ElementUI component at will. -footer: MIT Licensed | Copyright © 2018-present FairyEver ---- - -**The English document will be launched in the future. Please move to the Chinese document.** - -**英文文档会在中文文档大致完成后推出,现请移步中文文档** - -``` -// install package -npm i -// run -npm run dev -// build -npm run build -``` \ No newline at end of file diff --git a/docs/zh/README.md b/docs/zh/README.md deleted file mode 100644 index 97821ba8..00000000 --- a/docs/zh/README.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -home: true -heroImage: /logo@2x.png -actionText: 快速上手 → -actionLink: /zh/guide/ -features: -- title: Vue驱动 - details: 享受 Vue + webpack 的开发体验,超快虚拟 DOM 和最省心的优化。 -- title: 丰富集成 - details: 已经为你准备好了很可能用到的插件和组件,有的来自第三方,有的专为 d2admin 设计。 -- title: ElementUI组件库 - details: 集成完善且强大的 ElementUI,随意搭配使用任何 ElementUI 组件。 -footer: MIT Licensed | Copyright © 2018-present FairyEver ---- - -``` -// 安装依赖 -npm i - -// 运行 -npm run dev - -// 打包 -npm run build -``` - -> 如果上述步骤出现错误,建议您升级 node 版本 > 8,如果有其它疑问请参考[常见问题](/zh/guide/question.html) \ No newline at end of file diff --git a/docs/zh/article/README.md b/docs/zh/article/README.md deleted file mode 100644 index 9dc383cc..00000000 --- a/docs/zh/article/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# 章节介绍 - -这个章节下收录关于 D2Admin 的一些介绍,用法,以及每次发布新版本时的推广文章,也是每篇新文章的首发地址。 \ No newline at end of file diff --git a/docs/zh/article/update/0.0.0.md b/docs/zh/article/update/0.0.0.md deleted file mode 100644 index 40a0747b..00000000 --- a/docs/zh/article/update/0.0.0.md +++ /dev/null @@ -1,123 +0,0 @@ -# 公布项目 - -![github-banner](http://fairyever.qiniudn.com/github-banner.png) - -# 介绍 - -D2Admin 是一个开源的管理系统前端集成方案 - -[Github仓库](https://github.com/d2-projects/d2-admin) - [预览地址](https://fairyever.gitee.io/d2-admin-preview/#/index) - [中文文档](https://fairyever.gitee.io/d2-admin-doc/zh/) - -D2Admin 是完全开源免费的管理系统集成方案,由 [FairyEver](https://github.com/FairyEver) 在工作之余完全由兴趣驱动完成,如果你也一样喜欢前端开发,欢迎加入我们的讨论/学习群,群内可以`提问答疑`,`分享学习资料`或者随便扯淡 - -**QQ群** - -群号 806395827 欢迎大家 - -**微信群** - -作者微信 liyang1711467488 - -> 微信群需要先加群主才可以拉进群 - -## 功能 - -* 首屏加载等待动画 避免首次加载白屏尴尬 -* 简约主题 -* 每个插件和组件都配有介绍文档 -* 图片资源 sketch 源文件( 可以在这个文件内重新生成所有图片资源 ) -* 登陆和注销 -* 根据路由自动生成菜单 -* 可折叠侧边栏 -* 方便的菜单设置 -* 多国语言支持 -* 富文本编辑器 -* Markdown 编辑器 -* 全屏功能 -* Fontawesome 图标库 -* 图标选择器(组件) -* 自动引入下载的 SVG 图标 -* 前端假数据支持( mock ) -* 集成蚂蚁金服出品的 G2 图表 -* 图表自适应可拖拽大小的卡片容器(示例) -* 简化剪贴板操作 -* 简化Cookie操作 -* 时间日期计算工具 -* 导入 Excel ( xlsx 格式 + csv 格式 ) -* 数据导出 Excel ( xlsx 格式 + csv 格式 ) -* 数据导出文本 -* 数字动画 -* 可拖拽调整大小的切分布局 -* 可拖拽调整大小和位置的网格布局 -* 提供三种方便的页面容器组件(正常卡片,隐形容器,填满页面) -* 代码高亮显示 -* 加载并解析(或者直接指定资源) markdown 文件 -* GitHub 样式的 markdown 显示组件 -* markdown 内代码高亮 -* 为 markdown 扩展了百度云链接解析和优化显示 -* 右键菜单组件 -* 自定义滚动条和滚动控制 -* 内置4种主题 -* 公用样式抽离,方便的主题定制 -* 支持百万级数据量的表格组件 -* 打包后随意目录部署(已经做好兼容设置) - -## TODO - -D2Admin 仍然处于开发中,这里有一些计划: - -* 分离出简化版本 -* 推出基于 [ice](https://alibaba.github.io/ice) 平台的版本 -* 增加右上角通知中心 -* 增加一些实例页面以提供业务页面布局建议 -* 更换图表库 -* 多 tab 页结构 -* 面包屑导航 -* 树型表格组件 -* `1.1.0 完成` 抽离项目里的文档,集中存放在文档站点 -* `1.1.0 完成` 对主界面进行一次完善,调整整体布局和颜色 -* `1.1.0 完成` 切换主题功能 - -欢迎你为 D2Admin 的开发作出贡献(代码编写/文档翻译)。 - -## 目录结构 - -``` -├─ build -├─ config -├─ docs // 文档 -├─ src -│ ├─ assets // 资源 -│ │ ├─ icons -│ │ ├─ image -│ │ ├─ library -│ │ └─ style -│ ├─ components // 组件 -│ │ ├─ charts -│ │ ├─ core -│ │ └─ demo -│ ├─ i18n // 多国语 -│ ├─ menu // 菜单 -│ ├─ mock // 模拟数据 -│ ├─ pages // 页面 -│ ├─ plugin // 插件 -│ ├─ router // 路由 -│ ├─ store // vuex -│ ├─ utils -│ ├─ App.vue -│ └─ main.js -├─ static // 静态资源 -├─ .babelrc -├─ .editorconfig -├─ .eslintignore -├─ .eslintrc.js -├─ .gitattributes -├─ .gitignore -├─ .postcssrc.js -├─ LICENSE -├─ README.md -├─ deploy.sh -├─ design.sketch // 设计文件 -├─ index.html -└─ package.json -``` \ No newline at end of file diff --git a/docs/zh/article/update/1.1.4.md b/docs/zh/article/update/1.1.4.md deleted file mode 100644 index f8dd308c..00000000 --- a/docs/zh/article/update/1.1.4.md +++ /dev/null @@ -1,218 +0,0 @@ -# 版本发布 1.1.4 - -![github-banner](http://fairyever.qiniudn.com/github-banner.png) - -D2Admin 是一个 **注重外观表现** 的管理系统 **PC端** 集成方案,现在正在紧张开发维护。 - -## 前言 - -距离 D2Admin 正式和大家见面(开源),已经过去一个多月了。 - -![Snip20180703_4](http://fairyever.qiniudn.com/Snip20180703_4.png) - -现在想想这一个月真是很忙碌,几乎所有的业余时间都用在了开源项目上,公司没事的时候在写,晚上回家每天都要写到一点左右,回家火车上都在忙着改代码... - -![Snip20180703_5-squashed](http://fairyever.qiniudn.com/Snip20180703_5-squashed.jpg) - -上图:好友不幸骨折,守着他编码...(希望他早点康复) - -有天我和朋友说,感觉真是开源个项目,把自己整个人都开源了,一个人又要设计又要写代码又要写文档还要回答问题,除了上班吃睡就都是它了! - -但是就我个人而言,我感觉倒也是一种不错的体验。 - -通过这个开源产品,认识了很多朋友,有了自己的小交流群,平日没事了大家一起讨论讨论问题也挺不错。当然也新认识了一些大佬(膜拜),通过交流也有不小的收获。 - -## 介绍 - -废话不多说了,一介码农也没有什么文采,今天也是趁着发版的机会小发表一些想法,下面就介绍一下这一个月来究竟升级了什么吧,先放几张截图吧: - -### 预览 - -经典主题: - -![Snip20180703_6-squashed](http://fairyever.qiniudn.com/Snip20180703_6-squashed.png) - -集成组件和插件: - -![Snip20180703_7-squashed](http://fairyever.qiniudn.com/Snip20180703_7-squashed.png) - -图标选择器: - -![Snip20180703_8-squashed](http://fairyever.qiniudn.com/Snip20180703_8-squashed.png) - -版本检查: - -![Snip20180703_10-squashed](http://fairyever.qiniudn.com/Snip20180703_10-squashed.png) - -灰度模式: - -![Snip20180703_11-squashed](http://fairyever.qiniudn.com/Snip20180703_11-squashed.png) -![Snip20180704_9](http://fairyever.qiniudn.com/Snip20180704_9.png) -![Snip20180705_1](http://fairyever.qiniudn.com/Snip20180705_1.png) - -数据持久化: - -![Snip20180703_12-squashed](http://fairyever.qiniudn.com/Snip20180703_12-squashed.png) - -图表: - -![Snip20180703_13-squashed](http://fairyever.qiniudn.com/Snip20180703_13-squashed.png) - -主题: - -![Snip20180703_14-squashed](http://fairyever.qiniudn.com/Snip20180703_14-squashed.png) - -响应大家需求,这次最大的升级:多标签页: - -![Snip20180703_15](http://fairyever.qiniudn.com/Snip20180703_15.png) - -上面是我随便截了几张图片 如果你感兴趣的话可以去体验地址一趟 -> [体验地址](https://fairyever.gitee.io/d2-admin-preview/#/index) <-。 - -项目现在集成了不少的库和插件,第一次加载确实有些慢,以后有空了优化一下。 - -另外大家实际使用的时候建议使用 [简化版模板](https://github.com/d2-projects/d2-admin-start-kit)。 - -### 完整功能列表 - -* 首屏加载等待动画 避免首次加载白屏尴尬 -* 简约主题 -* 每个插件和组件都配有介绍文档 -* 图片资源 sketch 源文件( 可以在这个文件内重新生成所有图片资源 ) -* 登陆和注销 -* 根据路由自动生成菜单 -* 可折叠侧边栏 -* 方便的菜单设置 -* 多国语言支持 -* 富文本编辑器 -* Markdown 编辑器 -* 全屏功能 -* Fontawesome 图标库 -* 图标选择器(组件) -* 自动引入下载的 SVG 图标 -* 前端假数据支持( mock ) -* 集成蚂蚁金服出品的 G2 图表 -* 图表自适应可拖拽大小的卡片容器(示例) -* 简化剪贴板操作 -* 简化Cookie操作 -* 时间日期计算工具 -* 导入 Excel ( xlsx 格式 + csv 格式 ) -* 数据导出 Excel ( xlsx 格式 + csv 格式 ) -* 数据导出文本 -* 数字动画 -* 可拖拽调整大小的切分布局 -* 可拖拽调整大小和位置的网格布局 -* 提供三种方便的页面容器组件(正常卡片,隐形容器,填满页面) -* 代码高亮显示 -* 加载并解析(或者直接指定资源) markdown 文件 -* GitHub 样式的 markdown 显示组件 -* markdown 内代码高亮 -* 为 markdown 扩展了百度云链接解析和优化显示 -* 右键菜单组件 -* 自定义滚动条和滚动控制 -* 内置5种主题 -* 公用样式抽离,方便的主题定制 -* 支持百万级数据量的表格组件 -* 打包后随意目录部署(已经做好兼容设置) -* 支持临时菜单配置 -* 提供“试验台”功能 方便展示系统功能调用方法 `1.1.4 +` -* 多标签页模式 `1.1.4 +` -* 美化滚动条 `1.1.4 +` -* 持久化存储 `1.1.4 +` - -### 更新列表 - -这个列表在这里也可以查看 -> [中文文档 | 更新日志](https://fairyever.gitee.io/d2-admin-doc/zh/guide/change-log.html#v1-1-0) - -#### 1.1.4 - -* [ 修改 ] 全局状态管理设计优化 -* [ 修改 ] 主题调优 -* [ 新增 ] playground 模块,方便测试和展示一些功能实现方式/调用方法 -* [ 新增 ] 灰度模式 -* [ 新增 ] 多页模式 -* [ 新增 ] 多页模式缓存 -* [ 新增 ] 多页模式快速关闭(关闭左侧 右侧 全部 其它) -* [ 修改 ] 侧边栏滚动优化 -* [ 新增 ] `d2-container` 填充模式自定义滚动条 -* [ 新增 ] `d2-container` 组件卡片和隐形模式自定义滚动条 -* [ 新增 ] 现在页面标题可以根据路由做出对应变化了 -* [ 新增 ] 版本检查机制 -* [ 新增 ] `d2-container` 隐形模式支持 header 插槽 -* [ 新增 ] 版本检查可以设置为不显示提示框 -* [ 新增 ] 集成 json 查看组件 -* [ 新增 ] 添加了所有图表种类的演示页面 -* [ 修改 ] 修改布局方式,解决了在 Firefox 上 better-scroll 初始化拿不到正确高度的 bug -* [ 新增 ] 右上角显示用户名,用户名持久存储 - -#### 1.1.3 - -* [ 修复 ] 侧边栏在折叠时不显示的 bug -* [ 新增 ] v-charts 插件 -* [ 新增 ] 一些演示图表(后续打算把 v-charts 文档上有示例性的演示都展示一下) -* [ 修改 ] D2Admin 经典主题颜色调整 -* [ 新增 ] violet 主题 -* [ 新增 ] 菜单图标 -* [ 修改 ] 新制作了 Fork me 图片 - -#### 1.1.2 - -* [ 修改 ] 删除了 G2 相关的依赖 - -#### 1.1.1 - -* [ 修改 ] 删除了 G2 相关的代码(移除图表库) -* [ 优化 ] 侧边栏取值逻辑 - -#### 1.1.0 - -* [ 修改 ] 顶栏和侧边栏菜单新的结构生成方式,新的方案使用 数据 + 递归组件 实现无限制多级菜单 -* [ 修改 ] 路由注册回归最简单的写法 -* [ 修复 ] 首次加载 loading 样式类名和程序内类名冲突,新的加载类名使用 d2-app-loading 前缀 -* [ 修改 ] 所有类似 dd- 的样式前缀(包括自动注册图标的id前缀)统一改为 d2- -* [ 修复 ] 修复 d2-highlight 组件和 d2-markdown 组件的样式冲突 -* [ 修改 ] 内置组件名称统一改为 d2- 前缀,统一使用横线连接 (kebab-case) 风格 -* [ 修改 ] 顶栏 logo 阴影删除 -* [ 新增 ] 主题系统 -* [ 新增 ] 三个主题,分别为 d2admin 经典,简约线条,流星 -* [ 修改 ] d2-markdown 组件 md 参数改名为 source -* [ 修改 ] 删除了 d2-markdown 组件中图片的白色背景 -* [ 修改 ] 删除 timeago 插件,更换为更强大的 dayjs -* [ 新增 ] Tomorrow Night Blue 主题 -* [ 修改 ] src/assets/style/public-class.scss 写法优化 -* [ 新增 ] [vue-bigdata-table](https://github.com/lison16/vue-bigdata-table)组件 -* [ 修复 ] 侧边栏内容超过一屏后显示错误 -* [ 新增 ] 自定义滚动条演示页面 -* [ 新增 ] 流星主题新增背景图片上层的半透明遮罩 -* [ 修复 ] 主题设置失效bug -* [ 修复 ] router守卫验证登陆部分代码修改 -* [ 修复 ] d2-container 组件改为同步注册(之前的异步注册会有 mounted 生命周期问题,即 slot 内的页面在 mounted 生命周期内拿不到 dom) -* [ 修复 ] d2-container 组件重构 flex 布局 -* [ 新增 ] 404 page -* [ 新增 ] 顶栏联系方式 -* [ 新增 ] 右键菜单组件 -* [ 新增 ] 菜单配置支持空菜单(项目开发的时候有可能需要先把菜单做好查看效果) -* [ 优化 ] 页面左侧菜单滚动条优化 -* [ 修复 ] CSS 边距工具类都加上了 `!important` 来保证在覆盖样式时生效 -* [ 修复 ] IE11 兼容性修复 - -写这篇文章的时候心情竟然出奇地平静,终于发新版了,总算松了一口气... - -### 下阶段的计划: - -* ice 版本 -* bug 修复 - -## 项目地址 - -| 地址 | 描述 | -| --- | --- | -| [团队主页](https://github.com/d2-projects) | D2Admin 所属的团队主页 | -| [中文文档](http://d2admin.fairyever.com/zh/) | 中文文档 | -| [预览地址](https://fairyever.gitee.io/d2-admin-preview/#/index) | 预览地址 | -| [github](https://github.com/d2-projects/d2-admin) | Github 仓库 | -| [码云](https://gitee.com/fairyever/d2-admin) | 码云镜像仓库 | -| [简化版 github](https://github.com/d2-projects/d2-admin-start-kit) | 简化版 Github 仓库 | -| [简化版 码云](https://gitee.com/fairyever/d2-admin-start-kit) | 简化版码云镜像仓库 | - -在最后,如果你看完了,并且觉得不错,希望可以到 [项目主页](https://github.com/d2-projects/d2-admin) 上点一个 **star** 作为你对这个项目的认可与支持,谢谢。 - diff --git a/docs/zh/components/README.md b/docs/zh/components/README.md deleted file mode 100644 index 2fd73b8a..00000000 --- a/docs/zh/components/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# 组件概述 - -d2-admin(以下简称 d2admin)封装(或者集成第三方)了一些组件,方便开发者进行开发,具体组件文档请从左侧列表进入 \ No newline at end of file diff --git a/docs/zh/components/charts-new.md b/docs/zh/components/charts-new.md deleted file mode 100644 index 3a4f8b86..00000000 --- a/docs/zh/components/charts-new.md +++ /dev/null @@ -1,13 +0,0 @@ -# 图表 [ v-charts ] - -::: tip -`1.1.0` 版本使用的是 `G2` 图表库,`1.1.3` 开始使用 `v-charts` -::: - -## 介绍 - -在使用 echarts 生成图表时,经常需要做繁琐的数据类型转化、修改复杂的配置项,v-charts 的出现正是为了解决这个痛点。基于 Vue2.0 和 echarts 封装的 v-charts 图表组件,只需要统一提供一种对前后端都友好的数据格式设置简单的配置项,便可轻松生成常见的图表。 - -[v-charts 文档](https://v-charts.js.org/#/) - -处于对用户使用方便的角度考虑,从 `1.1.3` 开始使用 v-charts。项目中已经安装并注册完毕 v-charts,你可以直接使用 \ No newline at end of file diff --git a/docs/zh/components/charts.md b/docs/zh/components/charts.md deleted file mode 100644 index 0c3f1355..00000000 --- a/docs/zh/components/charts.md +++ /dev/null @@ -1,76 +0,0 @@ -# 图表 [ G2 ] - -::: tip -此文档仅对 `1.1.0` 及其以下版本有效,`1.1.1` 开始变更了图表库 -::: - -## 介绍 - -D2Admin 集成了由蚂蚁金服出品的 **G2** 图表库 - -## 实现方式 - -`src/components/charts/register.js` 为注册图表组件的文件 - -`src/components/charts/G2` 为图表组件存放位置 - -`src/components/charts/G2/mixins/G2.js` 是图表最主要的文件,这是一个所有的图表组件都会使用的 mixin,这个 mixin 主要有以下用途 - - - 将 G2 和 DataSet 绑定到 data 上,方便组件使用,省去重复 `import G2 from '@antv/g2'` 等 - - 将 [G2 Chart类](http://antv.alipay.com/zh-cn/g2/3.x/api/chart.html#_Chart) 的属性全部暴露为 Vue 组件参数,这些参数会在初始化图表时用到 - - 提供了额外的设置参数,比如自动高度,自动初始化,初始化延时 - - 关闭 G2 的体验改进计划打点请求 - - data 上的 chart 对象 - - 自动初始化(或者不初始化)图表 - - `creatChart` 方法,根据参数设置生成 data 上的 chart 对象 - - `resize` 方法 - -在图表组件中使用这个 mixin 示例 - -``` vue - - - -``` - -上面的代码段展示了如何使用 mixin 快速制作一个图表组件,只需根据某个图表的个性化需要,在组件中重新定义 `init` 和 `changeData` 方法即可 - -你可以修改这个 mixin 去实现更多的功能,同时影响所有的图表组件 - -::: tip -这只仅仅是作者个人对于图表封装的一个实现思路 -::: - -## 为什么没有选择其他产品 - -G2 完全可以胜任一般的后台界面报表图表需求,而且官网文档清晰友好 - -如果你需要更酷炫的图表,也完全可以剔除集成的库,换用 百度的[echarts](http://echarts.baidu.com/) 或者超级强大的 [d3.js](https://d3js.org/) \ No newline at end of file diff --git a/docs/zh/components/container.md b/docs/zh/components/container.md deleted file mode 100644 index 741eb7f9..00000000 --- a/docs/zh/components/container.md +++ /dev/null @@ -1,114 +0,0 @@ -# 页面容器 - -页面容器组件是每个页面的基础,为了在整个项目中统一效果,它应该是 `