├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build ├── build.js ├── check-versions.js ├── logo.png ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── dev.env.js ├── index.js ├── prod.env.js └── proxyConfig.js ├── favicon.ico ├── index.html ├── package.json ├── src ├── App.vue ├── assets │ ├── css │ │ ├── global.scss │ │ ├── index.scss │ │ ├── mixin.scss │ │ ├── norm.scss │ │ └── reset.scss │ ├── font │ │ ├── demo.css │ │ ├── demo_fontclass.html │ │ ├── demo_symbol.html │ │ ├── demo_unicode.html │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ ├── images │ │ └── culture │ │ │ ├── bg_blue.png │ │ │ ├── bg_bottom.png │ │ │ ├── bg_bottom2.png │ │ │ ├── bg_hong.png │ │ │ ├── bg_map.png │ │ │ ├── default_rank.png │ │ │ ├── ico_biao.png │ │ │ ├── ico_chao.png │ │ │ ├── ico_jinpai.png │ │ │ ├── ico_jinpai2.png │ │ │ └── ico_zi.png │ └── js │ │ ├── flexible.js │ │ └── vconsole.min.js ├── components │ ├── culture │ │ ├── index.vue │ │ └── list.vue │ └── home.vue ├── core │ ├── api │ │ ├── api.js │ │ └── config │ │ │ ├── http.js │ │ │ └── params.js │ ├── directive │ │ └── directive.js │ ├── global │ │ └── global.js │ ├── native │ │ └── native.js │ ├── store │ │ ├── actions.js │ │ ├── getters.js │ │ ├── index.js │ │ ├── mutations.js │ │ └── state.js │ └── tempConfig │ │ └── tempConfig.js ├── main.js └── router │ └── index.js └── static ├── .gitkeep ├── favicon.ico └── vconsole.min.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2", 10 | ["es2015", { "modules": false }] 11 | ], 12 | "plugins": ["transform-vue-jsx", "transform-runtime",["component", [ 13 | { 14 | "libraryName": "mint-ui", 15 | "style": true 16 | } 17 | ]]] 18 | } 19 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | .vscode 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue_dev_temp 2 | 1.Vue,开发版模板搭建,配置了路由,服务(api),指令,公用组件,加入了Vuex组件,scss,公共库,加入mint_ui配置,上手即用,使用整体更加清爽. 3 | # 进入模板注意检查 4 | 1.config>index.js来配置跨域代理 5 | 2.core>api>config>http.js 替换代理的条件 6 | 后续再补充 7 | -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/build/logo.png -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const postcssLoader = { 26 | loader: 'postcss-loader', 27 | options: { 28 | sourceMap: options.sourceMap 29 | } 30 | } 31 | 32 | // generate loader string to be used with extract text plugin 33 | function generateLoaders (loader, loaderOptions) { 34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 35 | 36 | if (loader) { 37 | loaders.push({ 38 | loader: loader + '-loader', 39 | options: Object.assign({}, loaderOptions, { 40 | sourceMap: options.sourceMap 41 | }) 42 | }) 43 | } 44 | 45 | // Extract CSS when that option is specified 46 | // (which is the case during production build) 47 | if (options.extract) { 48 | return ExtractTextPlugin.extract({ 49 | use: loaders, 50 | fallback: 'vue-style-loader', 51 | publicPath:'../../' 52 | }) 53 | } else { 54 | return ['vue-style-loader'].concat(loaders) 55 | } 56 | } 57 | 58 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 59 | return { 60 | css: generateLoaders(), 61 | postcss: generateLoaders(), 62 | less: generateLoaders('less'), 63 | sass: generateLoaders('sass', { indentedSyntax: true }), 64 | scss: generateLoaders('sass').concat( 65 | { 66 | loader: 'sass-resources-loader', 67 | options: { 68 | resources: path.resolve(__dirname, '../src/assets/css/index.scss') 69 | } 70 | } 71 | ), 72 | stylus: generateLoaders('stylus'), 73 | styl: generateLoaders('stylus') 74 | } 75 | } 76 | 77 | // Generate loaders for standalone style files (outside of .vue) 78 | exports.styleLoaders = function (options) { 79 | const output = [] 80 | const loaders = exports.cssLoaders(options) 81 | 82 | for (const extension in loaders) { 83 | const loader = loaders[extension] 84 | output.push({ 85 | test: new RegExp('\\.' + extension + '$'), 86 | use: loader 87 | }) 88 | } 89 | 90 | return output 91 | } 92 | 93 | exports.createNotifierCallback = () => { 94 | const notifier = require('node-notifier') 95 | 96 | return (severity, errors) => { 97 | if (severity !== 'error') return 98 | 99 | const error = errors[0] 100 | const filename = error.file && error.file.split('!').pop() 101 | 102 | notifier.notify({ 103 | title: packageConfig.name, 104 | message: severity + ': ' + error.name, 105 | subtitle: filename || '', 106 | icon: path.join(__dirname, 'logo.png') 107 | }) 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | const vueLoaderConfig = require('./vue-loader.conf') 6 | 7 | function resolve (dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | 12 | 13 | module.exports = { 14 | context: path.resolve(__dirname, '../'), 15 | entry: { 16 | app: './src/main.js' 17 | }, 18 | output: { 19 | path: config.build.assetsRoot, 20 | filename: '[name].js', 21 | publicPath: process.env.NODE_ENV === 'production' 22 | ? config.build.assetsPublicPath 23 | : config.dev.assetsPublicPath 24 | }, 25 | resolve: { 26 | extensions: ['.js', '.vue', '.json'], 27 | alias: { 28 | 'vue$': 'vue/dist/vue.esm.js', 29 | '@': resolve('src'), 30 | } 31 | }, 32 | module: { 33 | rules: [ 34 | { 35 | test: /\.vue$/, 36 | loader: 'vue-loader', 37 | options: vueLoaderConfig 38 | }, 39 | { 40 | test: /\.js$/, 41 | loader: 'babel-loader', 42 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 43 | }, 44 | { 45 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 46 | loader: 'url-loader', 47 | options: { 48 | limit: 10000, 49 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 50 | } 51 | }, 52 | { 53 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 54 | loader: 'url-loader', 55 | options: { 56 | limit: 10000, 57 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 58 | } 59 | }, 60 | { 61 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 62 | loader: 'url-loader', 63 | options: { 64 | limit: 10000, 65 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 66 | } 67 | } 68 | ] 69 | }, 70 | node: { 71 | // prevent webpack from injecting useless setImmediate polyfill because Vue 72 | // source contains it (although only uses it if it's native). 73 | setImmediate: false, 74 | // prevent webpack from injecting mocks to Node native modules 75 | // that does not make sense for the client 76 | dgram: 'empty', 77 | fs: 'empty', 78 | net: 'empty', 79 | tls: 'empty', 80 | child_process: 'empty' 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const path = require('path') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 11 | const portfinder = require('portfinder') 12 | 13 | const HOST = process.env.HOST 14 | const PORT = process.env.PORT && Number(process.env.PORT) 15 | 16 | const devWebpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 19 | }, 20 | // cheap-module-eval-source-map is faster for development 21 | devtool: config.dev.devtool, 22 | 23 | // these devServer options should be customized in /config/index.js 24 | devServer: { 25 | clientLogLevel: 'warning', 26 | historyApiFallback: { 27 | rewrites: [ 28 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, 29 | ], 30 | }, 31 | hot: true, 32 | contentBase: false, // since we use CopyWebpackPlugin. 33 | compress: true, 34 | host: HOST || config.dev.host, 35 | port: PORT || config.dev.port, 36 | open: config.dev.autoOpenBrowser, 37 | overlay: config.dev.errorOverlay 38 | ? { warnings: false, errors: true } 39 | : false, 40 | publicPath: config.dev.assetsPublicPath, 41 | proxy: config.dev.proxyTable, 42 | quiet: true, // necessary for FriendlyErrorsPlugin 43 | watchOptions: { 44 | poll: config.dev.poll, 45 | } 46 | }, 47 | plugins: [ 48 | new webpack.DefinePlugin({ 49 | 'process.env': require('../config/dev.env') 50 | }), 51 | new webpack.HotModuleReplacementPlugin(), 52 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 53 | new webpack.NoEmitOnErrorsPlugin(), 54 | // https://github.com/ampedandwired/html-webpack-plugin 55 | new HtmlWebpackPlugin({ 56 | filename: 'index.html', 57 | template: 'index.html', 58 | inject: true, 59 | favicon: path.resolve('favicon.ico') 60 | }), 61 | // copy custom static assets 62 | new CopyWebpackPlugin([ 63 | { 64 | from: path.resolve(__dirname, '../static'), 65 | to: config.dev.assetsSubDirectory, 66 | ignore: ['.*'] 67 | } 68 | ]) 69 | ] 70 | }) 71 | 72 | module.exports = new Promise((resolve, reject) => { 73 | portfinder.basePort = process.env.PORT || config.dev.port 74 | portfinder.getPort((err, port) => { 75 | if (err) { 76 | reject(err) 77 | } else { 78 | // publish the new Port, necessary for e2e tests 79 | process.env.PORT = port 80 | // add port to devServer config 81 | devWebpackConfig.devServer.port = port 82 | 83 | // Add FriendlyErrorsPlugin 84 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 85 | compilationSuccessInfo: { 86 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 87 | }, 88 | onErrors: config.dev.notifyOnErrors 89 | ? utils.createNotifierCallback() 90 | : undefined 91 | })) 92 | 93 | resolve(devWebpackConfig) 94 | } 95 | }) 96 | }) 97 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const webpack = require('webpack') 5 | const config = require('../config') 6 | const merge = require('webpack-merge') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 13 | 14 | const env = require('../config/prod.env') 15 | 16 | const webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true, 21 | usePostCSS: true 22 | }) 23 | }, 24 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 25 | output: { 26 | path: config.build.assetsRoot, 27 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 29 | }, 30 | plugins: [ 31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | new UglifyJsPlugin({ 36 | uglifyOptions: { 37 | compress: { 38 | warnings: false 39 | } 40 | }, 41 | sourceMap: config.build.productionSourceMap, 42 | parallel: true 43 | }), 44 | // extract css into its own file 45 | new ExtractTextPlugin({ 46 | filename: utils.assetsPath('css/[name].[contenthash].css'), 47 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 51 | allChunks: true, 52 | }), 53 | // Compress extracted CSS. We are using this plugin so that possible 54 | // duplicated CSS from different components can be deduped. 55 | new OptimizeCSSPlugin({ 56 | cssProcessorOptions: config.build.productionSourceMap 57 | ? { safe: true, map: { inline: false } } 58 | : { safe: true } 59 | }), 60 | // generate dist index.html with correct asset hash for caching. 61 | // you can customize output by editing /index.html 62 | // see https://github.com/ampedandwired/html-webpack-plugin 63 | new HtmlWebpackPlugin({ 64 | filename: config.build.index, 65 | template: 'index.html', 66 | inject: true, 67 | favicon: path.resolve('favicon.ico'), 68 | minify: { 69 | removeComments: true, 70 | collapseWhitespace: true, 71 | removeAttributeQuotes: true 72 | // more options: 73 | // https://github.com/kangax/html-minifier#options-quick-reference 74 | }, 75 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 76 | chunksSortMode: 'dependency' 77 | }), 78 | // keep module.id stable when vendor modules does not change 79 | new webpack.HashedModuleIdsPlugin(), 80 | // enable scope hoisting 81 | new webpack.optimize.ModuleConcatenationPlugin(), 82 | // split vendor js into its own file 83 | new webpack.optimize.CommonsChunkPlugin({ 84 | name: 'vendor', 85 | minChunks (module) { 86 | // any required modules inside node_modules are extracted to vendor 87 | return ( 88 | module.resource && 89 | /\.js$/.test(module.resource) && 90 | module.resource.indexOf( 91 | path.join(__dirname, '../node_modules') 92 | ) === 0 93 | ) 94 | } 95 | }), 96 | // extract webpack runtime and module manifest to its own file in order to 97 | // prevent vendor hash from being updated whenever app bundle is updated 98 | new webpack.optimize.CommonsChunkPlugin({ 99 | name: 'manifest', 100 | minChunks: Infinity 101 | }), 102 | // This instance extracts shared chunks from code splitted chunks and bundles them 103 | // in a separate chunk, similar to the vendor chunk 104 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 105 | new webpack.optimize.CommonsChunkPlugin({ 106 | name: 'app', 107 | async: 'vendor-async', 108 | children: true, 109 | minChunks: 3 110 | }), 111 | 112 | // copy custom static assets 113 | new CopyWebpackPlugin([ 114 | { 115 | from: path.resolve(__dirname, '../static'), 116 | to: config.build.assetsSubDirectory, 117 | ignore: ['.*'] 118 | } 119 | ]) 120 | ] 121 | }) 122 | 123 | if (config.build.productionGzip) { 124 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 125 | 126 | webpackConfig.plugins.push( 127 | new CompressionWebpackPlugin({ 128 | asset: '[path].gz[query]', 129 | algorithm: 'gzip', 130 | test: new RegExp( 131 | '\\.(' + 132 | config.build.productionGzipExtensions.join('|') + 133 | ')$' 134 | ), 135 | threshold: 10240, 136 | minRatio: 0.8 137 | }) 138 | ) 139 | } 140 | 141 | if (config.build.bundleAnalyzerReport) { 142 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 143 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 144 | } 145 | 146 | module.exports = webpackConfig 147 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"', 7 | BASE_API: '""', 8 | }) 9 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | const URL = 'http://192.168.2.117:8005'; 8 | 9 | module.exports = { 10 | dev: { 11 | // Paths 12 | assetsSubDirectory: 'static', 13 | assetsPublicPath: '/', 14 | proxyTable: { 15 | '/apis': { 16 | target:URL , // 接口域名 17 | secure: false, // 如果是https接口,需要配置这个参数 18 | changeOrigin: true, //是否跨域 19 | pathRewrite: { 20 | '^/apis': '' //需要rewrite的, 21 | } 22 | } 23 | }, 24 | 25 | // proxyTable: {}, 26 | 27 | // Various Dev Server settings 28 | host: '0.0.0.0', // can be overwritten by process.env.HOST 29 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 30 | autoOpenBrowser: false, 31 | errorOverlay: true, 32 | notifyOnErrors: true, 33 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 34 | 35 | 36 | /** 37 | * Source Maps 38 | */ 39 | 40 | // https://webpack.js.org/configuration/devtool/#development 41 | devtool: 'cheap-module-eval-source-map', 42 | 43 | // If you have problems debugging vue-files in devtools, 44 | // set this to false - it *may* help 45 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 46 | cacheBusting: true, 47 | 48 | cssSourceMap: true, 49 | 50 | //代理配置开始 51 | 52 | 53 | //代理配置结束 54 | }, 55 | 56 | build: { 57 | // Template for index.html 58 | index: path.resolve(__dirname, '../dist/index.html'), 59 | 60 | // Paths 61 | assetsRoot: path.resolve(__dirname, '../dist'), 62 | assetsSubDirectory: 'static', 63 | assetsPublicPath: './', 64 | 65 | /** 66 | * Source Maps 67 | */ 68 | 69 | productionSourceMap: true, 70 | // https://webpack.js.org/configuration/devtool/#production 71 | devtool: '#source-map', 72 | 73 | // Gzip off by default as many popular static hosts such as 74 | // Surge or Netlify already gzip all static assets for you. 75 | // Before setting to `true`, make sure to: 76 | // npm install --save-dev compression-webpack-plugin 77 | productionGzip: false, 78 | productionGzipExtensions: ['js', 'css'], 79 | 80 | // Run the build command with an extra argument to 81 | // View the bundle analyzer report after build finishes: 82 | // `npm run build --report` 83 | // Set to `true` or `false` to always turn it on or off 84 | bundleAnalyzerReport: process.env.npm_config_report 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /config/proxyConfig.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | proxy: 3 | } -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/favicon.ico -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 传统文化传承人 8 | 9 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "temp_vue_cli", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "Msea", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "axios": "^0.18.0", 14 | "lodash": "^4.17.11", 15 | "mint-ui": "^2.2.13", 16 | "vue": "^2.5.2", 17 | "vue-axios": "^2.1.1", 18 | "vue-router": "^3.0.1", 19 | "vue-wechat-title": "^2.0.4", 20 | "vuex": "^3.0.1" 21 | }, 22 | "devDependencies": { 23 | "autoprefixer": "^7.1.2", 24 | "babel-core": "^6.22.1", 25 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 26 | "babel-loader": "^7.1.1", 27 | "babel-plugin-component": "^1.1.1", 28 | "babel-plugin-syntax-jsx": "^6.18.0", 29 | "babel-plugin-transform-runtime": "^6.22.0", 30 | "babel-plugin-transform-vue-jsx": "^3.5.0", 31 | "babel-preset-env": "^1.3.2", 32 | "babel-preset-es2015": "^6.24.1", 33 | "babel-preset-stage-2": "^6.22.0", 34 | "chalk": "^2.0.1", 35 | "copy-webpack-plugin": "^4.0.1", 36 | "css-loader": "^0.28.0", 37 | "extract-text-webpack-plugin": "^3.0.0", 38 | "file-loader": "^1.1.4", 39 | "friendly-errors-webpack-plugin": "^1.6.1", 40 | "html-webpack-plugin": "^2.30.1", 41 | "node-notifier": "^5.1.2", 42 | "node-sass": "^4.9.2", 43 | "optimize-css-assets-webpack-plugin": "^3.2.0", 44 | "ora": "^1.2.0", 45 | "portfinder": "^1.0.13", 46 | "postcss-import": "^11.0.0", 47 | "postcss-loader": "^2.0.8", 48 | "postcss-url": "^7.2.1", 49 | "rimraf": "^2.6.0", 50 | "sass-loader": "^7.0.3", 51 | "sass-resources-loader": "^1.3.3", 52 | "semver": "^5.3.0", 53 | "shelljs": "^0.7.6", 54 | "uglifyjs-webpack-plugin": "^1.1.1", 55 | "url-loader": "^0.5.8", 56 | "vue-cli": "^2.9.6", 57 | "vue-loader": "^13.3.0", 58 | "vue-style-loader": "^3.0.1", 59 | "vue-template-compiler": "^2.5.2", 60 | "vuex": "^3.0.1", 61 | "webpack": "^3.6.0", 62 | "webpack-bundle-analyzer": "^2.9.0", 63 | "webpack-dev-server": "^2.9.1", 64 | "webpack-merge": "^4.1.0" 65 | }, 66 | "engines": { 67 | "node": ">= 6.0.0", 68 | "npm": ">= 3.0.0" 69 | }, 70 | "browserslist": [ 71 | "> 1%", 72 | "last 2 versions", 73 | "not ie <= 8" 74 | ] 75 | } 76 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/assets/css/global.scss: -------------------------------------------------------------------------------- 1 | #app { 2 | font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; 3 | -webkit-font-smoothing: antialiased; 4 | -moz-osx-font-smoothing: grayscale; 5 | color: #555555; 6 | overflow-x: hidden; 7 | line-height: 160%; 8 | } 9 | .allScr{ 10 | position: fixed; 11 | top:0; 12 | left:0; 13 | right:0; 14 | bottom:0; 15 | } 16 | dl{margin-bottom: 0;} 17 | dt{font-weight: normal;} 18 | input{border: 0;outline: 0;} 19 | .l{float:left;} 20 | .r{float:right;} 21 | .tr{text-align: right;} 22 | .tc{text-align: center;} 23 | .lv{color: #7CF9FB !important;} 24 | .vc{display: inline-block;vertical-align: middle;} 25 | .flex { 26 | display: -webkit-flex; 27 | display: -webkit-box; 28 | display: -ms-flexbox; 29 | display: flex; 30 | } 31 | .flex_none{ 32 | -webkit-flex: none; 33 | -webkit-box-flex: 0; 34 | -ms-flex: none; 35 | flex: none; 36 | } 37 | .justify-start { 38 | -webkit-justify-content: flex-start; 39 | -webkit-box-pack: start; 40 | -ms-flex-pack: start; 41 | justify-content: flex-start; 42 | } 43 | .justify-between { 44 | -webkit-justify-content: space-between; 45 | -webkit-box-pack: justify; 46 | -ms-flex-pack: justify; 47 | justify-content: space-between; 48 | } 49 | .justify-center{ 50 | -webkit-box-align:center; 51 | -webkit-align-items:center; 52 | -ms-flex-align:center; 53 | align-items:center;} 54 | 55 | .culture{ 56 | background-color:#2BC2F4; 57 | @include setRem("padding",40,20,80,20); 58 | @include allcover; 59 | overflow: auto; 60 | color: #fff; 61 | } 62 | .culture.padding0{padding-right:0;} 63 | 64 | 65 | 66 | .around{ 67 | animation: aroundAnimation 0.3s infinite; 68 | -moz-animation: aroundAnimation 0.3s infinite; /* Firefox */ 69 | -webkit-animation: aroundAnimation 0.3s infinite; /* Safari 和 Chrome */ 70 | } 71 | 72 | .scale{ 73 | animation: scaleAnimation 1s; 74 | -moz-animation: scaleAnimation 1s; /* Firefox */ 75 | -webkit-animation: scaleAnimation 1s; /* Safari 和 Chrome */ 76 | } 77 | 78 | @keyframes scaleAnimation{ 79 | 0%{ 80 | transform:scale(0.3); 81 | } 82 | 100%{ 83 | transform:scale(1); 84 | } 85 | } 86 | 87 | @keyframes aroundAnimation{ 88 | 0%, 89 | 100%{ 90 | transition-timing-function: cubic-bezier(0.215,.61,.355,1); 91 | transform: translateX(0) rotate(0deg); 92 | } 93 | 45%{ 94 | transition-timing-function: cubic-bezier(0.755,0.050,0.855,0.060); 95 | transform: translateX(-10px) rotate(-30deg); 96 | } 97 | 90%{ 98 | transform: translateX(10px) rotate(30deg); 99 | } 100 | } 101 | 102 | /*禁止长按默认粘贴*/ 103 | 104 | *{ 105 | -webkit-touch-callout:none; /*系统默认菜单被禁用*/ 106 | -webkit-user-select:none; /*webkit浏览器*/ 107 | -khtml-user-select:none; /*早期浏览器*/ 108 | -moz-user-select:none; /*火狐*/ 109 | -ms-user-select:none; /*IE10*/ 110 | user-select:none; 111 | } 112 | /*解决导致 导致input输入框不可用,*/ 113 | input{ 114 | -webkit-user-select: auto; 115 | } 116 | /*禁止长按默认粘贴结束*/ 117 | -------------------------------------------------------------------------------- /src/assets/css/index.scss: -------------------------------------------------------------------------------- 1 | @import "./mixin.scss"; 2 | @import "./global.scss"; 3 | @import "./norm.scss"; 4 | @import "../font/iconfont.css"; 5 | // reset此处无效 mian.js引入 6 | // @import "./reset.scss"; 7 | 8 | -------------------------------------------------------------------------------- /src/assets/css/mixin.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | 4 | // 背景图片地址和大小 5 | @mixin bis($url) { 6 | background-image: url("../../assets/images/"+$url); 7 | background-repeat: no-repeat; 8 | background-size: 100% 100%; 9 | } 10 | 11 | @mixin backgroundImg($url,$left,$top) { 12 | background-image: url("../../assets/images/"+$url); 13 | background-position: $left $top; 14 | background-repeat: no-repeat; 15 | background-size:100% auto; 16 | } 17 | 18 | 19 | @mixin borderRadius($radius) { 20 | -webkit-border-radius: $radius; 21 | -moz-border-radius: $radius; 22 | -ms-border-radius: $radius; 23 | -o-border-radius: $radius; 24 | border-radius: $radius; 25 | } 26 | //定位全屏 27 | @mixin allcover{ 28 | position:fixed; 29 | top:0; 30 | left:0; 31 | right:0; 32 | bottom:0; 33 | } 34 | 35 | //定位上下左右居中 36 | @mixin center { 37 | position: absolute; 38 | top: 50%; 39 | left: 50%; 40 | transform: translate(-50%, -50%); 41 | } 42 | 43 | //定位上下居中 44 | @mixin ct { 45 | position: absolute; 46 | top: 50%; 47 | transform: translateY(-50%); 48 | } 49 | 50 | //定位上下居中 51 | @mixin cl { 52 | position: absolute; 53 | left: 50%; 54 | transform: translateX(-50%); 55 | } 56 | //居中 57 | 58 | @mixin vc { 59 | display: inline-block; 60 | vertical-align:middle; 61 | } 62 | 63 | //宽高 64 | @mixin wh($width, $height){ 65 | width: $width/$fontSize+rem; 66 | height: $height/$fontSize+rem; 67 | } 68 | 69 | //字体大小、行高、字体 70 | @mixin font($size, $line-height, $family: 'Microsoft YaHei') { 71 | font: #{$size}/#{$line-height} $family; 72 | } 73 | 74 | //字体大小,颜色 75 | @mixin sc($size, $color){ 76 | font-size: $size; 77 | color: $color; 78 | } 79 | 80 | //flex 布局和 子元素 对其方式 81 | @mixin fj($type: space-between){ 82 | display: flex; 83 | justify-content: $type; 84 | } 85 | //flex 布局和 子元素 对其方式 86 | @mixin fjt{ 87 | display: flex; 88 | flex-flow: column; 89 | justify-content: center; 90 | } 91 | // 字体响应式宏命令 92 | //淘宝字体响应式基准字体为75 93 | $fontSize:75; 94 | 95 | @function r($px){ 96 | @return $px/$fontSize+rem; 97 | } 98 | 99 | 100 | // 例 101 | /* 102 | div{ 103 | width:r(200); 104 | } 105 | */ 106 | 107 | // 四值计算 108 | @mixin setRem($name,$val...){ 109 | // ...固定写法,向后若干个值 110 | $max:length($val);//4 111 | $str:""; 112 | // 从1开始到$max(4) 113 | @for $i from 1 through $max{ 114 | $value:nth($val,$i)/$fontSize;//2.17391 115 | $str:$str+$value+rem; //4.34783rem 116 | 117 | @if $i<$max{ 118 | $str:#{$str+" "};//4.34783rem空格4.34783rem空格 119 | } 120 | } 121 | #{$name}:$str; 122 | } 123 | 124 | 125 | @mixin varticSdow($val,$x,$y,$n){ 126 | box-shadow: $x+px $y+px $n+px $val; 127 | } 128 | -------------------------------------------------------------------------------- /src/assets/css/norm.scss: -------------------------------------------------------------------------------- 1 | $mainColor:#2bc2f4; 2 | 3 | // 灰色 4 | $huiQ:#f6f6f6; 5 | $huiS:#999; 6 | $blue:#2BC2F4; 7 | //垂直阴影 8 | 9 | //常用字号 10 | $s11:22; 11 | $s13:26; 12 | $s14:28; 13 | $s16:32; 14 | 15 | 16 | .s8{font-size:r(16);} 17 | .s10{font-size:r(20);} 18 | .s11{font-size:r(22);} 19 | .s12{font-size:r(24);} 20 | .s13{font-size:r(26);} 21 | .s14{font-size:r(28);} 22 | .s15{font-size:r(30);} 23 | .s16{font-size:r(32);} 24 | .s18{font-size:r(36);} 25 | .s20{font-size:r(40);} 26 | .s22{font-size:r(44);} 27 | .s24{font-size:r(48);} 28 | .s36{font-size:r(72);} 29 | .mT05{margin-top:r(10);} 30 | .mT1{margin-top:r(20);} 31 | .mT2{margin-top:r(40);} 32 | 33 | #intr b{ 34 | font-weight: bold; 35 | } 36 | /*mint_ui m*/ 37 | .mint-msgbox-cancel,.mint-msgbox-confirm{ 38 | font-size: r(32); 39 | } 40 | -------------------------------------------------------------------------------- /src/assets/css/reset.scss: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, menu, nav, section { 29 | display: block; 30 | } 31 | body { 32 | line-height: 1; 33 | } 34 | ol, ul { 35 | list-style: none; 36 | } 37 | 38 | 39 | blockquote, q { 40 | quotes: none; 41 | } 42 | blockquote:before, blockquote:after, 43 | q:before, q:after { 44 | content: ''; 45 | content: none; 46 | } 47 | table { 48 | border-collapse: collapse; 49 | border-spacing: 0; 50 | } 51 | 52 | a { 53 | margin:0; 54 | padding:0; 55 | border:0; 56 | font-size:100%; 57 | vertical-align:baseline; 58 | background:transparent; 59 | } 60 | 61 | em,i{font-style:inherit;} 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/assets/font/demo.css: -------------------------------------------------------------------------------- 1 | *{margin: 0;padding: 0;list-style: none;} 2 | /* 3 | KISSY CSS Reset 4 | 理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。 5 | 2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。 6 | 3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。 7 | 特色:1. 适应中文;2. 基于最新主流浏览器。 8 | 维护:玉伯, 正淳 9 | */ 10 | 11 | /** 清除内外边距 **/ 12 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ 13 | dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ 14 | pre, /* text formatting elements 文本格式元素 */ 15 | form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */ 16 | th, td /* table elements 表格元素 */ { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | /** 设置默认字体 **/ 22 | body, 23 | button, input, select, textarea /* for ie */ { 24 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif; 25 | } 26 | h1, h2, h3, h4, h5, h6 { font-size: 100%; } 27 | address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */ 28 | code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */ 29 | small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */ 30 | 31 | /** 重置列表元素 **/ 32 | ul, ol { list-style: none; } 33 | 34 | /** 重置文本格式元素 **/ 35 | a { text-decoration: none; } 36 | a:hover { text-decoration: underline; } 37 | 38 | 39 | /** 重置表单元素 **/ 40 | legend { color: #000; } /* for ie6 */ 41 | fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */ 42 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */ 43 | /* 注:optgroup 无法扶正 */ 44 | 45 | /** 重置表格元素 **/ 46 | table { border-collapse: collapse; border-spacing: 0; } 47 | 48 | /* 清除浮动 */ 49 | .ks-clear:after, .clear:after { 50 | content: '\20'; 51 | display: block; 52 | height: 0; 53 | clear: both; 54 | } 55 | .ks-clear, .clear { 56 | *zoom: 1; 57 | } 58 | 59 | .main { 60 | padding: 30px 100px; 61 | width: 960px; 62 | margin: 0 auto; 63 | } 64 | .main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;} 65 | 66 | .helps{margin-top:40px;} 67 | .helps pre{ 68 | padding:20px; 69 | margin:10px 0; 70 | border:solid 1px #e7e1cd; 71 | background-color: #fffdef; 72 | overflow: auto; 73 | } 74 | 75 | .icon_lists{ 76 | width: 100% !important; 77 | 78 | } 79 | 80 | .icon_lists li{ 81 | float:left; 82 | width: 100px; 83 | height:180px; 84 | text-align: center; 85 | list-style: none !important; 86 | } 87 | .icon_lists .icon{ 88 | font-size: 42px; 89 | line-height: 100px; 90 | margin: 10px 0; 91 | color:#333; 92 | -webkit-transition: font-size 0.25s ease-out 0s; 93 | -moz-transition: font-size 0.25s ease-out 0s; 94 | transition: font-size 0.25s ease-out 0s; 95 | 96 | } 97 | .icon_lists .icon:hover{ 98 | font-size: 100px; 99 | } 100 | 101 | 102 | 103 | .markdown { 104 | color: #666; 105 | font-size: 14px; 106 | line-height: 1.8; 107 | } 108 | 109 | .highlight { 110 | line-height: 1.5; 111 | } 112 | 113 | .markdown img { 114 | vertical-align: middle; 115 | max-width: 100%; 116 | } 117 | 118 | .markdown h1 { 119 | color: #404040; 120 | font-weight: 500; 121 | line-height: 40px; 122 | margin-bottom: 24px; 123 | } 124 | 125 | .markdown h2, 126 | .markdown h3, 127 | .markdown h4, 128 | .markdown h5, 129 | .markdown h6 { 130 | color: #404040; 131 | margin: 1.6em 0 0.6em 0; 132 | font-weight: 500; 133 | clear: both; 134 | } 135 | 136 | .markdown h1 { 137 | font-size: 28px; 138 | } 139 | 140 | .markdown h2 { 141 | font-size: 22px; 142 | } 143 | 144 | .markdown h3 { 145 | font-size: 16px; 146 | } 147 | 148 | .markdown h4 { 149 | font-size: 14px; 150 | } 151 | 152 | .markdown h5 { 153 | font-size: 12px; 154 | } 155 | 156 | .markdown h6 { 157 | font-size: 12px; 158 | } 159 | 160 | .markdown hr { 161 | height: 1px; 162 | border: 0; 163 | background: #e9e9e9; 164 | margin: 16px 0; 165 | clear: both; 166 | } 167 | 168 | .markdown p, 169 | .markdown pre { 170 | margin: 1em 0; 171 | } 172 | 173 | .markdown > p, 174 | .markdown > blockquote, 175 | .markdown > .highlight, 176 | .markdown > ol, 177 | .markdown > ul { 178 | width: 80%; 179 | } 180 | 181 | .markdown ul > li { 182 | list-style: circle; 183 | } 184 | 185 | .markdown > ul li, 186 | .markdown blockquote ul > li { 187 | margin-left: 20px; 188 | padding-left: 4px; 189 | } 190 | 191 | .markdown > ul li p, 192 | .markdown > ol li p { 193 | margin: 0.6em 0; 194 | } 195 | 196 | .markdown ol > li { 197 | list-style: decimal; 198 | } 199 | 200 | .markdown > ol li, 201 | .markdown blockquote ol > li { 202 | margin-left: 20px; 203 | padding-left: 4px; 204 | } 205 | 206 | .markdown code { 207 | margin: 0 3px; 208 | padding: 0 5px; 209 | background: #eee; 210 | border-radius: 3px; 211 | } 212 | 213 | .markdown pre { 214 | border-radius: 6px; 215 | background: #f7f7f7; 216 | padding: 20px; 217 | } 218 | 219 | .markdown pre code { 220 | border: none; 221 | background: #f7f7f7; 222 | margin: 0; 223 | } 224 | 225 | .markdown strong, 226 | .markdown b { 227 | font-weight: 600; 228 | } 229 | 230 | .markdown > table { 231 | border-collapse: collapse; 232 | border-spacing: 0px; 233 | empty-cells: show; 234 | border: 1px solid #e9e9e9; 235 | width: 95%; 236 | margin-bottom: 24px; 237 | } 238 | 239 | .markdown > table th { 240 | white-space: nowrap; 241 | color: #333; 242 | font-weight: 600; 243 | 244 | } 245 | 246 | .markdown > table th, 247 | .markdown > table td { 248 | border: 1px solid #e9e9e9; 249 | padding: 8px 16px; 250 | text-align: left; 251 | } 252 | 253 | .markdown > table th { 254 | background: #F7F7F7; 255 | } 256 | 257 | .markdown blockquote { 258 | font-size: 90%; 259 | color: #999; 260 | border-left: 4px solid #e9e9e9; 261 | padding-left: 0.8em; 262 | margin: 1em 0; 263 | font-style: italic; 264 | } 265 | 266 | .markdown blockquote p { 267 | margin: 0; 268 | } 269 | 270 | .markdown .anchor { 271 | opacity: 0; 272 | transition: opacity 0.3s ease; 273 | margin-left: 8px; 274 | } 275 | 276 | .markdown .waiting { 277 | color: #ccc; 278 | } 279 | 280 | .markdown h1:hover .anchor, 281 | .markdown h2:hover .anchor, 282 | .markdown h3:hover .anchor, 283 | .markdown h4:hover .anchor, 284 | .markdown h5:hover .anchor, 285 | .markdown h6:hover .anchor { 286 | opacity: 1; 287 | display: inline-block; 288 | } 289 | 290 | .markdown > br, 291 | .markdown > p > br { 292 | clear: both; 293 | } 294 | 295 | 296 | .hljs { 297 | display: block; 298 | background: white; 299 | padding: 0.5em; 300 | color: #333333; 301 | overflow-x: auto; 302 | } 303 | 304 | .hljs-comment, 305 | .hljs-meta { 306 | color: #969896; 307 | } 308 | 309 | .hljs-string, 310 | .hljs-variable, 311 | .hljs-template-variable, 312 | .hljs-strong, 313 | .hljs-emphasis, 314 | .hljs-quote { 315 | color: #df5000; 316 | } 317 | 318 | .hljs-keyword, 319 | .hljs-selector-tag, 320 | .hljs-type { 321 | color: #a71d5d; 322 | } 323 | 324 | .hljs-literal, 325 | .hljs-symbol, 326 | .hljs-bullet, 327 | .hljs-attribute { 328 | color: #0086b3; 329 | } 330 | 331 | .hljs-section, 332 | .hljs-name { 333 | color: #63a35c; 334 | } 335 | 336 | .hljs-tag { 337 | color: #333333; 338 | } 339 | 340 | .hljs-title, 341 | .hljs-attr, 342 | .hljs-selector-id, 343 | .hljs-selector-class, 344 | .hljs-selector-attr, 345 | .hljs-selector-pseudo { 346 | color: #795da3; 347 | } 348 | 349 | .hljs-addition { 350 | color: #55a532; 351 | background-color: #eaffea; 352 | } 353 | 354 | .hljs-deletion { 355 | color: #bd2c00; 356 | background-color: #ffecec; 357 | } 358 | 359 | .hljs-link { 360 | text-decoration: underline; 361 | } 362 | 363 | pre{ 364 | background: #fff; 365 | } 366 | 367 | 368 | 369 | 370 | 371 | -------------------------------------------------------------------------------- /src/assets/font/demo_fontclass.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IconFont 7 | 8 | 9 | 10 | 11 |
12 |

IconFont 图标

13 |
    14 | 15 |
  • 16 | 17 |
    尖括号-细-右
    18 |
    .icon-r_j
    19 |
  • 20 | 21 |
22 | 23 |

font-class引用

24 |
25 | 26 |

font-class是unicode使用方式的一种变种,主要是解决unicode书写不直观,语意不明确的问题。

27 |

与unicode使用方式相比,具有如下特点:

28 |
    29 |
  • 兼容性良好,支持ie8+,及所有现代浏览器。
  • 30 |
  • 相比于unicode语意明确,书写更直观。可以很容易分辨这个icon是什么。
  • 31 |
  • 因为使用class来定义图标,所以当要替换图标时,只需要修改class里面的unicode引用。
  • 32 |
  • 不过因为本质上还是使用的字体,所以多色图标还是不支持的。
  • 33 |
34 |

使用步骤如下:

35 |

第一步:引入项目下面生成的fontclass代码:

36 | 37 | 38 |
<link rel="stylesheet" type="text/css" href="./iconfont.css">
39 |

第二步:挑选相应图标并获取类名,应用于页面:

40 |
<i class="iconfont icon-xxx"></i>
41 |
42 |

"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。

43 |
44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /src/assets/font/demo_symbol.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IconFont 7 | 8 | 9 | 10 | 24 | 25 | 26 |
27 |

IconFont 图标

28 |
    29 | 30 |
  • 31 | 34 |
    尖括号-细-右
    35 |
    #icon-r_j
    36 |
  • 37 | 38 |
39 | 40 | 41 |

symbol引用

42 |
43 | 44 |

这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 45 | 这种用法其实是做了一个svg的集合,与另外两种相比具有如下特点:

46 |
    47 |
  • 支持多色图标了,不再受单色限制。
  • 48 |
  • 通过一些技巧,支持像字体那样,通过font-size,color来调整样式。
  • 49 |
  • 兼容性较差,支持 ie9+,及现代浏览器。
  • 50 |
  • 浏览器渲染svg的性能一般,还不如png。
  • 51 |
52 |

使用步骤如下:

53 |

第一步:引入项目下面生成的symbol代码:

54 |
<script src="./iconfont.js"></script>
55 |

第二步:加入通用css代码(引入一次就行):

56 |
<style type="text/css">
57 | .icon {
58 |    width: 1em; height: 1em;
59 |    vertical-align: -0.15em;
60 |    fill: currentColor;
61 |    overflow: hidden;
62 | }
63 | </style>
64 |

第三步:挑选相应图标并获取类名,应用于页面:

65 |
<svg class="icon" aria-hidden="true">
66 |   <use xlink:href="#icon-xxx"></use>
67 | </svg>
68 |         
69 |
70 | 71 | 72 | -------------------------------------------------------------------------------- /src/assets/font/demo_unicode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IconFont 7 | 8 | 9 | 29 | 30 | 31 |
32 |

IconFont 图标

33 |
    34 | 35 |
  • 36 | 37 |
    尖括号-细-右
    38 |
    &#xe6c8;
    39 |
  • 40 | 41 |
42 |

unicode引用

43 |
44 | 45 |

unicode是字体在网页端最原始的应用方式,特点是:

46 |
    47 |
  • 兼容性最好,支持ie6+,及所有现代浏览器。
  • 48 |
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • 49 |
  • 但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。
  • 50 |
51 |
52 |

注意:新版iconfont支持多色图标,这些多色图标在unicode模式下将不能使用,如果有需求建议使用symbol的引用方式

53 |
54 |

unicode使用步骤如下:

55 |

第一步:拷贝项目下面生成的font-face

56 |
@font-face {
57 |   font-family: 'iconfont';
58 |   src: url('iconfont.eot');
59 |   src: url('iconfont.eot?#iefix') format('embedded-opentype'),
60 |   url('iconfont.woff') format('woff'),
61 |   url('iconfont.ttf') format('truetype'),
62 |   url('iconfont.svg#iconfont') format('svg');
63 | }
64 | 
65 |

第二步:定义使用iconfont的样式

66 |
.iconfont{
67 |   font-family:"iconfont" !important;
68 |   font-size:16px;font-style:normal;
69 |   -webkit-font-smoothing: antialiased;
70 |   -webkit-text-stroke-width: 0.2px;
71 |   -moz-osx-font-smoothing: grayscale;
72 | }
73 | 
74 |

第三步:挑选相应图标并获取字体编码,应用于页面

75 |
<i class="iconfont">&#x33;</i>
76 | 77 |
78 |

"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。

79 |
80 |
81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/assets/font/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.eot?t=1533268080108'); /* IE9*/ 4 | src: url('iconfont.eot?t=1533268080108#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAT4AAsAAAAAB1AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW7kiyY21hcAAAAYAAAABeAAABhpxYBr5nbHlmAAAB4AAAAS0AAAE8mP3grmhlYWQAAAMQAAAALwAAADYSMybWaGhlYQAAA0AAAAAcAAAAJAfeA4RobXR4AAADXAAAAAwAAAAMC+kAAGxvY2EAAANoAAAACAAAAAgAdgCebWF4cAAAA3AAAAAfAAAAIAESAF1uYW1lAAADkAAAAUUAAAJtPlT+fXBvc3QAAATYAAAAIAAAADFzcuQJeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/sE4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVDw7wdzwv4EhhrmBoQEozAiSAwAyNA00eJzFkMENgDAMAy9t6QMxCA8G4sUcHbGTdI1iQnkwQS05VhxLiQIsQBQPMYFdGA9OueZ+ZHU/eSZLjUBptXf1nyqiWXYNKplpsHmr/9i87qPTVyiDOrHVl4QbU50OrwAAeJwdjztOw0AARHfW7NoJzhqv/05M4phkQYFIGCcUiKShAVEgUVFyAGjTUERICAoKzoCQOABtago4BYILcAGDYTR6mvINYYT8fGgLLSQOWSfb5ICcEAI+QFfQBKkqhnQAL2Ve4ApNZSrVs+5Q20fQ5a6fj4t+wHVuQWAVO2k+VkOqMComdA+5nwBRMz6VvZbUHlAP1epNeUQf4bWzljXZKg83p27ecYyZKWUk5b3BGTMoXbIELgK/xmp1Xj4xK/YW7Q3ahhmp+Pis0WnK87viMukFNWA+h9PsiOepHdtVr2LfkZG+0jDCuJGtuZh9LYeOmfQ/SRX8gb7Q1+orge/q/9q7GBcKfQE/oNecl+86TFvHyHPLN902wXHLBCu/uS2qbTm5g4hD2PwXlZQuBAAAAHicY2BkYGAAYkMt18vx/DZfGbhZGEDgeufHAgT9/yELA7MEkMvBwAQSBQApggqvAHicY2BkYGBu+N/AEMPCAAJAkpEBFTADAEcJAmwEAAAAA+kAAAQAAAAAAAAAAHYAnnicY2BkYGBgZghkYGUAASYg5gJCBob/YD4DABD3AXAAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicY2BigAAuBuyAmZGJkZmRhYGxgrkoPouBAQALNgHT') format('woff'), 6 | url('iconfont.ttf?t=1533268080108') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('iconfont.svg?t=1533268080108#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family:"iconfont" !important; 12 | font-size:16px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | .icon-r_j:before { content: "\e6c8"; } 19 | 20 | -------------------------------------------------------------------------------- /src/assets/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/font/iconfont.eot -------------------------------------------------------------------------------- /src/assets/font/iconfont.js: -------------------------------------------------------------------------------- 1 | (function(window){var svgSprite='';var script=function(){var scripts=document.getElementsByTagName("script");return scripts[scripts.length-1]}();var shouldInjectCss=script.getAttribute("data-injectcss");var ready=function(fn){if(document.addEventListener){if(~["complete","loaded","interactive"].indexOf(document.readyState)){setTimeout(fn,0)}else{var loadFn=function(){document.removeEventListener("DOMContentLoaded",loadFn,false);fn()};document.addEventListener("DOMContentLoaded",loadFn,false)}}else if(document.attachEvent){IEContentLoaded(window,fn)}function IEContentLoaded(w,fn){var d=w.document,done=false,init=function(){if(!done){done=true;fn()}};var polling=function(){try{d.documentElement.doScroll("left")}catch(e){setTimeout(polling,50);return}init()};polling();d.onreadystatechange=function(){if(d.readyState=="complete"){d.onreadystatechange=null;init()}}}};var before=function(el,target){target.parentNode.insertBefore(el,target)};var prepend=function(el,target){if(target.firstChild){before(el,target.firstChild)}else{target.appendChild(el)}};function appendSvg(){var div,svg;div=document.createElement("div");div.innerHTML=svgSprite;svgSprite=null;svg=div.getElementsByTagName("svg")[0];if(svg){svg.setAttribute("aria-hidden","true");svg.style.position="absolute";svg.style.width=0;svg.style.height=0;svg.style.overflow="hidden";prepend(svg,document.body)}}if(shouldInjectCss&&!window.__iconfont__svg__cssinject__){window.__iconfont__svg__cssinject__=true;try{document.write("")}catch(e){console&&console.log(e)}}ready(appendSvg)})(window) -------------------------------------------------------------------------------- /src/assets/font/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by iconfont 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/assets/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/font/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/font/iconfont.woff -------------------------------------------------------------------------------- /src/assets/images/culture/bg_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/bg_blue.png -------------------------------------------------------------------------------- /src/assets/images/culture/bg_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/bg_bottom.png -------------------------------------------------------------------------------- /src/assets/images/culture/bg_bottom2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/bg_bottom2.png -------------------------------------------------------------------------------- /src/assets/images/culture/bg_hong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/bg_hong.png -------------------------------------------------------------------------------- /src/assets/images/culture/bg_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/bg_map.png -------------------------------------------------------------------------------- /src/assets/images/culture/default_rank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/default_rank.png -------------------------------------------------------------------------------- /src/assets/images/culture/ico_biao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/ico_biao.png -------------------------------------------------------------------------------- /src/assets/images/culture/ico_chao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/ico_chao.png -------------------------------------------------------------------------------- /src/assets/images/culture/ico_jinpai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/ico_jinpai.png -------------------------------------------------------------------------------- /src/assets/images/culture/ico_jinpai2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/ico_jinpai2.png -------------------------------------------------------------------------------- /src/assets/images/culture/ico_zi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/src/assets/images/culture/ico_zi.png -------------------------------------------------------------------------------- /src/assets/js/flexible.js: -------------------------------------------------------------------------------- 1 | (function(win, lib) { 2 | var doc = win.document; 3 | var docEl = doc.documentElement; 4 | var metaEl = doc.querySelector('meta[name="viewport"]'); 5 | var flexibleEl = doc.querySelector('meta[name="flexible"]'); 6 | var dpr = 0; 7 | var scale = 0; 8 | var tid; 9 | var flexible = lib.flexible || (lib.flexible = {}); 10 | 11 | if (metaEl) { 12 | var match = metaEl.getAttribute('content').match(/initial\-scale=([\d\.]+)/); 13 | if (match) { 14 | scale = parseFloat(match[1]); 15 | dpr = parseInt(1 / scale); 16 | } 17 | } else if (flexibleEl) { 18 | var content = flexibleEl.getAttribute('content'); 19 | if (content) { 20 | var initialDpr = content.match(/initial\-dpr=([\d\.]+)/); 21 | var maximumDpr = content.match(/maximum\-dpr=([\d\.]+)/); 22 | if (initialDpr) { 23 | dpr = parseFloat(initialDpr[1]); 24 | scale = parseFloat((1 / dpr).toFixed(2)); 25 | } 26 | if (maximumDpr) { 27 | dpr = parseFloat(maximumDpr[1]); 28 | scale = parseFloat((1 / dpr).toFixed(2)); 29 | } 30 | } 31 | } 32 | 33 | if (!dpr && !scale) { 34 | var isAndroid = win.navigator.appVersion.match(/android/gi); 35 | var isIPhone = win.navigator.appVersion.match(/iphone/gi); 36 | var devicePixelRatio = win.devicePixelRatio; 37 | if (isIPhone) { 38 | // iOS下,对于2和3的屏,用2倍的方案,其余的用1倍方案 39 | if (devicePixelRatio >= 3 && (!dpr || dpr >= 3)) { 40 | dpr = 3; 41 | } else if (devicePixelRatio >= 2 && (!dpr || dpr >= 2)){ 42 | dpr = 2; 43 | } else { 44 | dpr = 1; 45 | } 46 | } else { 47 | // 其他设备下,仍旧使用1倍的方案 48 | dpr = 1; 49 | } 50 | scale = 1 / dpr; 51 | } 52 | 53 | docEl.setAttribute('data-dpr', dpr); 54 | if (!metaEl) { 55 | metaEl = doc.createElement('meta'); 56 | metaEl.setAttribute('name', 'viewport'); 57 | metaEl.setAttribute('content', 'initial-scale=' + scale + ', maximum-scale=' + scale + ', minimum-scale=' + scale + ', user-scalable=no'); 58 | if (docEl.firstElementChild) { 59 | docEl.firstElementChild.appendChild(metaEl); 60 | } else { 61 | var wrap = doc.createElement('div'); 62 | wrap.appendChild(metaEl); 63 | doc.write(wrap.innerHTML); 64 | } 65 | } 66 | 67 | function refreshRem(){ 68 | var width = docEl.getBoundingClientRect().width; 69 | if (width / dpr > 540) { 70 | width = 540 * dpr; 71 | } 72 | var rem = width / 10; 73 | docEl.style.fontSize = rem + 'px'; 74 | flexible.rem = win.rem = rem; 75 | } 76 | 77 | win.addEventListener('resize', function() { 78 | clearTimeout(tid); 79 | tid = setTimeout(refreshRem, 300); 80 | }, false); 81 | win.addEventListener('pageshow', function(e) { 82 | if (e.persisted) { 83 | clearTimeout(tid); 84 | tid = setTimeout(refreshRem, 300); 85 | } 86 | }, false); 87 | 88 | if (doc.readyState === 'complete') { 89 | doc.body.style.fontSize = 12 * dpr + 'px'; 90 | } else { 91 | doc.addEventListener('DOMContentLoaded', function(e) { 92 | doc.body.style.fontSize = 12 * dpr + 'px'; 93 | }, false); 94 | } 95 | 96 | 97 | refreshRem(); 98 | 99 | flexible.dpr = win.dpr = dpr; 100 | flexible.refreshRem = refreshRem; 101 | flexible.rem2px = function(d) { 102 | var val = parseFloat(d) * this.rem; 103 | if (typeof d === 'string' && d.match(/rem$/)) { 104 | val += 'px'; 105 | } 106 | return val; 107 | } 108 | flexible.px2rem = function(d) { 109 | var val = parseFloat(d) / this.rem; 110 | if (typeof d === 'string' && d.match(/px$/)) { 111 | val += 'rem'; 112 | } 113 | return val; 114 | } 115 | 116 | })(window, window['lib'] || (window['lib'] = {})); -------------------------------------------------------------------------------- /src/components/culture/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 87 | 88 | -------------------------------------------------------------------------------- /src/components/culture/list.vue: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/components/home.vue: -------------------------------------------------------------------------------- 1 | 9 | 12 | -------------------------------------------------------------------------------- /src/core/api/api.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import request from "./config/http.js" 3 | import params from "./config/params.js" 4 | const url1 = '/activityfilm/art/activity/test'; 5 | 6 | 7 | const apis = { 8 | logon(data) { 9 | return request({ 10 | url: url1, 11 | method: 'post', 12 | jsonString:true, 13 | data 14 | }) 15 | }, 16 | logons(data) { 17 | return request({ 18 | url: url1, 19 | method: 'get', 20 | params: { 21 | m: 'login', 22 | mobile:data.mobile, 23 | password:data.password 24 | } 25 | }) 26 | }, 27 | } 28 | 29 | 30 | 31 | 32 | export default { 33 | install() { 34 | Vue.prototype.$api = apis 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/core/api/config/http.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import axios from 'axios'; 3 | import store from '@/core/store/index'; 4 | import { Toast,Indicator, MessageBox } from 'mint-ui' 5 | // 配置代理 6 | const baseURL = (location.host.indexOf(".com") != -1 || location.host.indexOf(".net") != -1) ? "" : "/apis"; 7 | let ajaxconfig = { 8 | // 基础url前缀 9 | baseURL, 10 | //设置超时时间 11 | timeout: 300000, 12 | //返回数据类型 13 | responseType: 'json', // default 14 | //请求的接口,在请求的时候,如axios.get(url,config);这里的url会覆盖掉config中的url 15 | url: '/', 16 | 17 | // 请求方法同上 18 | method: 'get', // default 19 | 20 | transformRequest: [function(data) { 21 | // 这里可以在发送请求之前对请求数据做处理,比如form-data格式化等,这里可以使用开头引入的Qs(这个模块在安装axios的时候就已经安装了,不需要另外安装) 22 | //data = axios.stringify(data); 23 | //console.log("data",typeof data,data) 24 | //console.log(data.method) 25 | return data; 26 | }], 27 | 28 | transformResponse: [function(data) { 29 | // 这里提前处理返回的数据 30 | if (typeof data == 'string') { 31 | data = JSON.parse(data); 32 | } 33 | return data; 34 | }], 35 | 36 | // 请求头信息 37 | headers: { 38 | 'Content-Type': 'application/x-www-form-urlencoded', //application/json application/x-www-form-urlencoded 39 | }, 40 | 41 | //parameter参数 42 | params: {}, 43 | 44 | //post参数,使用axios.post(url,{},config);如果没有额外的也必须要用一个空对象,否则会报错 45 | data: {}, 46 | 47 | withCredentials: true //当我们把此配置项设置成默认配置项并且设置成true的时候,axios就可以设置cookies了。 48 | }; 49 | 50 | let instance = axios.create(ajaxconfig); 51 | 52 | 53 | 54 | //请求列表数据 55 | 56 | function queryData(options,callBack) { 57 | // this 58 | //必须基本设置请求参数 59 | let url = options.url || ''; 60 | let method = options.method || ajaxconfig.method; //"get" "post" "put" ,默认请求get 61 | 62 | let isParseStringJSON = options['jsonString']; 63 | 64 | //扩展基本配置项 65 | let myConfig = options.baseConfing || {}; //{} 66 | 67 | let config = _.defaultsDeep({}, myConfig); 68 | config.method = method; 69 | //获取服务端数据 70 | if (method == 'post' || method == 'put' || method == 'patch') { 71 | 72 | //POST提交数据时必选参数 73 | let potsData = options.data || {}; //{firstName: 'Fred',lastName: 'FlintStone'} 74 | 75 | 76 | if (_.isObject(potsData)) { 77 | if (typeof isParseStringJSON != 'undefined') { 78 | setAjaxQuestHeader('Content-Type', 'application/json'); 79 | potsData = JSON.stringify(potsData); 80 | } else { 81 | setAjaxQuestHeader('Content-Type', 'application/x-www-form-urlencoded'); 82 | potsData = serializeParams(potsData); 83 | } 84 | } 85 | callBack(instance); 86 | return instance[method].bind(instance, url, potsData, config); 87 | } else { 88 | //GET提交数据时必选参数 89 | let myParams = options.params || {}; //{params: {ID: 12345}} || '/user?ID=12345' 90 | myParams = Object.assign({}, myParams, { 91 | mathRand: Math.random() * 100000000000000000 92 | }); 93 | config.params = myParams; 94 | // if(method=="delete"){ 95 | // instance.defaults.headers.post['Content-Type'] = 'multipart/form-data'; 96 | // } 97 | callBack(instance); 98 | return instance[method].bind(instance, url, config); 99 | } 100 | } 101 | 102 | //JSON序列化传入参数形式 103 | function serializeParams(params, type) { 104 | if (!params) return; 105 | let obj = {}; 106 | if (type == 'JSON') { 107 | if (!_.isString(params)) return; 108 | if (params.indexOf('&') > -1) { 109 | let splits = params.split('&'); 110 | splits.forEach(function(v, k) { 111 | let key = v.split('=')[0] || k; 112 | let val = v.split('=')[1] || undefined; 113 | obj[key] = val; 114 | }); 115 | return obj; 116 | } 117 | } else { 118 | if (!_.isObject(params)) { 119 | if (!_.isObject(JSON.parse(params))) { 120 | return; 121 | } else { 122 | params = JSON.parse(params); 123 | } 124 | } 125 | obj = []; 126 | _.forEach(params, function(v, k) { 127 | v = !v ? '' : v; 128 | let val = k + '=' + v; 129 | obj.push(val); 130 | }); 131 | return obj.join('&'); 132 | } 133 | } 134 | 135 | //请求前改变请求头源参数 136 | function setAjaxQuestHeader(key, v) { 137 | ajaxconfig['headers'][key] = v; 138 | instance = axios.create(ajaxconfig); 139 | } 140 | 141 | 142 | let ajax = function(option) { 143 | // console.dir(queryData(option)); 144 | return queryData(option,function(instance){ 145 | 146 | // setAjaxQuestHeader('deviceId', navigator.userAgent); 147 | // setAjaxQuestHeader('platform','h5'); 148 | // setAjaxQuestHeader('version', '1.0'); 149 | // setAjaxQuestHeader('clientType', 'Parent'); 150 | // 拦截器 151 | //请求响应 152 | instance.interceptors.request.use( 153 |  config => { 154 | Indicator.open(); 155 | config.headers.deviceId=navigator.userAgent; 156 | config.headers.platform="h5"; 157 | config.headers.version="1.0"; 158 | config.headers.clientType=store.state.extra.sign.clientType; 159 |   return config 160 |  }, 161 |  error => { 162 | console.log(error); 163 |  }) 164 | //响应拦截器 165 | instance.interceptors.response.use(config=> { 166 | Indicator.close(); 167 | // console.log(config); 168 | return config; 169 | },error => { 170 | console.log(error); 171 | Indicator.close(); 172 | if (!error.config.response) { 173 | let instance = Toast('网络异常'); 174 | setTimeout(() => { 175 | instance.close(); 176 | }, 2000); 177 | } 178 | 179 | }); 180 | 181 | 182 | })(); 183 | }; 184 | 185 | // instance = axios.create(ajaxconfig); 186 | // instance.interceptors.request.use( 187 | //  config => { 188 | //   console.log("OK"); 189 | //   return config 190 | //  }, 191 | //  error => { 192 | // console.log("OK"); 193 | //  } 194 | // ) 195 | 196 | // axios.interceptors.request.use( 197 | // config => { 198 | // console.log("OK"); 199 | // return config; 200 | // }, 201 | // err => { 202 | // console.log(err); 203 | // }); 204 | 205 | 206 | /* 207 | 例: 208 | ajax({ 209 | url:'请求地址', 210 | method:'请求方法', 211 | data:{请求方法为post、put、patch时传的参数}, 212 | params:{请求方法为get时传的参数}, 213 | jsonString:true|false(是否传json), 214 | baseConfing:{其他配置项,见axios文档} 215 | }).then(res=>{ 216 | // 请求成功 217 | // res.data是服务器返回的数据 218 | }).catch(e=>{ 219 | // 请求失败 220 | }) 221 | */ 222 | 223 | 224 | export default ajax; 225 | -------------------------------------------------------------------------------- /src/core/api/config/params.js: -------------------------------------------------------------------------------- 1 | import global from '@/core/global/global.js' 2 | var param = global.global.getParam(); 3 | 4 | // 获取url参数,在此配置 5 | const params = { 6 | token: param.token || "test" 7 | } 8 | export default params; 9 | -------------------------------------------------------------------------------- /src/core/directive/directive.js: -------------------------------------------------------------------------------- 1 | 2 | export default (Vue) => { 3 | Vue.directive("test1",{ 4 | inserted:function(el){ 5 | el.onclick=function(){ 6 | alert("OK1"); 7 | }; 8 | } 9 | }) 10 | Vue.directive("test2",{ 11 | inserted:function(el){ 12 | el.onclick=function(){ 13 | alert("OK2"); 14 | }; 15 | } 16 | }) 17 | } 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/core/global/global.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import params from "@/core/api/config/params" 3 | 4 | 5 | 6 | const global = { 7 | // 版本判断方法 8 | udgeAppVersion(sval, nval) { 9 | if (!nval) return; 10 | var s = sval.split("."); 11 | var n = nval.split("."); 12 | for (var i = 0; i < n.length; i++) { 13 | n[i] = parseInt(n[i]); 14 | } 15 | for (var i = 0; i < n.length; i++) { 16 | s[i] = parseInt(s[i]); 17 | } 18 | if (s[0] > n[0]) { 19 | return false; 20 | } else if (s[0] < n[0]) { 21 | return true; 22 | } else { 23 | if (s[1] > n[1]) { 24 | return false; 25 | } else if (s[1] < n[1]) { 26 | return true; 27 | } else { 28 | if (s[2] > n[2]) { 29 | return false; 30 | } else if (s[2] <= n[2]) { 31 | return true; 32 | } 33 | } 34 | } 35 | }, 36 | getParam() { 37 | var search = {}; 38 | try { 39 | location.search 40 | .substr(1) 41 | .split('&') 42 | .forEach(function(item) { 43 | var s = item.split('='); 44 | search[s[0]] = s[1]; 45 | }); 46 | } catch (e) { 47 | // 抛出异常 48 | throw new Error(JSON.stringify(search)); 49 | } 50 | return search; 51 | }, 52 | // 获取url参数返回json 53 | params, 54 | isAndroid() { //判断是否是安卓 55 | var agent = navigator.userAgent; 56 | return agent.indexOf('Android') > -1 || agent.indexOf('Adr') > -1; 57 | } 58 | } 59 | 60 | 61 | 62 | // 注册插件全局通用 63 | export default { 64 | install() { 65 | Vue.prototype.$global = global; 66 | }, 67 | global 68 | } -------------------------------------------------------------------------------- /src/core/native/native.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | var native = { 3 | setPath(_this, run) { 4 | }, 5 | initPageTitle(title) { 6 | } 7 | } 8 | export default { 9 | install() { 10 | Vue.prototype.$native = native; 11 | }, 12 | native 13 | } 14 | -------------------------------------------------------------------------------- /src/core/store/actions.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // test(state){ 3 | 4 | // } 5 | } -------------------------------------------------------------------------------- /src/core/store/getters.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // test(state){ 3 | // return state.count+=100; 4 | // }, 5 | 6 | } 7 | -------------------------------------------------------------------------------- /src/core/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue" 2 | import Vuex from "vuex" 3 | Vue.use(Vuex) 4 | 5 | import state from "./state.js" 6 | import mutations from "./mutations.js" 7 | import getters from "./getters.js" 8 | import actions from "./actions.js" 9 | 10 | export default new Vuex.Store({ 11 | // 属性 12 | state, 13 | //fn 14 | mutations, 15 | //fn return 16 | getters, 17 | //fn ync 18 | actions 19 | }) -------------------------------------------------------------------------------- /src/core/store/mutations.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // test(state){ 3 | 4 | // } 5 | } -------------------------------------------------------------------------------- /src/core/store/state.js: -------------------------------------------------------------------------------- 1 | // state 2 | 3 | export default{ 4 | extra:{} 5 | } -------------------------------------------------------------------------------- /src/core/tempConfig/tempConfig.js: -------------------------------------------------------------------------------- 1 | // MintUI import 2 | import {Button} from 'mint-ui' 3 | 4 | export default (Vue) => { 5 | Vue.component(Button.name, Button) 6 | } 7 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import _ from 'lodash' 7 | import '@/assets/js/flexible' 8 | // body样式通用引入失效 9 | import "./assets/css/reset.scss" 10 | 11 | // 动态设置title 12 | Vue.use(require('vue-wechat-title')) 13 | 14 | // 暴露全局请求方法 15 | import api from './core/api/api' 16 | Vue.use(api) 17 | //注册全局通用属性,方法 18 | import global from '@/core/global/global' 19 | Vue.use(global) 20 | 21 | // 原生交互方法 22 | import native from '@/core/native/native' 23 | Vue.use(native) 24 | 25 | // 通用指令 26 | import directive from '@/core/directive/directive' 27 | Vue.use(directive) 28 | 29 | // 通用组件配置 30 | import tempConfig from '@/core/tempConfig/tempConfig' 31 | Vue.use(tempConfig) 32 | 33 | 34 | Vue.config.productionTip = false 35 | import store from "@/core/store/index" 36 | // import {mapState,mapMutations,mapGetters,mapActions} from "vuex" 37 | /* eslint-disable no-new */ 38 | 39 | new Vue({ 40 | el: '#app', 41 | router, 42 | store, 43 | components: { App }, 44 | template: '' 45 | }) 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | // import global from '@/core/global/global.js' 4 | // const param = global.global.getParam(); 5 | Vue.use(Router) 6 | const routes = [ 7 | { 8 | path: '/culture', 9 | component: resolve => require(['@/components/home'], resolve), 10 | meta: { 11 | title: '传统文化传承人', 12 | }, 13 | children: [ 14 | { 15 | path: 'index', 16 | component: () => 17 | import ('@/components/culture/index'), 18 | meta: { 19 | title: '我是首页', 20 | }, 21 | }, 22 | { 23 | path: 'list', 24 | component: () => 25 | import ('@/components/culture/list'), 26 | meta: { 27 | title: '我是列表页' 28 | }, 29 | } 30 | ] 31 | } 32 | ]; 33 | 34 | 35 | const router = new Router({ 36 | routes, 37 | }) 38 | 39 | 40 | 41 | 42 | 43 | router.beforeEach((to, from, next) => { 44 | // if (to.path == "/") { 45 | // if(param.userType=="parent"){ 46 | // next({ path: '/culture.index' }); 47 | // }else if(param.userType=="teacher"){ 48 | // next({ path: '/culture.statistics' }); 49 | // } 50 | // } else { 51 | // next(); 52 | // } 53 | next(); 54 | }) 55 | export default router; 56 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/static/.gitkeep -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mesea/vue_dev_temp/2120aeb865a47bb5419f7ee5c1823c484fb78921/static/favicon.ico -------------------------------------------------------------------------------- /static/vconsole.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * vConsole v3.2.0 (https://github.com/Tencent/vConsole) 3 | * 4 | * Tencent is pleased to support the open source community by making vConsole available. 5 | * Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 6 | * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 7 | * http://opensource.org/licenses/MIT 8 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 9 | */ 10 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VConsole=t():e.VConsole=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),o(1);var i=o(2),a=n(i),r=o(18),l=n(r);a["default"].VConsolePlugin=l["default"],t["default"]=a["default"],e.exports=t["default"]},function(e,t){"use strict";if("undefined"==typeof Symbol){window.Symbol=function(){};var o="__symbol_iterator_key";window.Symbol.iterator=o,Array.prototype[o]=function(){var e=this,t=0;return{next:function(){return{done:e.length===t,value:e.length===t?void 0:e[t++]}}}}}},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var o=0;odocument.documentElement.offsetWidth&&(o=document.documentElement.offsetWidth-t.offsetWidth),n+t.offsetHeight>document.documentElement.offsetHeight&&(n=document.documentElement.offsetHeight-t.offsetHeight),0>o&&(o=0),0>n&&(n=0),this.switchPos.x=o,this.switchPos.y=n,v["default"].one(".vc-switch").style.right=o+"px",v["default"].one(".vc-switch").style.bottom=n+"px");var i=window.devicePixelRatio||1,a=document.querySelector('[name="viewport"]');if(a&&a.content){var r=a.content.match(/initial\-scale\=\d+(\.\d+)?/),l=r?parseFloat(r[0].split("=")[1]):1;1>l&&(this.$dom.style.fontSize=13*i+"px")}v["default"].one(".vc-mask",this.$dom).style.display="none"}},{key:"_mockTap",value:function(){var e=700,t=10,o=void 0,n=void 0,i=void 0,a=!1,r=null;this.$dom.addEventListener("touchstart",function(e){if(void 0===o){var t=e.targetTouches[0];n=t.pageX,i=t.pageY,o=e.timeStamp,r=e.target.nodeType===Node.TEXT_NODE?e.target.parentNode:e.target}},!1),this.$dom.addEventListener("touchmove",function(e){var o=e.changedTouches[0];(Math.abs(o.pageX-n)>t||Math.abs(o.pageY-i)>t)&&(a=!0)}),this.$dom.addEventListener("touchend",function(t){if(a===!1&&t.timeStamp-o0){var n=o.touches[0].pageX-e.switchPos.startX,i=o.touches[0].pageY-e.switchPos.startY,a=e.switchPos.x-n,r=e.switchPos.y-i;a+t.offsetWidth>document.documentElement.offsetWidth&&(a=document.documentElement.offsetWidth-t.offsetWidth),r+t.offsetHeight>document.documentElement.offsetHeight&&(r=document.documentElement.offsetHeight-t.offsetHeight),0>a&&(a=0),0>r&&(r=0),t.style.right=a+"px",t.style.bottom=r+"px",e.switchPos.endX=a,e.switchPos.endY=r,o.preventDefault()}}),v["default"].bind(v["default"].one(".vc-switch",e.$dom),"click",function(){e.show()}),v["default"].bind(v["default"].one(".vc-hide",e.$dom),"click",function(){e.hide()}),v["default"].bind(v["default"].one(".vc-mask",e.$dom),"click",function(t){return t.target!=v["default"].one(".vc-mask")?!1:void e.hide()}),v["default"].delegate(v["default"].one(".vc-tabbar",e.$dom),"click",".vc-tab",function(t){var o=this.dataset.tab;o!=e.activedTab&&e.showTab(o)}),v["default"].bind(v["default"].one(".vc-panel",e.$dom),"transitionend webkitTransitionEnd oTransitionEnd otransitionend",function(t){return t.target!=v["default"].one(".vc-panel")?!1:void(v["default"].hasClass(e.$dom,"vc-toggle")||(t.target.style.display="none"))});var o=v["default"].one(".vc-content",e.$dom),n=!1;v["default"].bind(o,"touchstart",function(e){var t=o.scrollTop,i=o.scrollHeight,a=t+o.offsetHeight;0===t?(o.scrollTop=1,0===o.scrollTop&&(v["default"].hasClass(e.target,"vc-cmd-input")||(n=!0))):a===i&&(o.scrollTop=t-1,o.scrollTop===t&&(v["default"].hasClass(e.target,"vc-cmd-input")||(n=!0)))}),v["default"].bind(o,"touchmove",function(e){n&&e.preventDefault()}),v["default"].bind(o,"touchend",function(e){n=!1})}},{key:"_autoRun",value:function(){this.isInited=!0;for(var e in this.pluginList)this._initPlugin(this.pluginList[e]);this.tabList.length>0&&this.showTab(this.tabList[0]),this.triggerEvent("ready")}},{key:"triggerEvent",value:function(e,t){e="on"+e.charAt(0).toUpperCase()+e.slice(1),d.isFunction(this.option[e])&&this.option[e].apply(this,t)}},{key:"_initPlugin",value:function(e){var t=this;e.vConsole=this,e.trigger("init"),e.trigger("renderTab",function(o){t.tabList.push(e.id);var n=v["default"].render(g["default"],{id:e.id,name:e.name});v["default"].one(".vc-tabbar",t.$dom).insertAdjacentElement("beforeend",n);var i=v["default"].render(m["default"],{id:e.id});o&&(d.isString(o)?i.innerHTML+=o:d.isFunction(o.appendTo)?o.appendTo(i):d.isElement(o)&&i.insertAdjacentElement("beforeend",o)),v["default"].one(".vc-content",t.$dom).insertAdjacentElement("beforeend",i)}),e.trigger("addTopBar",function(o){if(o)for(var n=v["default"].one(".vc-topbar",t.$dom),i=function(t){var i=o[t],a=v["default"].render(_["default"],{name:i.name||"Undefined",className:i.className||"",pluginID:e.id});if(i.data)for(var r in i.data)a.dataset[r]=i.data[r];d.isFunction(i.onClick)&&v["default"].bind(a,"click",function(t){var o=i.onClick.call(a);o===!1||(v["default"].removeClass(v["default"].all(".vc-topbar-"+e.id),"vc-actived"),v["default"].addClass(a,"vc-actived"))}),n.insertAdjacentElement("beforeend",a)},a=0;a-1&&this.tabList.splice(c,1);try{delete this.pluginList[e]}catch(s){this.pluginList[e]=void 0}return this.activedTab==e&&this.tabList.length>0&&this.showTab(this.tabList[0]),!0}},{key:"show",value:function(){if(this.isInited){var e=this,t=v["default"].one(".vc-panel",this.$dom);t.style.display="block",setTimeout(function(){v["default"].addClass(e.$dom,"vc-toggle"),e._triggerPluginsEvent("showConsole");var t=v["default"].one(".vc-mask",e.$dom);t.style.display="block"},10)}}},{key:"hide",value:function(){if(this.isInited){v["default"].removeClass(this.$dom,"vc-toggle"),this._triggerPluginsEvent("hideConsole");var e=v["default"].one(".vc-mask",this.$dom),t=v["default"].one(".vc-panel",this.$dom);v["default"].bind(e,"transitionend",function(o){e.style.display="none",t.style.display="none"})}}},{key:"showSwitch",value:function(){if(this.isInited){var e=v["default"].one(".vc-switch",this.$dom);e.style.display="block"}}},{key:"hideSwitch",value:function(){if(this.isInited){var e=v["default"].one(".vc-switch",this.$dom);e.style.display="none"}}},{key:"showTab",value:function(e){if(this.isInited){var t=v["default"].one("#__vc_log_"+e);v["default"].removeClass(v["default"].all(".vc-tab",this.$dom),"vc-actived"),v["default"].addClass(v["default"].one("#__vc_tab_"+e),"vc-actived"),v["default"].removeClass(v["default"].all(".vc-logbox",this.$dom),"vc-actived"),v["default"].addClass(t,"vc-actived");var o=v["default"].all(".vc-topbar-"+e,this.$dom);v["default"].removeClass(v["default"].all(".vc-toptab",this.$dom),"vc-toggle"),v["default"].addClass(o,"vc-toggle"),o.length>0?v["default"].addClass(v["default"].one(".vc-content",this.$dom),"vc-has-topbar"):v["default"].removeClass(v["default"].one(".vc-content",this.$dom),"vc-has-topbar"),v["default"].removeClass(v["default"].all(".vc-tool",this.$dom),"vc-toggle"),v["default"].addClass(v["default"].all(".vc-tool-"+e,this.$dom),"vc-toggle"),this.activedTab&&this._triggerPluginEvent(this.activedTab,"hide"),this.activedTab=e,this._triggerPluginEvent(this.activedTab,"show")}}},{key:"setOption",value:function(e,t){if(d.isString(e))this.option[e]=t,this._triggerPluginsEvent("updateOption");else if(d.isObject(e)){for(var o in e)this.option[o]=e[o];this._triggerPluginsEvent("updateOption")}else console.debug("The first parameter of vConsole.setOption() must be a string or an object.")}},{key:"destroy",value:function(){if(this.isInited){for(var e=Object.keys(this.pluginList),t=e.length-1;t>=0;t--)this.removePlugin(e[t]);this.$dom.parentNode.removeChild(this.$dom)}}}]),e}();t["default"]=A,e.exports=t["default"]},function(e,t){e.exports={name:"vconsole",version:"3.2.0",description:"A lightweight, extendable front-end developer tool for mobile web page.",homepage:"https://github.com/Tencent/vConsole",main:"dist/vconsole.min.js",scripts:{test:"mocha",dist:"webpack"},keywords:["console","debug","mobile"],repository:{type:"git",url:"git+https://github.com/Tencent/vConsole.git"},dependencies:{},devDependencies:{"babel-core":"^6.7.7","babel-loader":"^6.2.4","babel-plugin-add-module-exports":"^0.1.4","babel-preset-es2015":"^6.6.0","babel-preset-stage-3":"^6.5.0",chai:"^3.5.0","css-loader":"^0.23.1","extract-text-webpack-plugin":"^1.0.1","html-loader":"^0.4.3",jsdom:"^9.2.1","json-loader":"^0.5.4",less:"^2.5.3","less-loader":"^2.2.3",mocha:"^2.5.3","style-loader":"^0.13.1",webpack:"~1.12.11"},author:"Tencent",license:"MIT"}},function(e,t){"use strict";function o(e){var t=e>0?new Date(e):new Date,o=t.getDate()<10?"0"+t.getDate():t.getDate(),n=t.getMonth()<9?"0"+(t.getMonth()+1):t.getMonth()+1,i=t.getFullYear(),a=t.getHours()<10?"0"+t.getHours():t.getHours(),r=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),l=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),c=t.getMilliseconds()<10?"0"+t.getMilliseconds():t.getMilliseconds();return 100>c&&(c="0"+c),{time:+t,year:i,month:n,day:o,hour:a,minute:r,second:l,millisecond:c}}function n(e){return"[object Number]"==Object.prototype.toString.call(e)}function i(e){return"[object String]"==Object.prototype.toString.call(e)}function a(e){return"[object Array]"==Object.prototype.toString.call(e)}function r(e){return"[object Boolean]"==Object.prototype.toString.call(e)}function l(e){return"[object Undefined]"==Object.prototype.toString.call(e)}function c(e){return"[object Null]"==Object.prototype.toString.call(e)}function s(e){return"[object Symbol]"==Object.prototype.toString.call(e)}function d(e){return!("[object Object]"!=Object.prototype.toString.call(e)&&(n(e)||i(e)||r(e)||a(e)||c(e)||u(e)||l(e)||s(e)))}function u(e){return"[object Function]"==Object.prototype.toString.call(e)}function v(e){return"object"===("undefined"==typeof HTMLElement?"undefined":w(HTMLElement))?e instanceof HTMLElement:e&&"object"===("undefined"==typeof e?"undefined":w(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function f(e){var t=Object.prototype.toString.call(e);return"[object global]"==t||"[object Window]"==t||"[object DOMWindow]"==t}function p(e){var t=Object.prototype.hasOwnProperty;if(!e||"object"!==("undefined"==typeof e?"undefined":w(e))||e.nodeType||f(e))return!1;try{if(e.constructor&&!t.call(e,"constructor")&&!t.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(o){return!1}var n=void 0;for(n in e);return void 0===n||t.call(e,n)}function h(e){return document.createElement("a").appendChild(document.createTextNode(e)).parentNode.innerHTML}function g(e){var t=arguments.length<=1||void 0===arguments[1]?" ":arguments[1],o=arguments.length<=2||void 0===arguments[2]?"CIRCULAR_DEPENDECY_OBJECT":arguments[2],n=[],i=JSON.stringify(e,function(e,t){if("object"===("undefined"==typeof t?"undefined":w(t))&&null!==t){if(~n.indexOf(t))return o;n.push(t)}return t},t);return n=null,i}function b(e){if(!d(e)&&!a(e))return[];var t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=[];for(var n in e)t.indexOf(n)<0&&o.push(n);return o=o.sort()}function m(e){return Object.prototype.toString.call(e).replace("[object ","").replace("]","")}function y(e,t){window.localStorage&&(e="vConsole_"+e,localStorage.setItem(e,t))}function _(e){return window.localStorage?(e="vConsole_"+e,localStorage.getItem(e)):void 0}Object.defineProperty(t,"__esModule",{value:!0});var w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.getDate=o,t.isNumber=n,t.isString=i,t.isArray=a,t.isBoolean=r,t.isUndefined=l,t.isNull=c,t.isSymbol=s,t.isObject=d,t.isFunction=u,t.isElement=v,t.isWindow=f,t.isPlainObject=p,t.htmlEncode=h,t.JSONStringify=g,t.getObjAllKeys=b,t.getObjName=m,t.setStorage=y,t.getStorage=_},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=o(4),a=o(6),r=n(a),l={};l.one=function(e,t){return t?t.querySelector(e):document.querySelector(e)},l.all=function(e,t){var o=void 0,n=[];return o=t?t.querySelectorAll(e):document.querySelectorAll(e),o&&o.length>0&&(n=Array.prototype.slice.call(o)),n},l.addClass=function(e,t){if(e){(0,i.isArray)(e)||(e=[e]);for(var o=0;o-1||(a.push(t),e[o].className=a.join(" "))}}},l.removeClass=function(e,t){if(e){(0,i.isArray)(e)||(e=[e]);for(var o=0;o0&&(d=s[0].getAttribute("nonce")||"");var u=document.createElement("SCRIPT");u.innerHTML=a,u.setAttribute("nonce",d),document.documentElement.appendChild(u);var v=__mito_result;if(document.documentElement.removeChild(u),!o){var f=document.createElement("DIV");f.innerHTML=v,v=f.children[0]}return v}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,e.exports=t["default"]},function(e,t,o){var n=o(8);"string"==typeof n&&(n=[[e.id,n,""]]);o(10)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,o){t=e.exports=o(9)(),t.push([e.id,'#__vconsole{color:#000;font-size:13px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}#__vconsole .vc-max-height{max-height:19.23076923em}#__vconsole .vc-max-height-line{max-height:3.38461538em}#__vconsole .vc-min-height{min-height:3.07692308em}#__vconsole dd,#__vconsole dl,#__vconsole pre{margin:0}#__vconsole .vc-switch{display:block;position:fixed;right:.76923077em;bottom:.76923077em;color:#fff;background-color:#04be02;line-height:1;font-size:1.07692308em;padding:.61538462em 1.23076923em;z-index:10000;border-radius:.30769231em;box-shadow:0 0 .61538462em rgba(0,0,0,.4)}#__vconsole .vc-mask{top:0;background:transparent;z-index:10001;transition:background .3s;-webkit-tap-highlight-color:transparent;overflow-y:scroll}#__vconsole .vc-mask,#__vconsole .vc-panel{display:none;position:fixed;left:0;right:0;bottom:0}#__vconsole .vc-panel{min-height:85%;z-index:10002;background-color:#efeff4;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;-webkit-transform:translateY(100%);transform:translateY(100%)}#__vconsole .vc-tabbar{border-bottom:1px solid #d9d9d9;overflow-x:auto;height:3em;width:auto;white-space:nowrap}#__vconsole .vc-tabbar .vc-tab{display:inline-block;line-height:3em;padding:0 1.15384615em;border-right:1px solid #d9d9d9;text-decoration:none;color:#000;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}#__vconsole .vc-tabbar .vc-tab:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-tabbar .vc-tab.vc-actived{background-color:#fff}#__vconsole .vc-content{background-color:#fff;overflow-x:hidden;overflow-y:auto;position:absolute;top:3.07692308em;left:0;right:0;bottom:3.07692308em;-webkit-overflow-scrolling:touch}#__vconsole .vc-content.vc-has-topbar{top:5.46153846em}#__vconsole .vc-topbar{background-color:#fbf9fe;display:flex;display:-webkit-box;flex-direction:row;flex-wrap:wrap;-webkit-box-direction:row;-webkit-flex-wrap:wrap;width:100%}#__vconsole .vc-topbar .vc-toptab{display:none;flex:1;-webkit-box-flex:1;line-height:2.30769231em;padding:0 1.15384615em;border-bottom:1px solid #d9d9d9;text-decoration:none;text-align:center;color:#000;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}#__vconsole .vc-topbar .vc-toptab.vc-toggle{display:block}#__vconsole .vc-topbar .vc-toptab:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-topbar .vc-toptab.vc-actived{border-bottom:1px solid #3e82f7}#__vconsole .vc-logbox{display:none;position:relative;min-height:100%}#__vconsole .vc-logbox i{font-style:normal}#__vconsole .vc-logbox .vc-log{padding-bottom:3em;-webkit-tap-highlight-color:transparent}#__vconsole .vc-logbox .vc-log:empty:before{content:"Empty";color:#999;position:absolute;top:45%;left:0;right:0;bottom:0;font-size:1.15384615em;text-align:center}#__vconsole .vc-logbox .vc-item{margin:0;padding:.46153846em .61538462em;overflow:hidden;line-height:1.3;border-bottom:1px solid #eee;word-break:break-word}#__vconsole .vc-logbox .vc-item-info{color:#6a5acd}#__vconsole .vc-logbox .vc-item-debug{color:#daa520}#__vconsole .vc-logbox .vc-item-warn{color:orange;border-color:#ffb930;background-color:#fffacd}#__vconsole .vc-logbox .vc-item-error{color:#dc143c;border-color:#f4a0ab;background-color:#ffe4e1}#__vconsole .vc-logbox .vc-log.vc-log-partly .vc-item{display:none}#__vconsole .vc-logbox .vc-log.vc-log-partly-error .vc-item-error,#__vconsole .vc-logbox .vc-log.vc-log-partly-info .vc-item-info,#__vconsole .vc-logbox .vc-log.vc-log-partly-log .vc-item-log,#__vconsole .vc-logbox .vc-log.vc-log-partly-warn .vc-item-warn{display:block}#__vconsole .vc-logbox .vc-item .vc-item-content{margin-right:4.61538462em;display:block}#__vconsole .vc-logbox .vc-item .vc-item-meta{color:#888;float:right;width:4.61538462em;text-align:right}#__vconsole .vc-logbox .vc-item.vc-item-nometa .vc-item-content{margin-right:0}#__vconsole .vc-logbox .vc-item.vc-item-nometa .vc-item-meta{display:none}#__vconsole .vc-logbox .vc-item .vc-item-code{display:block;white-space:pre-wrap;overflow:auto;position:relative}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-input,#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output{padding-left:.92307692em}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-input:before,#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output:before{content:"\\203A";position:absolute;top:-.23076923em;left:0;font-size:1.23076923em;color:#6a5acd}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output:before{content:"\\2039"}#__vconsole .vc-logbox .vc-item .vc-fold{display:block;overflow:auto;-webkit-overflow-scrolling:touch}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer{display:block;font-style:italic;padding-left:.76923077em;position:relative}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer:active{background-color:#e6e6e6}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer:before{content:"";position:absolute;top:.30769231em;left:.15384615em;width:0;height:0;border:.30769231em solid transparent;border-left-color:#000}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer.vc-toggle:before{top:.46153846em;left:0;border-top-color:#000;border-left-color:transparent}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner{display:none;margin-left:.76923077em}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner.vc-toggle{display:block}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner .vc-code-key{margin-left:.76923077em}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer .vc-code-key{margin-left:0}#__vconsole .vc-logbox .vc-code-key{color:#905}#__vconsole .vc-logbox .vc-code-private-key{color:#d391b5}#__vconsole .vc-logbox .vc-code-function{color:#905;font-style:italic}#__vconsole .vc-logbox .vc-code-boolean,#__vconsole .vc-logbox .vc-code-number{color:#0086b3}#__vconsole .vc-logbox .vc-code-string{color:#183691}#__vconsole .vc-logbox .vc-code-null,#__vconsole .vc-logbox .vc-code-undefined{color:#666}#__vconsole .vc-logbox .vc-cmd{position:absolute;height:3.07692308em;left:0;right:0;bottom:0;border-top:1px solid #d9d9d9;display:block!important}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input-wrap{display:block;height:2.15384615em;margin-right:3.07692308em;padding:.46153846em .61538462em}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input{width:100%;border:none;resize:none;outline:none;padding:0;font-size:.92307692em}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input::-webkit-input-placeholder{line-height:2.15384615em}#__vconsole .vc-logbox .vc-cmd .vc-cmd-btn{position:absolute;top:0;right:0;bottom:0;width:3.07692308em;border:none;background-color:#efeff4;outline:none;-webkit-touch-callout:none;font-size:1em}#__vconsole .vc-logbox .vc-cmd .vc-cmd-btn:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-logbox .vc-group .vc-group-preview{-webkit-touch-callout:none}#__vconsole .vc-logbox .vc-group .vc-group-preview:active{background-color:#e6e6e6}#__vconsole .vc-logbox .vc-group .vc-group-detail{display:none;padding:0 0 .76923077em 1.53846154em;border-bottom:1px solid #eee}#__vconsole .vc-logbox .vc-group.vc-actived .vc-group-detail{display:block;background-color:#fbf9fe}#__vconsole .vc-logbox .vc-group.vc-actived .vc-table-row{background-color:#fff}#__vconsole .vc-logbox .vc-group.vc-actived .vc-group-preview{background-color:#fbf9fe}#__vconsole .vc-logbox .vc-table .vc-table-row{display:flex;display:-webkit-flex;flex-direction:row;flex-wrap:wrap;-webkit-box-direction:row;-webkit-flex-wrap:wrap;overflow:hidden;border-bottom:1px solid #eee}#__vconsole .vc-logbox .vc-table .vc-table-row.vc-left-border{border-left:1px solid #eee}#__vconsole .vc-logbox .vc-table .vc-table-col{flex:1;-webkit-box-flex:1;padding:.23076923em .30769231em;border-left:1px solid #eee;overflow:auto;white-space:pre-wrap;word-break:break-word;-webkit-overflow-scrolling:touch}#__vconsole .vc-logbox .vc-table .vc-table-col:first-child{border:none}#__vconsole .vc-logbox .vc-table .vc-small .vc-table-col{padding:0 .30769231em;font-size:.92307692em}#__vconsole .vc-logbox .vc-table .vc-table-col-2{flex:2;-webkit-box-flex:2}#__vconsole .vc-logbox .vc-table .vc-table-col-3{flex:3;-webkit-box-flex:3}#__vconsole .vc-logbox .vc-table .vc-table-col-4{flex:4;-webkit-box-flex:4}#__vconsole .vc-logbox .vc-table .vc-table-col-5{flex:5;-webkit-box-flex:5}#__vconsole .vc-logbox .vc-table .vc-table-col-6{flex:6;-webkit-box-flex:6}#__vconsole .vc-logbox .vc-table .vc-table-row-error{border-color:#f4a0ab;background-color:#ffe4e1}#__vconsole .vc-logbox .vc-table .vc-table-row-error .vc-table-col{color:#dc143c;border-color:#f4a0ab}#__vconsole .vc-logbox .vc-table .vc-table-col-title{font-weight:700}#__vconsole .vc-logbox.vc-actived{display:block}#__vconsole .vc-toolbar{border-top:1px solid #d9d9d9;line-height:3em;position:absolute;left:0;right:0;bottom:0;display:flex;display:-webkit-box;flex-direction:row;-webkit-box-direction:row}#__vconsole .vc-toolbar .vc-tool{display:none;text-decoration:none;color:#000;width:50%;flex:1;-webkit-box-flex:1;text-align:center;position:relative;-webkit-touch-callout:none}#__vconsole .vc-toolbar .vc-tool.vc-global-tool,#__vconsole .vc-toolbar .vc-tool.vc-toggle{display:block}#__vconsole .vc-toolbar .vc-tool:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-toolbar .vc-tool:after{content:" ";position:absolute;top:.53846154em;bottom:.53846154em;right:0;border-left:1px solid #d9d9d9}#__vconsole .vc-toolbar .vc-tool-last:after{border:none}#__vconsole.vc-toggle .vc-switch{display:none}#__vconsole.vc-toggle .vc-mask{background:rgba(0,0,0,.6);display:block}#__vconsole.vc-toggle .vc-panel{-webkit-transform:translate(0);transform:translate(0)}',""])},function(e,t){"use strict";e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t=0&&y.splice(t,1)}function l(e){var t=document.createElement("style");return t.type="text/css",a(e,t),t}function c(e){var t=document.createElement("link");return t.rel="stylesheet",a(e,t),t}function s(e,t){var o,n,i;if(t.singleton){var a=m++;o=b||(b=l(t)),n=d.bind(null,o,a,!1),i=d.bind(null,o,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=c(t),n=v.bind(null,o),i=function(){r(o),o.href&&URL.revokeObjectURL(o.href)}):(o=l(t),n=u.bind(null,o),i=function(){r(o)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}function d(e,t,o,n){var i=o?"":n.css;if(e.styleSheet)e.styleSheet.cssText=_(t,i);else{var a=document.createTextNode(i),r=e.childNodes;r[t]&&e.removeChild(r[t]),r.length?e.insertBefore(a,r[t]):e.appendChild(a)}}function u(e,t){var o=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}function v(e,t){var o=t.css,n=t.sourceMap;n&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var i=new Blob([o],{type:"text/css" 11 | }),a=e.href;e.href=URL.createObjectURL(i),a&&URL.revokeObjectURL(a)}var f={},p=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},h=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=p(function(){return document.head||document.getElementsByTagName("head")[0]}),b=null,m=0,y=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=h()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var o=i(e);return n(o,t),function(e){for(var a=[],r=0;r\n
vConsole
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n Hide\n
\n
\n'},function(e,t){e.exports='{{name}}'},function(e,t){e.exports='
\n \n
'},function(e,t){e.exports='{{name}}'},function(e,t){e.exports='{{name}}'},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var o=0;oi;i++)n[i]=arguments[i];var l=r(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return l.tplTabbox=b["default"],l.windowOnError=null,l}return l(t,e),c(t,[{key:"onReady",value:function(){var e=this;s(Object.getPrototypeOf(t.prototype),"onReady",this).call(this),u["default"].bind(u["default"].one(".vc-cmd",this.$tabbox),"submit",function(t){t.preventDefault();var o=u["default"].one(".vc-cmd-input",t.target),n=o.value;o.value="",""!==n&&e.evalCommand(n)});var o="";o+="if (!!window) {",o+="window.__vConsole_cmd_result = undefined;",o+="window.__vConsole_cmd_error = false;",o+="}";var n=document.getElementsByTagName("script"),i="";n.length>0&&(i=n[0].getAttribute("nonce")||"");var a=document.createElement("SCRIPT");a.innerHTML=o,a.setAttribute("nonce",i),document.documentElement.appendChild(a),document.documentElement.removeChild(a)}},{key:"mockConsole",value:function(){s(Object.getPrototypeOf(t.prototype),"mockConsole",this).call(this);var e=this;f.isFunction(window.onerror)&&(this.windowOnError=window.onerror),window.onerror=function(t,o,n,i,a){var r=t;o&&(r+="\n"+o.replace(location.origin,"")),(n||i)&&(r+=":"+n+":"+i);var l=!!a&&!!a.stack,c=l&&a.stack.toString()||"";e.printLog({logType:"error",logs:[r,c],noOrigin:!0}),f.isFunction(e.windowOnError)&&e.windowOnError.call(window,t,o,n,i,a)}}},{key:"evalCommand",value:function(e){this.printLog({logType:"log",content:u["default"].render(y["default"],{content:e,type:"input"}),noMeta:!0,style:""});var t="";t+="try {\n",t+="window.__vConsole_cmd_result = (function() {\n",t+="return "+e+";\n",t+="})();\n",t+="window.__vConsole_cmd_error = false;\n",t+="} catch (e) {\n",t+="window.__vConsole_cmd_result = e.message;\n",t+="window.__vConsole_cmd_error = true;\n",t+="}";var o=document.getElementsByTagName("script"),n="";o.length>0&&(n=o[0].getAttribute("nonce")||"");var i=document.createElement("SCRIPT");i.innerHTML=t,i.setAttribute("nonce",n),document.documentElement.appendChild(i);var a=window.__vConsole_cmd_result,r=window.__vConsole_cmd_error;if(document.documentElement.removeChild(i),0==r){var l=void 0;f.isArray(a)||f.isObject(a)?l=this.getFoldedLine(a):(f.isNull(a)?a="null":f.isUndefined(a)?a="undefined":f.isFunction(a)?a="function()":f.isString(a)&&(a='"'+a+'"'),l=u["default"].render(y["default"],{content:a,type:"output"})),this.printLog({logType:"log",content:l,noMeta:!0,style:""})}else this.printLog({logType:"error",logs:[a],noMeta:!0,style:""})}}]),t}(h["default"]);t["default"]=_,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s=function(){function e(e,t){for(var o=0;oi;i++)n[i]=arguments[i];var l=r(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return l.tplTabbox="",l.allowUnformattedLog=!0,l.isReady=!1,l.isShow=!1,l.$tabbox=null,l.console={},l.logList=[],l.isInBottom=!0,l.maxLogNumber=x,l.logNumber=0,l.mockConsole(),l}return l(t,e),s(t,[{key:"onInit",value:function(){this.$tabbox=f["default"].render(this.tplTabbox,{}),this.updateMaxLogNumber()}},{key:"onRenderTab",value:function(e){e(this.$tabbox)}},{key:"onAddTopBar",value:function(e){for(var t=this,o=["All","Log","Info","Warn","Error"],n=[],i=0;i=o.scrollHeight?e.isInBottom=!0:e.isInBottom=!1)});for(var n=0;nthis.maxLogNumber;){var e=f["default"].one(".vc-item",this.$tabbox);if(!e)break;e.parentNode.removeChild(e),this.logNumber--}}},{key:"showLogType",value:function(e){var t=f["default"].one(".vc-log",this.$tabbox);f["default"].removeClass(t,"vc-log-partly-log"),f["default"].removeClass(t,"vc-log-partly-info"),f["default"].removeClass(t,"vc-log-partly-warn"),f["default"].removeClass(t,"vc-log-partly-error"),"all"==e?f["default"].removeClass(t,"vc-log-partly"):(f["default"].addClass(t,"vc-log-partly"),f["default"].addClass(t,"vc-log-partly-"+e))}},{key:"autoScrollToBottom",value:function(){this.vConsole.option.disableLogScrolling||this.scrollToBottom()}},{key:"scrollToBottom",value:function(){var e=f["default"].one(".vc-content");e&&(e.scrollTop=e.scrollHeight-e.offsetHeight)}},{key:"mockConsole",value:function(){var e=this,t=this,o=["log","info","warn","debug","error"];window.console?(o.map(function(e){t.console[e]=window.console[e]}),t.console.time=window.console.time,t.console.timeEnd=window.console.timeEnd,t.console.clear=window.console.clear):window.console={},o.map(function(t){window.console[t]=function(){for(var o=arguments.length,n=Array(o),i=0;o>i;i++)n[i]=arguments[i];e.printLog({logType:t,logs:n})}});var n={};window.console.time=function(e){n[e]=Date.now()},window.console.timeEnd=function(e){var t=n[e];t?(console.log(e+":",Date.now()-t+"ms"),delete n[e]):console.log(e+": 0ms")},window.console.clear=function(){for(var e=arguments.length,o=Array(e),n=0;e>n;n++)o[n]=arguments[n];t.clearLog(),t.console.clear.apply(window.console,o)}}},{key:"clearLog",value:function(){f["default"].one(".vc-log",this.$tabbox).innerHTML=""}},{key:"printOriginLog",value:function(e){"function"==typeof this.console[e.logType]&&this.console[e.logType].apply(window.console,e.logs)}},{key:"printLog",value:function(e){var t=e.logs||[];if(t.length||e.content){t=[].slice.call(t||[]);var o=!0,n=/^\[(\w+)\]$/i,i="";if(u.isString(t[0])){var a=t[0].match(n);null!==a&&a.length>0&&(i=a[1].toLowerCase())}if(i?o=i==this.id:0==this.allowUnformattedLog&&(o=!1),!o)return void(e.noOrigin||this.printOriginLog(e));if(e.date||(e.date=+new Date),!this.isReady)return void this.logList.push(e);if(u.isString(t[0])&&(t[0]=t[0].replace(n,""),""===t[0]&&t.shift()),!e.meta){var r=u.getDate(e.date);e.meta=r.hour+":"+r.minute+":"+r.second}for(var l=f["default"].render(b["default"],{logType:e.logType,noMeta:!!e.noMeta,meta:e.meta,style:e.style||""}),s=f["default"].one(".vc-item-content",l),d=0;d "+t[d].toString()+"":u.isObject(t[d])||u.isArray(t[d])?this.getFoldedLine(t[d]):" "+u.htmlEncode(t[d]).replace(/\n/g,"
")+"
"}catch(p){v=" ["+c(t[d])+"]"}v&&("string"==typeof v?s.insertAdjacentHTML("beforeend",v):s.insertAdjacentElement("beforeend",v))}u.isObject(e.content)&&s.insertAdjacentElement("beforeend",e.content),f["default"].one(".vc-log",this.$tabbox).insertAdjacentElement("beforeend",l),this.logNumber++,this.limitMaxLogs(),this.isInBottom&&this.autoScrollToBottom(),e.noOrigin||this.printOriginLog(e)}}},{key:"getFoldedLine",value:function(e,t){var o=this;if(!t){var n=u.JSONStringify(e),i=n.substr(0,26);t=u.getObjName(e),n.length>26&&(i+="..."),t+=" "+i}var a=f["default"].render(y["default"],{outer:t,lineType:"obj"});return f["default"].bind(f["default"].one(".vc-fold-outer",a),"click",function(t){t.preventDefault(),t.stopPropagation(),f["default"].hasClass(a,"vc-toggle")?(f["default"].removeClass(a,"vc-toggle"),f["default"].removeClass(f["default"].one(".vc-fold-inner",a),"vc-toggle"),f["default"].removeClass(f["default"].one(".vc-fold-outer",a),"vc-toggle")):(f["default"].addClass(a,"vc-toggle"),f["default"].addClass(f["default"].one(".vc-fold-inner",a),"vc-toggle"),f["default"].addClass(f["default"].one(".vc-fold-outer",a),"vc-toggle"));var n=f["default"].one(".vc-fold-inner",a);if(0==n.children.length&&e){for(var i=u.getObjAllKeys(e),r=0;r\n {{if (!noMeta)}}{{meta}}{{/if}}\n
\n'},function(e,t){e.exports='
\n {{if (lineType == \'obj\')}}\n {{outer}}\n
\n {{else if (lineType == \'value\')}}\n {{value}}\n {{else if (lineType == \'kv\')}}\n {{key}}: {{value}}\n {{/if}}\n
'},function(e,t){e.exports='\n {{key}}: {{value}}\n'},function(e,t){e.exports='
\n
\n
\n \n
\n \n
\n
\n
'},function(e,t){e.exports='
{{content}}
'},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var o=0;oi;i++)n[i]=arguments[i];var l=r(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return l.tplTabbox=p["default"],l.allowUnformattedLog=!1,l}return l(t,e),c(t,[{key:"onInit",value:function(){s(Object.getPrototypeOf(t.prototype),"onInit",this).call(this),this.printSystemInfo()}},{key:"printSystemInfo",value:function(){var e=navigator.userAgent,t="",o=e.match(/(ipod).*\s([\d_]+)/i),n=e.match(/(ipad).*\s([\d_]+)/i),i=e.match(/(iphone)\sos\s([\d_]+)/i),a=e.match(/(android)\s([\d\.]+)/i);t="Unknown",a?t="Android "+a[2]:i?t="iPhone, iOS "+i[2].replace(/_/g,"."):n?t="iPad, iOS "+n[2].replace(/_/g,"."):o&&(t="iPod, iOS "+o[2].replace(/_/g,"."));var r=t,l=e.match(/MicroMessenger\/([\d\.]+)/i);t="Unknown",l&&l[1]?(t=l[1],r+=", WeChat "+t,console.info("[system]","System:",r)):console.info("[system]","System:",r),t="Unknown",t="https:"==location.protocol?"HTTPS":"http:"==location.protocol?"HTTP":location.protocol.replace(":",""),r=t;var c=e.toLowerCase().match(/ nettype\/([^ ]+)/g);t="Unknown",c&&c[0]?(c=c[0].split("/"),t=c[1],r+=", "+t,console.info("[system]","Network:",r)):console.info("[system]","Protocol:",r),console.info("[system]","UA:",e),setTimeout(function(){var e=window.performance||window.msPerformance||window.webkitPerformance;if(e&&e.timing){var t=e.timing;t.navigationStart&&console.info("[system]","navigationStart:",t.navigationStart),t.navigationStart&&t.domainLookupStart&&console.info("[system]","navigation:",t.domainLookupStart-t.navigationStart+"ms"),t.domainLookupEnd&&t.domainLookupStart&&console.info("[system]","dns:",t.domainLookupEnd-t.domainLookupStart+"ms"),t.connectEnd&&t.connectStart&&(t.connectEnd&&t.secureConnectionStart?console.info("[system]","tcp (ssl):",t.connectEnd-t.connectStart+"ms ("+(t.connectEnd-t.secureConnectionStart)+"ms)"):console.info("[system]","tcp:",t.connectEnd-t.connectStart+"ms")),t.responseStart&&t.requestStart&&console.info("[system]","request:",t.responseStart-t.requestStart+"ms"),t.responseEnd&&t.responseStart&&console.info("[system]","response:",t.responseEnd-t.responseStart+"ms"),t.domComplete&&t.domLoading&&(t.domContentLoadedEventStart&&t.domLoading?console.info("[system]","domComplete (domLoaded):",t.domComplete-t.domLoading+"ms ("+(t.domContentLoadedEventStart-t.domLoading)+"ms)"):console.info("[system]","domComplete:",t.domComplete-t.domLoading+"ms")),t.loadEventEnd&&t.loadEventStart&&console.info("[system]","loadEvent:",t.loadEventEnd-t.loadEventStart+"ms"),t.navigationStart&&t.loadEventEnd&&console.info("[system]","total (DOM):",t.loadEventEnd-t.navigationStart+"ms ("+(t.domComplete-t.navigationStart)+"ms)")}},0)}}]),t}(v["default"]);t["default"]=h,e.exports=t["default"]},function(e,t){e.exports='
\n
\n
'},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var o=0;oi;i++)n[i]=arguments[i];var l=r(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return l.$tabbox=d["default"].render(g["default"],{}),l.$header=null,l.reqList={},l.domList={},l.isReady=!1,l.isShow=!1,l.isInBottom=!0,l._open=void 0,l._send=void 0,l.mockAjax(),l}return l(t,e),c(t,[{key:"onRenderTab",value:function(e){e(this.$tabbox)}},{key:"onAddTool",value:function(e){var t=this,o=[{name:"Clear",global:!1,onClick:function(e){t.clearLog()}}];e(o)}},{key:"onReady",value:function(){var e=this;e.isReady=!0,this.renderHeader(),d["default"].delegate(d["default"].one(".vc-log",this.$tabbox),"click",".vc-group-preview",function(t){var o=this.dataset.reqid,n=this.parentNode;d["default"].hasClass(n,"vc-actived")?(d["default"].removeClass(n,"vc-actived"),e.updateRequest(o,{actived:!1})):(d["default"].addClass(n,"vc-actived"),e.updateRequest(o,{actived:!0})),t.preventDefault()});var t=d["default"].one(".vc-content");d["default"].bind(t,"scroll",function(o){e.isShow&&(t.scrollTop+t.offsetHeight>=t.scrollHeight?e.isInBottom=!0:e.isInBottom=!1)});for(var o in e.reqList)e.updateRequest(o,{})}},{key:"onRemove",value:function(){window.XMLHttpRequest&&(window.XMLHttpRequest.prototype.open=this._open,window.XMLHttpRequest.prototype.send=this._send,this._open=void 0,this._send=void 0)}},{key:"onShow",value:function(){this.isShow=!0,1==this.isInBottom&&this.scrollToBottom()}},{key:"onHide",value:function(){this.isShow=!1}},{key:"onShowConsole",value:function(){1==this.isInBottom&&this.scrollToBottom()}},{key:"scrollToBottom",value:function(){var e=d["default"].one(".vc-content");e.scrollTop=e.scrollHeight-e.offsetHeight}},{key:"clearLog",value:function(){this.reqList={};for(var e in this.domList)this.domList[e].remove(),this.domList[e]=void 0;this.domList={},this.renderHeader()}},{key:"renderHeader",value:function(){var e=Object.keys(this.reqList).length,t=d["default"].render(m["default"],{count:e}),o=d["default"].one(".vc-log",this.$tabbox);this.$header?this.$header.parentNode.replaceChild(t,this.$header):o.parentNode.insertBefore(t,o),this.$header=t}},{key:"updateRequest",value:function(e,t){var o=Object.keys(this.reqList).length,n=this.reqList[e]||{};for(var i in t)n[i]=t[i];if(this.reqList[e]=n,this.isReady){var a={id:e,url:n.url,status:n.status,method:n.method||"-",costTime:n.costTime>0?n.costTime+"ms":"-",header:n.header||null,getData:n.getData||null,postData:n.postData||null,response:null,actived:!!n.actived};switch(n.responseType){case"":case"text":if(v.isString(n.response))try{a.response=JSON.parse(n.response),a.response=JSON.stringify(a.response,null,1),a.response=v.htmlEncode(a.response)}catch(r){a.response=v.htmlEncode(n.response)}else"undefined"!=typeof n.response&&(a.response=Object.prototype.toString.call(n.response));break;case"json":"undefined"!=typeof n.response&&(a.response=JSON.stringify(n.response,null,1));break;case"blob":case"document":case"arraybuffer":default:"undefined"!=typeof n.response&&(a.response=Object.prototype.toString.call(n.response))}0==n.readyState||1==n.readyState?a.status="Pending":2==n.readyState||3==n.readyState?a.status="Loading":4==n.readyState||(a.status="Unknown");var l=d["default"].render(_["default"],a),c=this.domList[e];n.status>=400&&d["default"].addClass(d["default"].one(".vc-group-preview",l),"vc-table-row-error"),c?c.parentNode.replaceChild(l,c):d["default"].one(".vc-log",this.$tabbox).insertAdjacentElement("beforeend",l),this.domList[e]=l;var s=Object.keys(this.reqList).length;s!=o&&this.renderHeader(),this.isInBottom&&this.scrollToBottom()}}},{key:"mockAjax",value:function(){var e=window.XMLHttpRequest;if(e){var t=this,o=window.XMLHttpRequest.prototype.open,n=window.XMLHttpRequest.prototype.send;t._open=o,t._send=n,window.XMLHttpRequest.prototype.open=function(){var e=this,n=[].slice.call(arguments),i=n[0],a=n[1],r=t.getUniqueID(),l=null;e._requestID=r,e._method=i,e._url=a;var c=e.onreadystatechange||function(){},s=function(){var o=t.reqList[r]||{};if(o.readyState=e.readyState,o.status=0,e.readyState>1&&(o.status=e.status),o.responseType=e.responseType,0==e.readyState)o.startTime||(o.startTime=+new Date);else if(1==e.readyState)o.startTime||(o.startTime=+new Date);else if(2==e.readyState){o.header={};for(var n=e.getAllResponseHeaders()||"",i=n.split("\n"),a=0;a0){a.getData={},r=r.join("?"),r=r.split("&");var l=!0,c=!1,s=void 0;try{for(var d,u=r[Symbol.iterator]();!(l=(d=u.next()).done);l=!0){var f=d.value;f=f.split("="),a.getData[f[0]]=f[1]}}catch(p){c=!0,s=p}finally{try{!l&&u["return"]&&u["return"]()}finally{if(c)throw s}}}if("POST"==a.method)if(v.isString(i)){var h=i.split("&");a.postData={};var g=!0,b=!1,m=void 0;try{for(var y,_=h[Symbol.iterator]();!(g=(y=_.next()).done);g=!0){var w=y.value;w=w.split("="),a.postData[w[0]]=w[1]}}catch(p){b=!0,m=p}finally{try{!g&&_["return"]&&_["return"]()}finally{if(b)throw m}}}else v.isPlainObject(i)&&(a.postData=i);return e._noVConsole||t.updateRequest(e._requestID,a),n.apply(e,o)}}}},{key:"getUniqueID",value:function(){var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,o="x"==e?t:3&t|8;return o.toString(16)});return e}}]),t}(p["default"]);t["default"]=w,e.exports=t["default"]},function(e,t){e.exports='
\n
\n
'},function(e,t){e.exports='
\n
Name {{if (count > 0)}}({{count}}){{/if}}
\n
Method
\n
Status
\n
Time
\n
'},function(e,t){e.exports='
\n
\n
{{url}}
\n
{{method}}
\n
{{status}}
\n
{{costTime}}
\n
\n
\n {{if (header !== null)}}\n
\n
\n
Headers
\n
\n {{for (var key in header)}}\n
\n
{{key}}
\n
{{header[key]}}
\n
\n {{/for}}\n
\n {{/if}}\n {{if (getData !== null)}}\n
\n
\n
Query String Parameters
\n
\n {{for (var key in getData)}}\n
\n
{{key}}
\n
{{getData[key]}}
\n
\n {{/for}}\n
\n {{/if}}\n {{if (postData !== null)}}\n
\n
\n
Form Data
\n
\n {{for (var key in postData)}}\n
\n
{{key}}
\n
{{postData[key]}}
\n
\n {{/for}}\n
\n {{/if}}\n
\n
\n
Response
\n
\n
\n
{{response || \'\'}}
\n
\n
\n
\n
'},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function"); 12 | }function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var o=0;oi;i++)n[i]=arguments[i];var l=r(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n))),c=l;c.isInited=!1,c.node={},c.$tabbox=b["default"].render(v["default"],{}),c.nodes=[],c.activedElem={};var s=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;return c.observer=new s(function(e){for(var t=0;t0&&this.onChildRemove(e),e.addedNodes.length>0&&this.onChildAdd(e);break;case"attributes":this.onAttributesChange(e);break;case"characterData":this.onCharacterDataChange(e)}}},{key:"onChildRemove",value:function(e){var t=e.target,o=t.__vconsole_node;if(o){for(var n=0;n0||(e.childNodes[i]?n.renderView(e.childNodes[i],r,"replace"):r.style.display="none"))}}}),o){case"replace":t.parentNode.replaceChild(i,t);break;case"insertBefore":t.parentNode.insertBefore(i,t);break;default:t.appendChild(i)}return i}},{key:"getNode",value:function(e){if(!this._isIgnoredElement(e)){var t=e.__vconsole_node||{};if(t.nodeType=e.nodeType,t.nodeName=e.nodeName,t.tagName=e.tagName||"",t.textContent="",t.nodeType!=e.TEXT_NODE&&t.nodeType!=e.DOCUMENT_TYPE_NODE||(t.textContent=e.textContent),t.id=e.id||"",t.className=e.className||"",t.attributes=[],e.hasAttributes&&e.hasAttributes())for(var o=0;o0)for(var n=0;n.vcelm-node{display:block}.vcelm-l .vcelm-node:active{background-color:rgba(0,0,0,.15)}.vcelm-l.vcelm-noc .vcelm-node:active{background-color:transparent}.vcelm-t{white-space:pre-wrap;word-wrap:break-word}.vcelm-l .vcelm-l{display:none}.vcelm-l.vc-toggle>.vcelm-l{margin-left:4px;display:block}.vcelm-l:before{content:"";display:block;position:absolute;top:6px;left:3px;width:0;height:0;border:3px solid transparent;border-left-color:#000}.vcelm-l.vc-toggle:before{display:block;top:6px;left:0;border-top-color:#000;border-left-color:transparent}.vcelm-l.vcelm-noc:before{display:none}',""])},function(e,t){e.exports='
\n
\n
'},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){var t=["br","hr","img","input","link","meta"];return e=e?e.toLowerCase():"",t.indexOf(e)>-1}function l(e){return document.createTextNode(e)}function c(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var o=0;o<{{node.tagName.toLowerCase()}}{{if (node.className || node.attributes.length)}}\n \n {{for (var i = 0; i < node.attributes.length; i++)}}\n {{if (node.attributes[i].value !== \'\')}}\n {{node.attributes[i].name}}="{{node.attributes[i].value}}"{{else}}\n {{node.attributes[i].name}}{{/if}}{{/for}}{{/if}}>'},function(e,t){e.exports='</{{node.tagName.toLowerCase()}}>'},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var o=0;oi;i++)n[i]=arguments[i];var l=r(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return l.$tabbox=m["default"].render(v["default"],{}),l.currentType="",l.typeNameMap={cookies:"Cookies",localstorage:"LocalStorage"},l}return l(t,e),c(t,[{key:"onRenderTab",value:function(e){e(this.$tabbox)}},{key:"onAddTopBar",value:function(e){for(var t=this,o=["Cookies","LocalStorage"],n=[],i=0;i\n
\n'},function(e,t){e.exports='
\n
\n
Name
\n
Value
\n
\n {{for (var i = 0; i < list.length; i++)}}\n
\n
{{list[i].name}}
\n
{{list[i].value}}
\n
\n {{/for}}\n
'}])}); --------------------------------------------------------------------------------