zhoutao 6 年之前
父节点
当前提交
2f32f53bfe
共有 100 个文件被更改,包括 3556 次插入0 次删除
  1. 20 0
      .gitignore
  2. 7 0
      Dockerfile
  3. 41 0
      build/build.js
  4. 54 0
      build/check-versions.js
  5. 102 0
      build/utils.js
  6. 22 0
      build/vue-loader.conf.js
  7. 103 0
      build/webpack.base.conf.js
  8. 80 0
      build/webpack.dev.conf.js
  9. 148 0
      build/webpack.prod.conf.js
  10. 32 0
      build/webpack.test.conf.js
  11. 8 0
      config/dev.env.js
  12. 91 0
      config/index.js
  13. 4 0
      config/prod.env.js
  14. 7 0
      config/test.env.js
  15. 11 0
      default.conf
  16. 66 0
      gulpfile.js
  17. 24 0
      index.html
  18. 98 0
      package.json
  19. 15 0
      src/App.vue
  20. 二进制
      src/assets/img/address.png
  21. 二进制
      src/assets/img/avatar.png
  22. 二进制
      src/assets/img/base_z36574a.png
  23. 二进制
      src/assets/img/bg_mobile_head_default2968da.png
  24. 二进制
      src/assets/img/buyer.png
  25. 二进制
      src/assets/img/car.png
  26. 二进制
      src/assets/img/index_z354723.png
  27. 二进制
      src/assets/img/invoice.png
  28. 二进制
      src/assets/img/line.png
  29. 二进制
      src/assets/img/login-bg.png
  30. 二进制
      src/assets/img/login-logo.png
  31. 二进制
      src/assets/img/message.png
  32. 1 0
      src/assets/img/message.svg
  33. 二进制
      src/assets/img/remarks.png
  34. 二进制
      src/assets/img/revise.png
  35. 二进制
      src/assets/img/time.png
  36. 二进制
      src/assets/img/yami.png
  37. 358 0
      src/assets/scss/_base.scss
  38. 447 0
      src/assets/scss/_normalize.scss
  39. 13 0
      src/assets/scss/_variables.scss
  40. 3 0
      src/assets/scss/index.scss
  41. 72 0
      src/components/file-upload/index.vue
  42. 51 0
      src/components/icon-svg/index.vue
  43. 79 0
      src/components/mul-pic-upload/index.vue
  44. 71 0
      src/components/pic-upload/index.vue
  45. 71 0
      src/components/prod-select/index.vue
  46. 180 0
      src/components/prods-select/index.vue
  47. 223 0
      src/components/tiny-mce/index.vue
  48. 68 0
      src/crud/admin/form.js
  49. 45 0
      src/crud/admin/indexImg.js
  50. 50 0
      src/crud/admin/message.js
  51. 74 0
      src/crud/prod/prodComm.js
  52. 57 0
      src/crud/prod/prodList.js
  53. 43 0
      src/crud/prod/prodTag.js
  54. 31 0
      src/crud/prod/spec.js
  55. 50 0
      src/crud/shop/hotSearch.js
  56. 50 0
      src/crud/shop/notice.js
  57. 41 0
      src/crud/shop/pickAddr.js
  58. 25 0
      src/crud/shop/transport.js
  59. 28 0
      src/crud/sys/area.js
  60. 31 0
      src/crud/sys/config.js
  61. 45 0
      src/crud/sys/log.js
  62. 31 0
      src/crud/sys/role.js
  63. 48 0
      src/crud/sys/user.js
  64. 78 0
      src/crud/user/addr.js
  65. 47 0
      src/crud/user/user.js
  66. 二进制
      src/element-ui-theme/fonts/element-icons.ttf
  67. 二进制
      src/element-ui-theme/fonts/element-icons.woff
  68. 1 0
      src/element-ui-theme/style.css
  69. 156 0
      src/element-ui/index.js
  70. 0 0
      src/icons/iconfont.js
  71. 27 0
      src/icons/index.js
  72. 1 0
      src/icons/svg/icon-admin.svg
  73. 1 0
      src/icons/svg/icon-bianji.svg
  74. 1 0
      src/icons/svg/icon-config.svg
  75. 1 0
      src/icons/svg/icon-dangdifill.svg
  76. 1 0
      src/icons/svg/icon-daohang.svg
  77. 1 0
      src/icons/svg/icon-duanxin.svg
  78. 1 0
      src/icons/svg/icon-editor.svg
  79. 1 0
      src/icons/svg/icon-form.svg
  80. 1 0
      src/icons/svg/icon-geren.svg
  81. 1 0
      src/icons/svg/icon-jiesuo.svg
  82. 1 0
      src/icons/svg/icon-job.svg
  83. 1 0
      src/icons/svg/icon-log.svg
  84. 1 0
      src/icons/svg/icon-menu.svg
  85. 1 0
      src/icons/svg/icon-mudedi.svg
  86. 1 0
      src/icons/svg/icon-order.svg
  87. 1 0
      src/icons/svg/icon-oss.svg
  88. 1 0
      src/icons/svg/icon-pinglun.svg
  89. 1 0
      src/icons/svg/icon-prod.svg
  90. 1 0
      src/icons/svg/icon-role.svg
  91. 1 0
      src/icons/svg/icon-shanchu.svg
  92. 1 0
      src/icons/svg/icon-shezhi.svg
  93. 1 0
      src/icons/svg/icon-shoucang.svg
  94. 1 0
      src/icons/svg/icon-shoucangfill.svg
  95. 1 0
      src/icons/svg/icon-shouye.svg
  96. 1 0
      src/icons/svg/icon-sousuo.svg
  97. 1 0
      src/icons/svg/icon-sql.svg
  98. 1 0
      src/icons/svg/icon-store.svg
  99. 1 0
      src/icons/svg/icon-suoding.svg
  100. 0 0
      src/icons/svg/icon-system.svg

+ 20 - 0
.gitignore

@@ -0,0 +1,20 @@
+.DS_Store
+node_modules/
+dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+test/unit/coverage
+test/e2e/reports
+selenium-debug.log
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+
+package-lock.json

+ 7 - 0
Dockerfile

@@ -0,0 +1,7 @@
+FROM nginx:1.15
+MAINTAINER zhoutao
+
+COPY dist/  /usr/share/nginx/html/
+ADD default.conf /etc/nginx/conf.d/
+WORKDIR /usr/share/nginx/html
+RUN chmod -R a+rx *

+ 41 - 0
build/build.js

@@ -0,0 +1,41 @@
+'use strict'
+require('./check-versions')()
+
+process.env.NODE_ENV = 'production'
+
+const ora = require('ora')
+const rm = require('rimraf')
+const path = require('path')
+const chalk = require('chalk')
+const webpack = require('webpack')
+const config = require('../config')
+const webpackConfig = require('./webpack.prod.conf')
+
+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,
+      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'
+    ))
+  })
+})

+ 54 - 0
build/check-versions.js

@@ -0,0 +1,54 @@
+'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)
+  }
+}

+ 102 - 0
build/utils.js

@@ -0,0 +1,102 @@
+'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,
+        publicPath: '../../',
+        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')
+    })
+  }
+}

+ 22 - 0
build/vue-loader.conf.js

@@ -0,0 +1,22 @@
+'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
+  }),
+  cssSourceMap: sourceMapEnabled,
+  cacheBusting: config.dev.cacheBusting,
+  transformToRequire: {
+    video: ['src', 'poster'],
+    source: 'src',
+    img: 'src',
+    image: 'xlink:href'
+  }
+}

+ 103 - 0
build/webpack.base.conf.js

@@ -0,0 +1,103 @@
+'use strict'
+const path = require('path')
+const utils = require('./utils')
+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/icons')]
+      },
+      {
+        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
+        loader: 'url-loader',
+        exclude: [resolve('src/icons')],
+        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: /\.(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'
+  },
+  // 引入外部库, 无需webpack打包处理
+  externals: {
+    echarts: 'echarts',
+    tinymce: 'tinymce'
+  }
+}

+ 80 - 0
build/webpack.dev.conf.js

@@ -0,0 +1,80 @@
+'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)
+    }
+  })
+})

+ 148 - 0
build/webpack.prod.conf.js

@@ -0,0 +1,148 @@
+'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 = process.env.NODE_ENV === 'testing'
+  ? require('../config/test.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].js'),
+    chunkFilename: utils.assetsPath('js/[id].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].css'),
+      // set the following option to `true` if you want to extract CSS from
+      // codesplit chunks into this main css file as well.
+      // This will result in *all* of your app's CSS being loaded upfront.
+      allChunks: false,
+    }),
+    // 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: process.env.NODE_ENV === 'testing'
+        ? 'index.html'
+        : config.build.index,
+      template: 'index.html',
+      inject: false,
+      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({ analyzerMode: 'static' }))
+}
+
+module.exports = webpackConfig

+ 32 - 0
build/webpack.test.conf.js

@@ -0,0 +1,32 @@
+'use strict'
+// This is the webpack config used for unit tests.
+
+const utils = require('./utils')
+const webpack = require('webpack')
+const merge = require('webpack-merge')
+const baseWebpackConfig = require('./webpack.base.conf')
+
+const webpackConfig = merge(baseWebpackConfig, {
+  // use inline sourcemap for karma-sourcemap-loader
+  module: {
+    rules: utils.styleLoaders()
+  },
+  devtool: '#inline-source-map',
+  resolveLoader: {
+    alias: {
+      // necessary to to make lang="scss" work in test when using vue-loader's ?inject option
+      // see discussion at https://github.com/vuejs/vue-loader/issues/724
+      'scss-loader': 'sass-loader'
+    }
+  },
+  plugins: [
+    new webpack.DefinePlugin({
+      'process.env': require('../config/test.env')
+    })
+  ]
+})
+
+// no need for app entry during tests
+delete webpackConfig.entry
+
+module.exports = webpackConfig

+ 8 - 0
config/dev.env.js

@@ -0,0 +1,8 @@
+'use strict'
+const merge = require('webpack-merge')
+const prodEnv = require('./prod.env')
+
+module.exports = merge(prodEnv, {
+  NODE_ENV: '"development"',
+  OPEN_PROXY: true // 是否开启代理, 重置后需重启vue-cli
+})

+ 91 - 0
config/index.js

@@ -0,0 +1,91 @@
+'use strict'
+// Template version: 1.2.5
+// see http://vuejs-templates.github.io/webpack for documentation.
+
+const path = require('path')
+const devEnv = require('./dev.env')
+
+module.exports = {
+  dev: {
+
+    // Paths
+    assetsSubDirectory: 'static',
+    assetsPublicPath: '/',
+    // 代理列表, 是否开启代理通过[./dev.env.js]配置
+    proxyTable: devEnv.OPEN_PROXY === false ? {} : {
+      '/proxyApi': {
+        target: 'http://192.168.20.6:8085/',
+        changeOrigin: true,
+        pathRewrite: {
+          '^/proxyApi': '/'
+        }
+      }
+    },
+
+    // Various Dev Server settings
+    host: 'localhost', // can be overwritten by process.env.HOST
+    port: 8001, // 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: './',
+
+    /**
+     * Source Maps
+     */
+
+    productionSourceMap: false,
+    // 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
+  }
+}

+ 4 - 0
config/prod.env.js

@@ -0,0 +1,4 @@
+'use strict'
+module.exports = {
+  NODE_ENV: '"production"'
+}

+ 7 - 0
config/test.env.js

@@ -0,0 +1,7 @@
+'use strict'
+const merge = require('webpack-merge')
+const devEnv = require('./dev.env')
+
+module.exports = merge(devEnv, {
+  NODE_ENV: '"testing"'
+})

+ 11 - 0
default.conf

@@ -0,0 +1,11 @@
+
+server {
+        listen       80;
+         server_name www.sgsino.cn;
+             root   /usr/share/nginx/html;
+             index  index.html index.htm;
+             #try_files $uri $uri/ /index.html
+
+
+
+    }

+ 66 - 0
gulpfile.js

@@ -0,0 +1,66 @@
+var gulp = require('gulp');
+var $    = require('gulp-load-plugins')();
+var path = require('path');
+var del  = require('del');
+
+var distPath    = path.resolve('./dist');
+var version     = ''; // 版本号
+var versionPath = ''; // 版本号路径
+var env         = ''; // 运行环境
+
+// 创建版本号(年月日时分)
+(function () {
+  var d = new Date();
+  var yy = d.getFullYear().toString().slice(2);
+  var MM = d.getMonth() + 1 >= 10 ? (d.getMonth() + 1) : '0' + (d.getMonth() + 1);
+  var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate();
+  var h  = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours();
+  var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes();
+  version = yy + MM + DD + h + mm;
+  versionPath = distPath + '/' + version;
+})();
+
+// 编译
+gulp.task('build', $.shell.task([ 'node build/build.js' ]));
+
+// 创建版本号目录
+gulp.task('create:versionCatalog', ['build'], function () {
+  return gulp.src(`${distPath}/static/**/*`)
+    .pipe(gulp.dest(`${versionPath}/static/`))
+});
+
+// 替换${versionPath}/static/js/manifest.js window.SITE_CONFIG.cdnUrl占位变量
+gulp.task('replace:cdnUrl', ['create:versionCatalog'], function () {
+  return gulp.src(`${versionPath}/static/js/manifest.js`)
+    .pipe($.replace(new RegExp(`"${require('./config').build.assetsPublicPath}"`, 'g'), 'window.SITE_CONFIG.cdnUrl + "/"'))
+    .pipe(gulp.dest(`${versionPath}/static/js/`))
+});
+
+// 替换${versionPath}/static/config/index-${env}.js window.SITE_CONFIG['version']配置变量
+gulp.task('replace:version', ['create:versionCatalog'], function () {
+  return gulp.src(`${versionPath}/static/config/index-${env}.js`)
+    .pipe($.replace(/window.SITE_CONFIG\['version'\] = '.*'/g, `window.SITE_CONFIG['version'] = '${version}'`))
+    .pipe(gulp.dest(`${versionPath}/static/config/`))
+});
+
+// 合并${versionPath}/static/config/[index-${env}, init].js 至 ${distPath}/config/index.js
+gulp.task('concat:config', ['replace:version'], function () {
+  return gulp.src([`${versionPath}/static/config/index-${env}.js`, `${versionPath}/static/config/init.js`])
+    .pipe($.concat('index.js'))
+    .pipe(gulp.dest(`${distPath}/config/`))
+});
+
+// 清空
+gulp.task('clean', function () {
+  return del([versionPath])
+});
+
+gulp.task('default', ['clean'], function () {
+  // 获取环境配置
+  env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'
+  // 开始打包编译
+  gulp.start(['build', 'create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config'], function () {
+    // 清除, 编译 / 处理项目中产生的文件
+    del([`${distPath}/static`, `${versionPath}/static/config`])
+  })
+});

+ 24 - 0
index.html

@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <meta http-equiv="X-UA-Compatible" content="ie=edge">
+  <meta name="referrer" content="same-origin">
+  <title>亚米后台</title>
+  <% if (process.env.NODE_ENV === 'production') { %>
+    <!-- 生产环境 -->
+    <script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script>
+  <% }else { %>
+    <!-- 开发环境 -->
+    <link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">
+    <script src="./static/config/index.js"></script>
+    <script src="./static/plugins/echarts-4.2.1/echarts.common.min.js"></script>
+    <script src="./static/plugins/tinymce.4.9.4/tinymce.min.js"></script>
+    <script src="./static/plugins/tinymce.4.9.4/zh_CN.js"></script>
+  <% } %>
+</head>
+<body>
+  <div id="app"></div>
+</body>
+</html>

+ 98 - 0
package.json

@@ -0,0 +1,98 @@
+{
+  "name": "admin-vue",
+  "version": "1.0.0",
+  "private": true,
+  "scripts": {
+    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
+    "start": "npm run dev",
+    "unit": "jest --config test/unit/jest.conf.js --coverage",
+    "e2e": "node test/e2e/runner.js",
+    "test": "npm run unit && npm run e2e",
+    "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs",
+    "build": "gulp"
+  },
+  "dependencies": {
+    "@smallwei/avue": "^2.0.2",
+    "axios": "0.18.1",
+    "babel-plugin-component": "0.10.1",
+    "babel-polyfill": "6.26.0",
+    "element-ui": "2.8.2",
+    "gulp": "3.9.1",
+    "gulp-concat": "2.6.1",
+    "gulp-load-plugins": "1.5.0",
+    "gulp-replace": "0.6.1",
+    "gulp-shell": "0.6.5",
+    "lodash": "4.17.5",
+    "node-sass": "4.9.0",
+    "sass-loader": "6.0.6",
+    "svg-sprite-loader": "3.7.3",
+    "vue": "2.6.10",
+    "vue-cookie": "1.1.4",
+    "vue-router": "3.0.1",
+    "vuex": "3.0.1"
+  },
+  "devDependencies": {
+    "autoprefixer": "7.1.2",
+    "babel-core": "6.26.3",
+    "babel-eslint": "7.1.1",
+    "babel-jest": "21.0.2",
+    "babel-loader": "7.1.1",
+    "babel-plugin-dynamic-import-node": "1.2.0",
+    "babel-plugin-transform-es2015-modules-commonjs": "6.26.0",
+    "babel-plugin-transform-runtime": "6.22.0",
+    "babel-preset-env": "1.3.2",
+    "babel-preset-stage-2": "6.22.0",
+    "babel-register": "6.22.0",
+    "chalk": "2.3.0",
+    "chromedriver": "2.27.2",
+    "copy-webpack-plugin": "4.0.1",
+    "cross-spawn": "5.0.1",
+    "css-loader": "0.28.0",
+    "eslint": "3.19.0",
+    "eslint-config-standard": "10.2.1",
+    "eslint-friendly-formatter": "3.0.0",
+    "eslint-loader": "1.7.1",
+    "eslint-plugin-html": "3.0.0",
+    "eslint-plugin-import": "2.7.0",
+    "eslint-plugin-node": "5.2.0",
+    "eslint-plugin-promise": "3.5.0",
+    "eslint-plugin-standard": "3.0.1",
+    "eventsource-polyfill": "0.9.6",
+    "extract-text-webpack-plugin": "3.0.0",
+    "file-loader": "1.1.4",
+    "friendly-errors-webpack-plugin": "1.6.1",
+    "html-webpack-plugin": "2.30.1",
+    "jest": "21.2.0",
+    "jest-serializer-vue": "0.3.0",
+    "nightwatch": "0.9.12",
+    "node-notifier": "5.1.2",
+    "optimize-css-assets-webpack-plugin": "3.2.0",
+    "ora": "1.2.0",
+    "portfinder": "1.0.13",
+    "postcss-import": "11.0.0",
+    "postcss-loader": "2.0.8",
+    "rimraf": "2.6.0",
+    "selenium-server": "3.0.1",
+    "semver": "5.3.0",
+    "shelljs": "0.8.3",
+    "uglifyjs-webpack-plugin": "1.1.1",
+    "url-loader": "0.5.8",
+    "vue-jest": "1.0.2",
+    "vue-loader": "13.3.0",
+    "vue-style-loader": "3.0.1",
+    "vue-template-compiler": "2.6.10",
+    "webpack": "3.6.0",
+    "webpack-bundle-analyzer": "3.3.2",
+    "webpack-dev-server": "2.9.1",
+    "webpack-merge": "4.1.0"
+  },
+  "engines": {
+    "node": ">= 8.11.1",
+    "npm": ">= 5.6.0"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not ie <= 8"
+  ]
+}

+ 15 - 0
src/App.vue

@@ -0,0 +1,15 @@
+<template>
+  <transition name="fade">
+    <router-view></router-view>
+  </transition>
+</template>
+
+<script>
+export default {
+  computed: {
+    key () {
+      return this.$route.path + Math.random()
+    }
+  }
+}
+</script>

二进制
src/assets/img/address.png


二进制
src/assets/img/avatar.png


二进制
src/assets/img/base_z36574a.png


二进制
src/assets/img/bg_mobile_head_default2968da.png


二进制
src/assets/img/buyer.png


二进制
src/assets/img/car.png


二进制
src/assets/img/index_z354723.png


二进制
src/assets/img/invoice.png


二进制
src/assets/img/line.png


二进制
src/assets/img/login-bg.png


二进制
src/assets/img/login-logo.png


二进制
src/assets/img/message.png


文件差异内容过多而无法显示
+ 1 - 0
src/assets/img/message.svg


二进制
src/assets/img/remarks.png


二进制
src/assets/img/revise.png


二进制
src/assets/img/time.png


二进制
src/assets/img/yami.png


+ 358 - 0
src/assets/scss/_base.scss

@@ -0,0 +1,358 @@
+*,
+*:before,
+*:after {
+  box-sizing: border-box;
+}
+body {
+  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
+  font-size: 14px;
+  line-height: 1.15;
+  color: #303133;
+  background-color: #fff;
+}
+a {
+  color: mix(#fff, $--color-primary, 20%);
+  text-decoration: none;
+  &:focus,
+  &:hover {
+    color: $--color-primary;
+    text-decoration: underline;
+  }
+}
+img {
+  vertical-align: middle;
+  max-width: 100%;
+}
+
+
+/* Utils
+------------------------------ */
+.clearfix:before,
+.clearfix:after {
+  content: " ";
+  display: table;
+}
+.clearfix:after {
+  clear: both;
+}
+
+
+/* Animation
+------------------------------ */
+.fade-enter-active,
+.fade-leave-active {
+  transition: opacity .5s;
+}
+.fade-enter,
+.fade-leave-to {
+  opacity: 0;
+}
+
+
+/* Reset element-ui
+------------------------------ */
+.site-wrapper {
+  .el-pagination {
+    text-align: right;
+  }
+}
+
+
+/* Layout
+------------------------------ */
+.site-wrapper {
+  position: relative;
+  min-width: 1180px;
+}
+
+
+/* Sidebar fold
+------------------------------ */
+.site-sidebar--fold {
+  .site-navbar__header,
+  .site-navbar__brand,
+  .site-sidebar,
+  .site-sidebar__inner,
+  .el-menu.site-sidebar__menu {
+    width: 64px;
+  }
+  .site-navbar__body,
+  .site-content__wrapper {
+    margin-left: 64px;
+  }
+  .site-navbar__brand {
+    &-lg {
+      display: none;
+    }
+    &-mini {
+      display: inline-block;
+    }
+  }
+  .site-sidebar,
+  .site-sidebar__inner {
+    overflow: initial;
+  }
+  .site-sidebar__menu-icon {
+    margin-right: 0;
+    font-size: 20px;
+  }
+  .site-content--tabs > .el-tabs > .el-tabs__header {
+    left: 64px;
+  }
+}
+// animation
+.site-navbar__header,
+.site-navbar__brand,
+.site-navbar__body,
+.site-sidebar,
+.site-sidebar__inner,
+.site-sidebar__menu.el-menu,
+.site-sidebar__menu-icon,
+.site-content__wrapper,
+.site-content--tabs > .el-tabs .el-tabs__header {
+  transition: inline-block .3s, left .3s, width .3s, margin-left .3s, font-size .3s;
+}
+
+
+/* Navbar
+------------------------------ */
+.site-navbar {
+  position: fixed;
+  top: 0;
+  right: 0;
+  left: 0;
+  z-index: 1030;
+  height: 50px;
+  box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
+  background-color: $navbar--background-color;
+
+  &--inverse {
+    .site-navbar__body {
+      background-color: transparent;
+    }
+    .el-menu {
+      > .el-menu-item,
+      > .el-submenu > .el-submenu__title {
+        color: #fff;
+        &:focus,
+        &:hover {
+          color: #fff;
+          background-color: mix(#000, $navbar--background-color, 15%);
+        }
+      }
+      > .el-menu-item.is-active,
+      > .el-submenu.is-active > .el-submenu__title {
+        border-bottom-color: mix(#fff, $navbar--background-color, 85%);
+      }
+      .el-menu-item i,
+      .el-submenu__title i,
+      .el-dropdown {
+        color: #fff;
+      }
+    }
+    .el-menu--popup-bottom-start {
+      background-color: $navbar--background-color;
+    }
+  }
+
+  &__header {
+    position: relative;
+    float: left;
+    width: 230px;
+    height: 50px;
+    overflow: hidden;
+  }
+  &__brand {
+    display: table-cell;
+    vertical-align: middle;
+    width: 230px;
+    height: 50px;
+    margin: 0;
+    line-height: 50px;
+    font-size: 20px;
+    text-align: center;
+    text-transform: uppercase;
+    white-space: nowrap;
+    color: #fff;
+
+    &-lg,
+    &-mini {
+      margin: 0 5px;
+      color: #fff;
+      &:focus,
+      &:hover {
+        color: #fff;
+        text-decoration: none;
+      }
+    }
+    &-mini {
+      display: none;
+    }
+  }
+  &__switch {
+    font-size: 18px;
+    border-bottom: none !important;
+  }
+  &__avatar {
+    border-bottom: none !important;
+    * {
+      vertical-align: inherit;
+    }
+    .el-dropdown-link {
+      > img {
+        width: 36px;
+        height: auto;
+        margin-right: 5px;
+        border-radius: 100%;
+        vertical-align: middle;
+      }
+    }
+  }
+  &__body {
+    position: relative;
+    margin-left: 230px;
+    padding-right: 15px;
+    background-color: #fff;
+  }
+  &__menu {
+    float: left;
+    background-color: transparent;
+    border-bottom: 0;
+
+    &--right {
+      float: right;
+    }
+    a:focus,
+    a:hover {
+      text-decoration: none;
+    }
+    .el-menu-item,
+    .el-submenu > .el-submenu__title {
+      height: 50px;
+      line-height: 50px;
+    }
+    .el-submenu > .el-menu {
+      top: 55px;
+    }
+    .el-badge {
+      display: inline;
+      z-index: 2;
+      &__content {
+        line-height: 16px;
+      }
+    }
+  }
+}
+
+
+/* Sidebar
+------------------------------ */
+.site-sidebar {
+  position: fixed;
+  top: 50px;
+  left: 0;
+  bottom: 0;
+  z-index: 1020;
+  width: 230px;
+  overflow: hidden;
+
+  &--dark,
+  &--dark-popper {
+    background-color: $sidebar--background-color-dark;
+    .site-sidebar__menu.el-menu,
+    > .el-menu--popup {
+      background-color: $sidebar--background-color-dark;
+      .el-menu-item,
+      .el-submenu > .el-submenu__title {
+        color: $sidebar--color-text-dark;
+        &:focus,
+        &:hover {
+          color: mix(#fff, $sidebar--color-text-dark, 50%);
+          background-color: mix(#fff, $sidebar--background-color-dark, 2.5%);
+        }
+      }
+      .el-menu,
+      .el-submenu.is-opened {
+        background-color: mix(#000, $sidebar--background-color-dark, 15%);
+      }
+      .el-menu-item.is-active,
+      .el-submenu.is-active > .el-submenu__title {
+        color: mix(#fff, $sidebar--color-text-dark, 80%);
+      }
+    }
+  }
+  &__inner {
+    position: relative;
+    z-index: 1;
+    width: 250px;
+    height: 100%;
+    padding-bottom: 15px;
+    overflow-y: scroll;
+  }
+  &__menu.el-menu {
+    width: 230px;
+    border-right: 0;
+  }
+  &__menu-icon {
+    width: 24px;
+    margin-right: 5px;
+    text-align: center;
+    font-size: 16px;
+    color: inherit !important;
+  }
+}
+
+
+/* Content
+------------------------------ */
+.site-content {
+  position: relative;
+  padding: 15px;
+
+  &__wrapper {
+    position: relative;
+    padding-top: 50px;
+    margin-left: 230px;
+    min-height: 100%;
+    background: $content--background-color;
+  }
+  &--tabs {
+    padding: 55px 0 0;
+  }
+  > .el-tabs {
+    > .el-tabs__header {
+      position: fixed;
+      top: 50px;
+      left: 230px;
+      right: 0;
+      z-index: 930;
+      padding: 0 55px 0 15px;
+      box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04);
+      background-color: #fff;
+      > .el-tabs__nav-wrap {
+        margin-bottom: 0;
+        &:after {
+          display: none;
+        }
+      }
+    }
+    > .el-tabs__content {
+      padding: 0 15px 15px;
+      > .site-tabs__tools {
+        position: fixed;
+        top: 50px;
+        right: 0;
+        z-index: 931;
+        height: 40px;
+        padding: 0 12px;
+        font-size: 16px;
+        line-height: 40px;
+        background-color: $content--background-color;
+        cursor: pointer;
+        .el-icon--right {
+          margin-left: 0;
+        }
+      }
+    }
+  }
+}

+ 447 - 0
src/assets/scss/_normalize.scss

@@ -0,0 +1,447 @@
+/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
+ *    IE on Windows Phone and in iOS.
+ */
+
+ html {
+  line-height: 1.15; /* 1 */
+  -ms-text-size-adjust: 100%; /* 2 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers (opinionated).
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Add the correct display in IE 9-.
+ */
+
+article,
+aside,
+footer,
+header,
+nav,
+section {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 9-.
+ * 1. Add the correct display in IE.
+ */
+
+figcaption,
+figure,
+main { /* 1 */
+  display: block;
+}
+
+/**
+ * Add the correct margin in IE 8.
+ */
+
+figure {
+  margin: 1em 40px;
+}
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * 1. Remove the gray background on active links in IE 10.
+ * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
+ */
+
+a {
+  background-color: transparent; /* 1 */
+  -webkit-text-decoration-skip: objects; /* 2 */
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57- and Firefox 39-.
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
+ */
+
+b,
+strong {
+  font-weight: inherit;
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font style in Android 4.3-.
+ */
+
+dfn {
+  font-style: italic;
+}
+
+/**
+ * Add the correct background and color in IE 9-.
+ */
+
+mark {
+  background-color: #ff0;
+  color: #000;
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 9-.
+ */
+
+audio,
+video {
+  display: inline-block;
+}
+
+/**
+ * Add the correct display in iOS 4-7.
+ */
+
+audio:not([controls]) {
+  display: none;
+  height: 0;
+}
+
+/**
+ * Remove the border on images inside links in IE 10-.
+ */
+
+img {
+  border-style: none;
+}
+
+/**
+ * Hide the overflow in IE.
+ */
+
+svg:not(:root) {
+  overflow: hidden;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers (opinionated).
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: sans-serif; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
+ *    controls in Android 4.
+ * 2. Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+html [type="button"], /* 1 */
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button; /* 2 */
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * 1. Add the correct display in IE 9-.
+ * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  display: inline-block; /* 1 */
+  vertical-align: baseline; /* 2 */
+}
+
+/**
+ * Remove the default vertical scrollbar in IE.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10-.
+ * 2. Remove the padding in IE 10-.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-cancel-button,
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in IE 9-.
+ * 1. Add the correct display in Edge, IE, and Firefox.
+ */
+
+details, /* 1 */
+menu {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Scripting
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 9-.
+ */
+
+canvas {
+  display: inline-block;
+}
+
+/**
+ * Add the correct display in IE.
+ */
+
+template {
+  display: none;
+}
+
+/* Hidden
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10-.
+ */
+
+[hidden] {
+  display: none;
+}

+ 13 - 0
src/assets/scss/_variables.scss

@@ -0,0 +1,13 @@
+// 站点主色
+// tips: 要达到整站主题修改效果, 请确保[$--color-primary]站点主色与[/src/element-ui-theme/index.js]文件中[import './element-[#17B3A3]/index.css']当前主题色一致
+$--color-primary: #02A1E9;
+
+// Navbar
+$navbar--background-color: $--color-primary;
+
+// Sidebar
+$sidebar--background-color-dark: #263238;
+$sidebar--color-text-dark: #8a979e;
+
+// Content
+$content--background-color: #f1f4f5;

+ 3 - 0
src/assets/scss/index.scss

@@ -0,0 +1,3 @@
+@import "normalize";       // api: https://github.com/necolas/normalize.css/
+@import "variables";       // 站点变量
+@import "base";

+ 72 - 0
src/components/file-upload/index.vue

@@ -0,0 +1,72 @@
+<template>
+  <div>
+    <el-upload
+      :action="$http.adornUrl('/admin/file/upload/element')"
+      :headers="{Authorization: $cookie.get('Authorization')}"
+      :on-remove="handleRemove"
+      :on-success="handleUploadSuccess"
+      :before-remove="beforeRemove"
+      :file-list="fileList"
+      multiple>
+      <el-button size="small" type="primary">点击上传</el-button>
+    </el-upload>
+  </div>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        resourcesUrl: window.SITE_CONFIG.resourcesUrl
+      }
+    },
+    props: {
+      value: {
+        default: '',
+        type: String
+      }
+    },
+    computed: {
+      fileList () {
+        let res = []
+        if (this.value) {
+          let fileArray = this.value.split(',')
+          for (let i = 0; i < fileArray.length; i++) {
+            res.push({name: fileArray[i], url: this.resourcesUrl + fileArray[i], response: fileArray[i]})
+          }
+        }
+        this.$emit('input', this.value)
+        return res
+      }
+    },
+    methods: {
+      // 图片上传
+      handleUploadSuccess (response, file, fileList) {
+        let files = fileList.map(file => {
+          return file.response
+        }).join(',')
+        this.$emit('change', files)
+      },
+      // 限制图片上传大小
+      beforeAvatarUpload (file) {
+        const isLt2M = file.size / 1024 / 1024 < 2
+        if (!isLt2M) {
+          this.$message.error('上传头像图片大小不能超过 2MB!')
+        }
+        return isLt2M
+      },
+      handleRemove (file, fileList) {
+        let files = fileList.map(file => {
+          return file.response
+        }).join(',')
+        this.$emit('change', files)
+      },
+      beforeRemove (file, fileList) {
+        return this.$confirm(`确定移除 ${file.name}?`)
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+</style>

+ 51 - 0
src/components/icon-svg/index.vue

@@ -0,0 +1,51 @@
+<template>
+  <svg
+    :class="getClassName"
+    :width="width"
+    :height="height"
+    aria-hidden="true">
+    <use :xlink:href="getName"></use>
+  </svg>
+</template>
+
+<script>
+  export default {
+    name: 'icon-svg',
+    props: {
+      name: {
+        type: String,
+        required: true
+      },
+      className: {
+        type: String
+      },
+      width: {
+        type: String
+      },
+      height: {
+        type: String
+      }
+    },
+    computed: {
+      getName () {
+        return `#icon-${this.name}`
+      },
+      getClassName () {
+        return [
+          'icon-svg',
+          `icon-svg__${this.name}`,
+          this.className && /\S/.test(this.className) ? `${this.className}` : ''
+        ]
+      }
+    }
+  }
+</script>
+
+<style>
+  .icon-svg {
+    width: 1em;
+    height: 1em;
+    fill: currentColor;
+    overflow: hidden;
+  }
+</style>

+ 79 - 0
src/components/mul-pic-upload/index.vue

@@ -0,0 +1,79 @@
+<template>
+  <div>
+    <el-upload
+      :action="$http.adornUrl('/admin/file/upload/element')"
+      :headers="{Authorization: $cookie.get('Authorization')}"
+      list-type="picture-card"
+      :on-preview="handlePictureCardPreview"
+      :on-remove="handleRemove"
+      :on-success="handleUploadSuccess"
+      :file-list="imageList"
+      :before-upload="beforeAvatarUpload">
+      <i class="el-icon-plus"></i>
+    </el-upload>
+    <el-dialog :visible.sync="dialogVisible">
+      <img width="100%" :src="dialogImageUrl" alt="">
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        dialogImageUrl: '',
+        dialogVisible: false,
+        resourcesUrl: window.SITE_CONFIG.resourcesUrl
+      }
+    },
+    props: {
+      value: {
+        default: '',
+        type: String
+      }
+    },
+    computed: {
+      imageList () {
+        let res = []
+        if (this.value) {
+          let imageArray = this.value.split(',')
+          for (let i = 0; i < imageArray.length; i++) {
+            res.push({url: this.resourcesUrl + imageArray[i], response: imageArray[i]})
+          }
+        }
+        this.$emit('input', this.value)
+        return res
+      }
+    },
+    methods: {
+      // 图片上传
+      handleUploadSuccess (response, file, fileList) {
+        let pics = fileList.map(file => {
+          return file.response
+        }).join(',')
+        this.$emit('input', pics)
+      },
+      // 限制图片上传大小
+      beforeAvatarUpload (file) {
+        const isLt2M = file.size / 1024 / 1024 < 2
+        if (!isLt2M) {
+          this.$message.error('上传头像图片大小不能超过 2MB!')
+        }
+        return isLt2M
+      },
+      handleRemove (file, fileList) {
+        let pics = fileList.map(file => {
+          return file.response
+        }).join(',')
+        this.$emit('input', pics)
+      },
+      handlePictureCardPreview (file) {
+        this.dialogImageUrl = file.url
+        this.dialogVisible = true
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+</style>

+ 71 - 0
src/components/pic-upload/index.vue

@@ -0,0 +1,71 @@
+<template>
+  <div>
+    <el-upload
+      class="pic-uploader-component"
+      :action="$http.adornUrl('/admin/file/upload/element')"
+      :headers="{Authorization: $cookie.get('Authorization')}"
+      :show-file-list="false"
+      :on-success="handleUploadSuccess"
+      :before-upload="beforeAvatarUpload">
+      <img v-if="value" :src="resourcesUrl + value" class="pic">
+      <i v-else class="el-icon-plus pic-uploader-icon"></i>
+    </el-upload>
+  </div>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        resourcesUrl: window.SITE_CONFIG.resourcesUrl
+      }
+    },
+    props: {
+      value: {
+        default: '',
+        type: String
+      }
+    },
+    methods: {
+      // 图片上传
+      handleUploadSuccess (response, file, fileList) {
+        this.$emit('input', file.response)
+      },
+      // 限制图片上传大小
+      beforeAvatarUpload (file) {
+        const isLt2M = file.size / 1024 / 1024 < 2
+        if (!isLt2M) {
+          this.$message.error('上传头像图片大小不能超过 2MB!')
+        }
+        return isLt2M
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  .pic-uploader-component .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+    .pic-uploader-icon {
+      font-size: 28px;
+      color: #8c939d;
+      width: 178px;
+      height: 178px;
+      line-height: 178px;
+      text-align: center;
+    }
+    .pic {
+      width: 178px;
+      height: 178px;
+      display: block;
+    }
+  }
+  .pic-uploader-component .el-upload:hover {
+    border-color: #409EFF;
+  }
+
+</style>

+ 71 - 0
src/components/prod-select/index.vue

@@ -0,0 +1,71 @@
+<template>
+  <div>
+    <el-upload
+      class="pic-uploader-component"
+      :action="$http.adornUrl('/admin/file/upload/element')"
+      :headers="{Authorization: $cookie.get('Authorization')}"
+      :show-file-list="false"
+      :on-success="handleUploadSuccess"
+      :before-upload="beforeAvatarUpload">
+      <img v-if="value" :src="resourcesUrl + value" class="pic">
+      <i v-else class="el-icon-plus pic-uploader-icon"></i>
+    </el-upload>
+  </div>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        resourcesUrl: window.SITE_CONFIG.resourcesUrl
+      }
+    },
+    props: {
+      value: {
+        default: '',
+        type: String
+      }
+    },
+    methods: {
+      // 图片上传
+      handleUploadSuccess (response, file, fileList) {
+        this.$emit('input', file.response)
+      },
+      // 限制图片上传大小
+      beforeAvatarUpload (file) {
+        const isLt2M = file.size / 1024 / 1024 < 2
+        if (!isLt2M) {
+          this.$message.error('上传头像图片大小不能超过 2MB!')
+        }
+        return isLt2M
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  .pic-uploader-component .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+    .pic-uploader-icon {
+      font-size: 28px;
+      color: #8c939d;
+      width: 178px;
+      height: 178px;
+      line-height: 178px;
+      text-align: center;
+    }
+    .pic {
+      width: 178px;
+      height: 178px;
+      display: block;
+    }
+  }
+  .pic-uploader-component .el-upload:hover {
+    border-color: #409EFF;
+  }
+
+</style>

+ 180 - 0
src/components/prods-select/index.vue

@@ -0,0 +1,180 @@
+<template>
+  <el-dialog title="选择商品"
+             :modal="false"
+             :close-on-click-modal="false"
+             :visible.sync="visible">
+    <el-table ref="prodTable"
+              :data="dataList"
+              border
+              v-loading="dataListLoading"
+              @selection-change="selectChangeHandle"
+              style="width: 100%;"
+              >
+      <el-table-column v-if="isSingle" width="50"
+                       header-align="center"
+                       align="center">
+        <template slot-scope="scope">
+          <div>
+            <el-radio :label="scope.row.prodId"
+                      v-model="singleSelectProdId"
+                      @change.native="getSelectProdRow(scope.row)">&nbsp;</el-radio>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column v-if="!isSingle"
+                       type="selection"
+                       header-align="center"
+                       align="center"
+                       width="50">
+      </el-table-column>
+      <el-table-column prop="prodName"
+                       header-align="center"
+                       align="center"
+                       label="产品名称">
+      </el-table-column>
+      <el-table-column align="center"
+                       width="140"
+                       label="产品图片">
+        <template slot-scope="scope">
+          <img :src="scope.row.pic"
+               width="100"
+               height="100" />
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination @size-change="sizeChangeHandle"
+                   @current-change="currentChangeHandle"
+                   :current-page="pageIndex"
+                   :page-sizes="[10, 20, 50, 100]"
+                   :page-size="pageSize"
+                   :total="totalPage"
+                   layout="total, sizes, prev, pager, next, jumper">
+    </el-pagination>
+    <span slot="footer">
+      <el-button type="primary"
+                 @click="visible = false">取消</el-button>
+      <el-button type="primary"
+                 @click="submitProds()">确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        product: ''
+      },
+      singleSelectProdId: 0,
+      allData: [],
+      selectProds: [],
+      dataList: [],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPage: 0,
+      dataListLoading: false,
+      dataListSelections: [],
+      addOrUpdateVisible: false
+    }
+  },
+  props: {
+    isSingle: {
+      default: false,
+      type: Boolean
+    }
+  },
+  activated () {
+    this.getDataList()
+  },
+  methods: {
+    // 获取数据列表
+    init (selectProds) {
+      this.selectProds = selectProds
+      this.visible = true
+      this.dataListLoading = true
+      if (this.selectProds) {
+        this.selectProds.forEach(row => {
+          this.dataListSelections.push(row)
+        })
+      }
+      this.getDataList()
+    },
+    getDataList () {
+      this.$http({
+        url: this.$http.adornUrl('/prod/prod/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign(
+            {
+              current: this.pageIndex,
+              size: this.pageSize
+            },
+            {
+              prodName: this.dataForm.prodName
+            }
+          )
+        )
+      }).then(({ data }) => {
+        this.dataList = data.records
+        this.totalPage = data.total
+        this.dataListLoading = false
+        if (this.selectProds) {
+          this.$nextTick(() => {
+            this.selectProds.forEach(row => {
+              let index = this.dataList.findIndex((prodItem) => prodItem.prodId === row.prodId)
+              this.$refs.prodTable.toggleRowSelection(this.dataList[index])
+            })
+          })
+        }
+      })
+    },
+    // 每页数
+    sizeChangeHandle (val) {
+      this.pageSize = val
+      this.pageIndex = 1
+      this.getDataList()
+    },
+    // 当前页
+    currentChangeHandle (val) {
+      this.pageIndex = val
+      this.getDataList()
+    },
+    // 单选商品事件
+    getSelectProdRow (row) {
+      this.dataListSelections = [row]
+    },
+    // 多选点击事件
+    selectChangeHandle (selection) {
+      this.dataList.forEach((tableItem) => {
+        let selectedProdIndex = selection.findIndex((selectedProd) => {
+          if (!selectedProd) {
+            return false
+          }
+          return selectedProd.prodId === tableItem.prodId
+        })
+        let dataSelectedProdIndex = this.dataListSelections.findIndex((dataSelectedProd) => dataSelectedProd.prodId === tableItem.prodId)
+        if (selectedProdIndex > -1 && dataSelectedProdIndex === -1) {
+          this.dataListSelections.push(tableItem)
+        } else if (selectedProdIndex === -1 && dataSelectedProdIndex > -1) {
+          this.dataListSelections.splice(dataSelectedProdIndex, 1)
+        }
+      })
+    },
+    // 确定事件
+    submitProds () {
+      let prods = []
+      this.dataListSelections.forEach(item => {
+        let prodIndex = prods.findIndex((prod) => prod.prodId === item.prodId)
+        if (prodIndex === -1) {
+          prods.push({ prodId: item.prodId, prodName: item.prodName, pic: item.pic })
+        }
+      })
+      this.$emit('refreshSelectProds', prods)
+      this.dataListSelections = []
+      this.visible = false
+    }
+  }
+}
+</script>

+ 223 - 0
src/components/tiny-mce/index.vue

@@ -0,0 +1,223 @@
+<template>
+  <div class="tinymce">
+    <textarea :id="tinymceId"></textarea>
+  </div>
+</template>
+
+<script>
+import tinymce from 'tinymce'
+import { getUUID } from '@/utils'
+export default {
+  data () {
+    const tinymceId = 'tinymce' + getUUID()
+    return {
+      flag: true,
+      tinymceId: tinymceId,
+      myEditor: null
+    }
+  },
+  props: {
+    value: {
+      default: ''
+    },
+    tinymceHeight: {
+      default: 500,
+      type: Number
+    }
+  },
+  watch: {
+    value (val) {
+      if (this.flag) {
+        this.setContent(val)
+      }
+      this.flag = true
+    }
+  },
+  mounted () {
+    this.init()
+  },
+  beforeDestroy () {
+    tinymce.remove(`#${this.tinymceId}`)
+  },
+  methods: {
+    init () {
+      const self = this
+      this.Editor = tinymce.init({
+        // 默认配置
+        ...this.getDefalutConfig(),
+
+        // 图片上传
+        images_upload_handler: (blobInfo, success, failure) => {
+          if (blobInfo.blob().size > self.maxSize) {
+            failure('文件体积过大')
+          }
+          const formData = new FormData()
+          formData.append('editorFile', blobInfo.blob())
+          this.$http({
+            url: this.$http.adornUrl(`/admin/file/upload/tinymceEditor`),
+            headers: {
+              'Content-Type': 'multipart/form-data',
+              'token': this.$cookie.get('token')
+            },
+            method: 'post',
+            data: formData
+          }).then(({ data }) => {
+            success(data)
+          }).catch(() => {
+            failure('服务器出了点小差')
+          })
+        },
+
+        // prop内传入的的config
+        ...this.config,
+
+        // 挂载的DOM对象
+        selector: `#${this.tinymceId}`,
+        setup: (editor) => {
+          self.myEditor = editor
+          editor.on(
+            'init', () => {
+              self.loading = false
+              if (self.value) {
+                editor.setContent(self.value)
+              } else {
+                editor.setContent('')
+              }
+            }
+          )
+          // 抛出 'input' 事件钩子,同步value数据
+          editor.on(
+            'input change undo redo execCommand', () => {
+              self.flag = false
+              self.$emit('input', editor.getContent())
+            }
+          )
+        }
+      })
+    },
+    getDefalutConfig () {
+      return {
+        // GLOBAL
+        height: this.tinymceHeight,
+        theme: 'modern',
+        language: 'zh_CN',
+        toolbar: `styleselect | fontselect | formatselect | fontsizeselect | forecolor backcolor | bold italic underline strikethrough | insertfile link image | table | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | preview removeformat  hr | paste code | undo redo | fullscreen `, // 需要的工具栏
+        plugins: `
+            paste
+            importcss
+            image
+            code
+            table
+            advlist
+            fullscreen
+            link
+            media
+            lists
+            textcolor
+            colorpicker
+            hr
+            preview
+          `,
+        // CONFIG
+        forced_root_block: 'p',
+        force_p_newlines: true,
+        importcss_append: true,
+
+        // CONFIG: ContentStyle 这块很重要, 在最后呈现的页面也要写入这个基本样式保证前后一致, `table`和`img`的问题基本就靠这个来填坑了
+        content_style: `
+            *                         { padding:0; margin:0; }
+            html, body                { height:100%; }
+            img                       { max-width:100%; display:block;height:auto; }
+            a                         { text-decoration: none; }
+            iframe                    { width: 100%; }
+            p                         { line-height:1.6; margin: 0px; }
+            table                     { word-wrap:break-word; word-break:break-all; max-width:100%; border:none; border-color:#999; }
+            .mce-object-iframe        { width:100%; box-sizing:border-box; margin:0; padding:0; }
+            ul,ol                     { list-style-position:inside; }
+          `,
+
+        insert_button_items: 'image link | inserttable',
+
+        // CONFIG: Paste
+        paste_retain_style_properties: 'all',
+        paste_word_valid_elements: '*[*]',        // word需要它
+        paste_data_images: false,                  // 粘贴的同时能把内容里的图片自动上传,非常强力的功能
+        paste_convert_word_fake_lists: false,     // 插入word文档需要该属性
+        paste_webkit_styles: 'all',
+        paste_merge_formats: true,
+        nonbreaking_force_tab: false,
+        paste_auto_cleanup_on_paste: false,
+
+        // CONFIG: Font
+        fontsize_formats: '10px 11px 12px 14px 16px 18px 20px 24px',
+
+        // CONFIG: StyleSelect
+        style_formats: [
+          {
+            title: '首行缩进',
+            block: 'p',
+            styles: { 'text-indent': '2em' }
+          },
+          {
+            title: '行高',
+            items: [
+              { title: '1', styles: { 'line-height': '1' }, inline: 'span' },
+              { title: '1.5', styles: { 'line-height': '1.5' }, inline: 'span' },
+              { title: '2', styles: { 'line-height': '2' }, inline: 'span' },
+              { title: '2.5', styles: { 'line-height': '2.5' }, inline: 'span' },
+              { title: '3', styles: { 'line-height': '3' }, inline: 'span' }
+            ]
+          }
+        ],
+
+        // FontSelect
+        font_formats: `
+            微软雅黑=微软雅黑;
+            宋体=宋体;
+            黑体=黑体;
+            仿宋=仿宋;
+            楷体=楷体;
+            隶书=隶书;
+            幼圆=幼圆;
+            Andale Mono=andale mono,times;
+            Arial=arial, helvetica,
+            sans-serif;
+            Arial Black=arial black, avant garde;
+            Book Antiqua=book antiqua,palatino;
+            Comic Sans MS=comic sans ms,sans-serif;
+            Courier New=courier new,courier;
+            Georgia=georgia,palatino;
+            Helvetica=helvetica;
+            Impact=impact,chicago;
+            Symbol=symbol;
+            Tahoma=tahoma,arial,helvetica,sans-serif;
+            Terminal=terminal,monaco;
+            Times New Roman=times new roman,times;
+            Trebuchet MS=trebuchet ms,geneva;
+            Verdana=verdana,geneva;
+            Webdings=webdings;
+            Wingdings=wingdings,zapf dingbats`,
+
+        // Tab
+        tabfocus_elements: ':prev,:next',
+        object_resizing: true,
+
+        // Image
+        imagetools_toolbar: 'rotateleft rotateright | flipv fliph | editimage imageoptions'
+      }
+    },
+    setContent (content) {
+      if (!content) {
+        return
+      }
+      this.myEditor.setContent(content)
+    },
+    getContent () {
+      return this.myEditor.getContent()
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+</style>

+ 68 - 0
src/crud/admin/form.js

@@ -0,0 +1,68 @@
+export const tableOption = {
+  border: true,
+  selection: true,
+  index: false,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '表单名称',
+    prop: 'formName',
+    search: true
+  }, {
+    label: '按钮文本',
+    prop: 'buttonName',
+    search: true
+  }, {
+    label: '提交次数',
+    prop: 'submitNum',
+    type: 'select',
+    dicData: [
+      {
+        label: '不做限制',
+        value: 0
+      }, {
+        label: '每个IP限填一次',
+        value: 1
+      }
+    ]
+  }, {
+    label: '开启验证',
+    prop: 'needValidation',
+    type: 'select',
+    dicData: [
+      {
+        label: '不需要',
+        value: 0
+      }, {
+        label: '需要',
+        value: 1
+      }
+    ]
+  }, {
+    label: '提交权限',
+    prop: 'submitPerm',
+    type: 'select',
+    dicData: [
+      {
+        label: '所有人',
+        value: 0
+      }, {
+        label: '仅会员可提交',
+        value: 1
+      }
+    ]
+  }]
+}

+ 45 - 0
src/crud/admin/indexImg.js

@@ -0,0 +1,45 @@
+export const tableOption = {
+  border: true,
+  selection: true,
+  index: false,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '轮播图片',
+    prop: 'imgUrl',
+    type: 'upload',
+    slot: true,
+    listType: 'picture-img'
+  }, {
+    label: '顺序',
+    prop: 'seq'
+  }, {
+    width: 150,
+    label: '状态',
+    prop: 'status',
+    search: true,
+    type: 'select',
+    dicData: [
+      {
+        label: '禁用',
+        value: 0
+      }, {
+        label: '正常',
+        value: 1
+      }
+    ]
+  }]
+}

+ 50 - 0
src/crud/admin/message.js

@@ -0,0 +1,50 @@
+export const tableOption = {
+  border: true,
+  index: false,
+  indexLabel: '序号',
+  selection: true,
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '创建时间',
+    prop: 'createTime'
+  },
+  {
+    label: '姓名',
+    prop: 'userName',
+    search: true
+  }, {
+    label: '邮箱',
+    prop: 'email'
+  }, {
+    label: '联系方式',
+    prop: 'contact'
+  }, {
+    label: '审核',
+    prop: 'status',
+    search: true,
+    slot: true,
+    type: 'select',
+    dicData: [
+      {
+        label: '未审核',
+        value: 0
+      }, {
+        label: '审核通过',
+        value: 1
+      }
+    ]
+  }]
+}

+ 74 - 0
src/crud/prod/prodComm.js

@@ -0,0 +1,74 @@
+export const tableOption = {
+  border: true,
+  index: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  align: 'center',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  column: [
+    {
+      label: '商品名',
+      prop: 'prodName',
+      search: true
+    },
+    {
+      label: '用户昵称',
+      prop: 'nickName',
+      slot: true
+    },
+    {
+      label: '记录时间',
+      prop: 'recTime',
+      width: '200'
+    },
+    {
+      label: '回复时间',
+      prop: 'replyTime',
+      width: '200',
+      dicData: [
+        {
+          label: '无',
+          value: ''
+        }
+      ]
+    },
+    {
+      label: '评价得分',
+      prop: 'score'
+    },
+    {
+      label: '是否匿名',
+      prop: 'isAnonymous',
+      dicData: [
+        {
+          label: '否',
+          value: 0
+        }, {
+          label: '是',
+          value: 1
+        }
+      ]
+    },
+    {
+      prop: 'status',
+      label: '审核状态',
+      search: true,
+      type: 'select',
+      dicData: [
+        {
+          label: '待审核',
+          value: 0
+        }, {
+          label: '审核通过',
+          value: 1
+        }, {
+          label: '审核未通过',
+          value: -1
+        }
+      ]
+    }
+  ]
+}

+ 57 - 0
src/crud/prod/prodList.js

@@ -0,0 +1,57 @@
+export const tableOption = {
+  border: true,
+  selection: true,
+  index: false,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '产品名字',
+    prop: 'prodName',
+    search: true
+  }, {
+    label: '商品原价',
+    prop: 'oriPrice'
+  }, {
+    label: '商品现价',
+    prop: 'price'
+  }, {
+    label: '商品库存',
+    prop: 'totalStocks'
+  }, {
+    label: '产品图片',
+    prop: 'pic',
+    type: 'upload',
+    width: 150,
+    listType: 'picture-img'
+
+  }, {
+    width: 150,
+    label: '状态',
+    prop: 'status',
+    search: true,
+    slot: true,
+    type: 'select',
+    dicData: [
+      {
+        label: '未上架',
+        value: 0
+      }, {
+        label: '上架',
+        value: 1
+      }
+    ]
+  }]
+}

+ 43 - 0
src/crud/prod/prodTag.js

@@ -0,0 +1,43 @@
+export const tableOption = {
+  border: true,
+  index: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  align: 'center',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  column: [
+    {
+      label: '标签名称',
+      prop: 'title',
+      search: true
+    },
+    {
+      label: '状态',
+      prop: 'status',
+      type: 'select',
+      slot: true,
+      search: true,
+      dicData: [
+        {
+          label: '禁用',
+          value: 0
+        }, {
+          label: '正常',
+          value: 1
+        }
+      ]
+    },
+    {
+      label: '默认类型',
+      prop: 'isDfault',
+      slot: true
+    },
+    {
+      label: '排序',
+      prop: 'seq'
+    }
+  ]
+}

+ 31 - 0
src/crud/prod/spec.js

@@ -0,0 +1,31 @@
+export const tableOption = {
+  border: true,
+  index: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  viewBtn: false,
+  delBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '属性ID',
+    prop: 'propId'
+  }, {
+    label: '属性名称',
+    prop: 'propName',
+    search: true
+  }, {
+    label: '属性值',
+    prop: 'prodPropValues',
+    slot: true
+  }]
+}

+ 50 - 0
src/crud/shop/hotSearch.js

@@ -0,0 +1,50 @@
+export const tableOption = {
+  border: true,
+  index: false,
+  selection: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  align: 'center',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  column: [
+    {
+      label: '热搜标题',
+      prop: 'title',
+      search: true
+    },
+    {
+      label: '热搜内容',
+      prop: 'content',
+      search: true
+    },
+    {
+      label: '录入时间',
+      prop: 'recDate',
+      sortable: true
+    },
+    {
+      label: '顺序',
+      prop: 'seq',
+      sortable: true
+    },
+    {
+      label: '启用状态',
+      prop: 'status',
+      type: 'select',
+      slot: true,
+      search: true,
+      dicData: [
+        {
+          label: '未启用',
+          value: 0
+        }, {
+          label: '启用',
+          value: 1
+        }
+      ]
+    }
+  ]
+}

+ 50 - 0
src/crud/shop/notice.js

@@ -0,0 +1,50 @@
+export const tableOption = {
+  border: true,
+  index: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  align: 'center',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  column: [
+    {
+      label: '公告内容',
+      prop: 'title',
+      search: true
+    },
+    {
+      label: '状态',
+      prop: 'status',
+      search: true,
+      slot: true,
+      type: 'select',
+      dicData: [
+        {
+          label: '撤销',
+          value: 0
+        }, {
+          label: '公布',
+          value: 1
+        }
+      ]
+    },
+    {
+      label: '是否置顶',
+      prop: 'isTop',
+      search: true,
+      slot: true,
+      type: 'select',
+      dicData: [
+        {
+          label: '否',
+          value: 0
+        }, {
+          label: '是',
+          value: 1
+        }
+      ]
+    }
+  ]
+}

+ 41 - 0
src/crud/shop/pickAddr.js

@@ -0,0 +1,41 @@
+export const tableOption = {
+  border: true,
+  index: false,
+  selection: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  viewBtn: false,
+  delBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [
+    {
+      label: '自提点名称',
+      prop: 'addrName',
+      search: true
+    }, {
+      label: '手机号',
+      prop: 'mobile'
+    }, {
+      label: '省份',
+      prop: 'province'
+    }, {
+      label: '城市',
+      prop: 'city'
+    }, {
+      label: '区/县',
+      prop: 'area'
+    }, {
+      label: '地址',
+      prop: 'addr'
+    }]
+}

+ 25 - 0
src/crud/shop/transport.js

@@ -0,0 +1,25 @@
+export const tableOption = {
+  border: true,
+  index: false,
+  selection: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '模板名称',
+    prop: 'transName',
+    search: true
+  }]
+}

+ 28 - 0
src/crud/sys/area.js

@@ -0,0 +1,28 @@
+export const tableOption = {
+  border: true,
+  index: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  align: 'center',
+  addBtn: false,
+  editBtn: false,
+  column: [
+    {
+      label: '',
+      prop: 'areaId'
+    },
+    {
+      label: '',
+      prop: 'areaName'
+    },
+    {
+      label: '',
+      prop: 'parentId'
+    },
+    {
+      label: '',
+      prop: 'level'
+    }
+  ]
+}

+ 31 - 0
src/crud/sys/config.js

@@ -0,0 +1,31 @@
+export const tableOption = {
+  border: true,
+  selection: true,
+  index: false,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '参数名',
+    prop: 'paramKey',
+    search: true
+  }, {
+    label: '参数值',
+    prop: 'paramValue'
+  }, {
+    label: '备注',
+    prop: 'remark'
+  }]
+}

+ 45 - 0
src/crud/sys/log.js

@@ -0,0 +1,45 @@
+export const tableOption = {
+  border: true,
+  menu: false, // 移除操作栏
+  selection: true,
+  index: false,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '用户名',
+    prop: 'username',
+    search: true
+  }, {
+    label: '用户操作',
+    prop: 'operation',
+    search: true
+  }, {
+    label: '请求方法',
+    prop: 'method'
+  }, {
+    label: '请求参数',
+    prop: 'params'
+  }, {
+    label: '执行时长(毫秒)',
+    prop: 'time'
+  }, {
+    label: 'IP地址',
+    prop: 'ip'
+  }, {
+    label: '创建时间',
+    prop: 'createDate'
+  }]
+}

+ 31 - 0
src/crud/sys/role.js

@@ -0,0 +1,31 @@
+export const tableOption = {
+  border: true,
+  selection: true,
+  index: false,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '角色名称',
+    prop: 'roleName',
+    search: true
+  }, {
+    label: '备注',
+    prop: 'remark'
+  }, {
+    label: '创建时间',
+    prop: 'createTime'
+  }]
+}

+ 48 - 0
src/crud/sys/user.js

@@ -0,0 +1,48 @@
+export const tableOption = {
+  border: true,
+  selection: true,
+  index: false,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '用户名',
+    prop: 'username',
+    search: true
+  }, {
+    label: '邮箱',
+    prop: 'email'
+  }, {
+    label: '手机号',
+    prop: 'mobile'
+  }, {
+    label: '创建时间',
+    prop: 'createTime'
+  }, {
+    label: '状态',
+    prop: 'status',
+    type: 'select',
+    dicData: [
+      {
+        label: '禁用',
+        value: 0
+      }, {
+        label: '正常',
+        value: 1
+      }
+    ]
+
+  }]
+}

+ 78 - 0
src/crud/user/addr.js

@@ -0,0 +1,78 @@
+export const tableOption = {
+  border: true,
+  index: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  align: 'center',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  column: [
+    {
+      label: '收货人名称',
+      prop: 'receiver'
+    },
+    {
+      label: '省',
+      prop: 'province'
+    },
+    {
+      label: '城市',
+      prop: 'city'
+    },
+    {
+      label: '区',
+      prop: 'area'
+    },
+    {
+      label: '地址',
+      prop: 'addr'
+    },
+    {
+      label: '邮编',
+      prop: 'postCode'
+    },
+    {
+      label: '手机',
+      prop: 'mobile'
+    },
+    {
+      label: '状态',
+      prop: 'status',
+      search: true,
+      type: 'select',
+      dicData: [
+        {
+          label: '无效',
+          value: 0
+        }, {
+          label: '正常',
+          value: 1
+        }
+      ]
+    },
+    {
+      label: '默认地址',
+      prop: 'commonAddr',
+      dicData: [
+        {
+          label: '否',
+          value: 0
+        }, {
+          label: '是',
+          value: 1
+        }
+      ]
+    },
+    {
+      label: '建立时间',
+      prop: 'createTime'
+    },
+    {
+      label: '更新时间',
+      prop: 'updateTime'
+    }
+  ]
+}

+ 47 - 0
src/crud/user/user.js

@@ -0,0 +1,47 @@
+export const tableOption = {
+  border: true,
+  selection: true,
+  index: false,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  menuWidth: 350,
+  align: 'center',
+  refreshBtn: true,
+  searchSize: 'mini',
+  addBtn: false,
+  editBtn: false,
+  delBtn: false,
+  viewBtn: false,
+  props: {
+    label: 'label',
+    value: 'value'
+  },
+  column: [{
+    label: '用户昵称',
+    prop: 'nickName',
+    search: true
+  }, {
+    label: '用户头像',
+    prop: 'pic',
+    type: 'upload',
+    imgWidth: 150,
+    listType: 'picture-img'
+  }, {
+    label: '状态',
+    prop: 'status',
+    search: true,
+    type: 'select',
+    slot: true,
+    dicData: [
+      {
+        label: '禁用',
+        value: 0
+      }, {
+        label: '正常',
+        value: 1
+      }
+    ]
+
+  }]
+}

二进制
src/element-ui-theme/fonts/element-icons.ttf


二进制
src/element-ui-theme/fonts/element-icons.woff


文件差异内容过多而无法显示
+ 1 - 0
src/element-ui-theme/style.css


+ 156 - 0
src/element-ui/index.js

@@ -0,0 +1,156 @@
+/**
+ * UI组件, 统一使用饿了么桌面端组件库(https://github.com/ElemeFE/element)
+ *
+ * 使用:
+ *  1. 项目中需要的组件进行释放(解开注释)
+ *
+ * 注意:
+ *  1. 打包只会包含释放(解开注释)的组件, 减少打包文件大小
+ */
+import Vue from 'vue'
+import {
+  Scrollbar,
+  Pagination,
+  Dialog,
+  Autocomplete,
+  Dropdown,
+  DropdownMenu,
+  DropdownItem,
+  Menu,
+  Submenu,
+  MenuItem,
+  MenuItemGroup,
+  Input,
+  InputNumber,
+  Radio,
+  RadioGroup,
+  RadioButton,
+  Checkbox,
+  CheckboxButton,
+  CheckboxGroup,
+  Switch,
+  Select,
+  Option,
+  OptionGroup,
+  Button,
+  ButtonGroup,
+  Table,
+  TableColumn,
+  DatePicker,
+  TimeSelect,
+  TimePicker,
+  Popover,
+  Tooltip,
+  Breadcrumb,
+  BreadcrumbItem,
+  Form,
+  FormItem,
+  Tabs,
+  TabPane,
+  Tag,
+  Tree,
+  Alert,
+  Slider,
+  Icon,
+  Row,
+  Col,
+  Upload,
+  Progress,
+  Badge,
+  Card,
+  Rate,
+  Steps,
+  Step,
+  Carousel,
+  CarouselItem,
+  Collapse,
+  CollapseItem,
+  Cascader,
+  ColorPicker,
+  Transfer,
+  Container,
+  Header,
+  Aside,
+  Main,
+  Footer,
+  Loading,
+  MessageBox,
+  Message,
+  Notification
+} from 'element-ui'
+
+Vue.use(Pagination)
+Vue.use(Dialog)
+Vue.use(Autocomplete)
+Vue.use(Dropdown)
+Vue.use(DropdownMenu)
+Vue.use(DropdownItem)
+Vue.use(Menu)
+Vue.use(Submenu)
+Vue.use(MenuItem)
+Vue.use(MenuItemGroup)
+Vue.use(Input)
+Vue.use(InputNumber)
+Vue.use(Radio)
+Vue.use(RadioGroup)
+Vue.use(RadioButton)
+Vue.use(Checkbox)
+Vue.use(CheckboxButton)
+Vue.use(CheckboxGroup)
+Vue.use(Switch)
+Vue.use(Select)
+Vue.use(Option)
+Vue.use(OptionGroup)
+Vue.use(Button)
+Vue.use(ButtonGroup)
+Vue.use(Table)
+Vue.use(TableColumn)
+Vue.use(DatePicker)
+Vue.use(TimeSelect)
+Vue.use(TimePicker)
+Vue.use(Popover)
+Vue.use(Tooltip)
+Vue.use(Breadcrumb)
+Vue.use(BreadcrumbItem)
+Vue.use(Form)
+Vue.use(FormItem)
+Vue.use(Tabs)
+Vue.use(TabPane)
+Vue.use(Tag)
+Vue.use(Tree)
+Vue.use(Alert)
+Vue.use(Slider)
+Vue.use(Icon)
+Vue.use(Row)
+Vue.use(Col)
+Vue.use(Upload)
+Vue.use(Progress)
+Vue.use(Badge)
+Vue.use(Card)
+Vue.use(Rate)
+Vue.use(Steps)
+Vue.use(Step)
+Vue.use(Carousel)
+Vue.use(CarouselItem)
+Vue.use(Collapse)
+Vue.use(CollapseItem)
+Vue.use(Cascader)
+Vue.use(ColorPicker)
+Vue.use(Transfer)
+Vue.use(Container)
+Vue.use(Header)
+Vue.use(Aside)
+Vue.use(Main)
+Vue.use(Footer)
+Vue.use(Scrollbar)
+Vue.use(Loading.directive)
+
+Vue.prototype.$loading = Loading.service
+Vue.prototype.$msgbox = MessageBox
+Vue.prototype.$alert = MessageBox.alert
+Vue.prototype.$confirm = MessageBox.confirm
+Vue.prototype.$prompt = MessageBox.prompt
+Vue.prototype.$notify = Notification
+Vue.prototype.$message = Message
+
+Vue.prototype.$ELEMENT = { size: 'medium' }

+ 0 - 0
src/icons/iconfont.js


+ 27 - 0
src/icons/index.js

@@ -0,0 +1,27 @@
+/**
+ * 字体图标, 统一使用SVG Sprite矢量图标(http://www.iconfont.cn/)
+ * 8a8a8a 32
+ * 使用:
+ *  1. 在阿里矢量图标站创建一个项目, 并添加图标(这一步非必须, 创建方便项目图标管理)
+ *  2-1. 添加icon, 选中新增的icon图标, 复制代码 -> 下载 -> SVG下载 -> 粘贴代码(重命名)
+ *  2-2. 添加icons, 下载图标库对应[iconfont.js]文件, 替换项目[./iconfont.js]文件
+ *  3. 组件模版中使用 [<icon-svg name="canyin"></icon-svg>]
+ *
+ * 注意:
+ *  1. 通过2-2 添加icons, getNameList方法无法返回对应数据
+ */
+import Vue from 'vue'
+import IconSvg from '@/components/icon-svg'
+import './iconfont.js'
+
+Vue.component('IconSvg', IconSvg)
+
+const svgFiles = require.context('./svg', true, /\.svg$/)
+const iconList = svgFiles.keys().map(item => svgFiles(item))
+
+export default {
+  // 获取图标icon-(*).svg名称列表, 例如[shouye, xitong, zhedie, ...]
+  getNameList () {
+    return iconList.map(item => item.default.id.split('-')[1])
+  }
+}

文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-admin.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-bianji.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-config.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-dangdifill.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-daohang.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-duanxin.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-editor.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-form.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-geren.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-jiesuo.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-job.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-log.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-menu.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-mudedi.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-order.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-oss.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-pinglun.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-prod.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-role.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-shanchu.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-shezhi.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-shoucang.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-shoucangfill.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-shouye.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-sousuo.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-sql.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-store.svg


文件差异内容过多而无法显示
+ 1 - 0
src/icons/svg/icon-suoding.svg


+ 0 - 0
src/icons/svg/icon-system.svg


部分文件因为文件数量过多而无法显示