Repository: dwqs/vue-area-linkage Branch: master Commit: a494a7afe769 Files: 63 Total size: 816.9 KB Directory structure: gitextract_94_0rqxq/ ├── .babelrc ├── .editorconfig ├── .eslintrc ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── build/ │ ├── dev-server.js │ ├── happypack.js │ ├── webpack.base.config.js │ ├── webpack.dev.config.js │ └── webpack.prod.config.js ├── components/ │ ├── area-cascader/ │ │ ├── cascader/ │ │ │ ├── caspanel.vue │ │ │ └── index.vue │ │ ├── index.js │ │ ├── index.vue │ │ └── mixins/ │ │ └── emitter.js │ └── area-select/ │ ├── index.js │ ├── index.vue │ └── select/ │ ├── index.vue │ └── option.vue ├── components.json ├── config/ │ └── index.js ├── demo/ │ ├── gh.ac2a7e95.css │ ├── gh.f9e788c4.js │ └── vendor.8d61534d.js ├── dist/ │ ├── index.css │ ├── index.js │ └── lib/ │ ├── area-cascader.js │ └── area-select.js ├── gh/ │ ├── components/ │ │ ├── footer/ │ │ │ └── index.vue │ │ ├── header/ │ │ │ └── index.vue │ │ ├── main/ │ │ │ ├── area-code.vue │ │ │ ├── area.vue │ │ │ ├── basic.vue │ │ │ ├── cas-area-code.vue │ │ │ ├── cas-area.vue │ │ │ ├── cas-basic.vue │ │ │ ├── cas-default-value.vue │ │ │ ├── cas-placeholder.vue │ │ │ ├── cas-returns.vue │ │ │ ├── default-value.vue │ │ │ ├── index.less │ │ │ ├── index.vue │ │ │ ├── placeholders.vue │ │ │ ├── province.vue │ │ │ ├── returns.vue │ │ │ └── size.vue │ │ └── start/ │ │ ├── index.less │ │ └── index.vue │ ├── general/ │ │ └── app/ │ │ └── index.vue │ └── page/ │ ├── index.js │ └── reset.css ├── index.html ├── package.json ├── postcss.config.js ├── src/ │ ├── bus.js │ ├── index.js │ ├── index.less │ └── utils.js ├── tpl.html ├── webpack.build.config.js └── webpack.components.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .babelrc ================================================ { "presets": [["latest", { "es2015": { "modules": false } }]], "plugins": ["transform-runtime"] } ================================================ FILE: .editorconfig ================================================ # EditorConfig is awesome: http://EditorConfig.org # top-most EditorConfig file root = true # Unix-style newlines with a newline ending every file [*] end_of_line = lf insert_final_newline = true # Matches multiple files with brace expansion notation # Set default [*.{js,vue,less}] charset = utf-8 indent_style = space indent_size = 4 # Matches the exact files either package.json or .travis.yml [{package.json,.travis.yml}] indent_style = space indent_size = 2 ================================================ FILE: .eslintrc ================================================ { root: true, parser: "babel-eslint", parserOptions: { ecmaVersion: 7, sourceType: "module", allowImportExportEverywhere: false, ecmaFeatures: { jsx: true, modules: true } }, env: { es6: true, node: true, browser: true }, extends: "vue", rules: { indent: [2, 4, { "SwitchCase": 1 }], quotes: [2, "single", { "allowTemplateLiterals": true }], linebreak-style: [2, "unix"], semi: [2, "always"], eqeqeq: [2, "always"], strict: [2, "global"], key-spacing: [2, { "afterColon": true }], no-console: 0, no-debugger: 0, no-empty: 0, no-unused-vars: 0, no-constant-condition: 0, no-undef: 0, } } ================================================ FILE: .gitignore ================================================ # Created by .ignore support plugin (hsz.mobi) ### Node template # Logs logs *.log npm-debug.log* # Runtime data pids *.pid *.seed # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage # nyc test coverage .nyc_output # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt # node-waf configuration .lock-wscript # Compiled binary addons (http://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules jspm_packages # Optional npm cache directory .npm # Optional REPL history .node_repl_history .idea public/dist .DS_Store .cache converage .vscode reports .cache .happypack streets.js !demo/streets.js package-lock.json ================================================ FILE: .npmignore ================================================ src .gitignore .vscode .npmrc .babelrc node_modules demo gh build config *.html *.js ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2017 Pomy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ ![npm-version](https://img.shields.io/npm/v/vue-area-linkage.svg) ![license](https://img.shields.io/npm/l/vue-area-linkage.svg) # vue-area-linkage 省市区联动选择. 组合数据来源:[area-data](https://github.com/dwqs/area-data) ## Installation Install the pkg with npm: ``` // v5之前的版本 npm i --save vue-area-linkage // v5及之后的版本 npm i --save vue-area-linkage area-data ``` or yarn ``` // v5之前的版本 yarn add vue-area-linkage // v5及之后的版本 yarn add vue-area-linkage area-data ``` ## Usage ``` import Vue from 'vue'; import { pca, pcaa } from 'area-data'; // v5 or higher import 'vue-area-linkage/dist/index.css'; // v2 or higher import VueAreaLinkage from 'vue-area-linkage'; Vue.use(VueAreaLinkage) ``` ``` // v5之前的版本 // v5及之后的版本 // 省市 // 省市区: // 省市 // 省市区: //setting ``` More demo to visit [here](https://dwqs.github.io/vue-area-linkage/). ## On Demand Import > version >= 2.1.2 安装 [babel-plugin-on-demand-import](https://github.com/dwqs/babel-plugin-on-demand-import): ``` npm i babel-plugin-on-demand-import -D ``` 修改 `.babelrc`: ``` { // ... "plugins": [ ["on-demand-import" { "libraryName": "vue-area-linkage", "libraryPath": "dist/lib" }] ] } ``` ``` import 'vue-area-linkage/dist/index.css'; // v2 or higher import pcaa from 'area-data/pcaa'; // Only import AreaCascader component import { AreaCascader } from 'vue-area-linkage'; Vue.use(AreaCascader); // Only import AreaSelect component import { AreaSelect } from 'vue-area-linkage'; Vue.use(AreaSelect); ``` ## 属性 ### area-select 组件 | 参数 | 类型 | 可选值 | 默认值 | 说明 | | :--: | :--: | :--: | :--: | :--: | | type | String | all/code/text | code | 设置返回的数据格式 | | placeholders | Array | - | [] | 设置 placeholder text | | level | Number | 0/1/2 | 1 | 设置联动层级(0-只选省份/1-省市联动/2-省市区联动) | | size | String | small/medium/large | medium | 设置输入框的大小 | | disabled | Boolean | - | false | 是否禁用 | | data | Object | - | - | 地区数据(v5需要传入) | | icon | String | - | area-select-icon | 自定义下拉小图标 | | disableLinkage | Boolean | - | true | 地区选择是否进行联动 | >v4 仅支持省市区联动,即 v4 不再支持 level 的值为 3(省市区街联动) ### area-cascader 组件 | 参数 | 类型 | 可选值 | 默认值 | 说明 | | :--: | :--: | :--: | :--: | :--: | | type | String | all/code/text | code | 设置返回的数据格式 | | placeholder | String | - | '' | 设置 placeholder text | | level | Number | 0/1 | 0 | 设置联动层级(0-省市联动/1-省市区联动) | | size | String | small/medium/large | medium | 设置输入框的大小 | | separator | String | - | '-' | 显示选中文本的分隔符 | | disabled | Boolean | - | false | 是否禁用 | | data | Object | - | - | 地区数据(v5需要传入) | ## 事件 | 事件名 | 说明 | 参数 | | :--: | :--: | :--: | | change | 选中值发生变化时触发 | 目前选择的值 | > change 事件在 1.2.5 之后提供 ## Related Project * [react-area-linkage](https://github.com/dwqs/react-area-linkage) ## License MIT. ================================================ FILE: build/dev-server.js ================================================ const webpack = require('webpack'); const WebpackDevServer = require('webpack-dev-server'); const ora = require('ora'); const gutil = require('gulp-util'); const webpackDevConfig = require('./webpack.dev.config.js'); const config = require('../config/index'); const compiler = webpack(webpackDevConfig); const server = new WebpackDevServer(compiler, webpackDevConfig.devServer); const env = process.env.NODE_ENV || 'development'; const url = `localhost:${config.dev.port}/`; let spinner = ora({ text: 'Webpack 正在编译...\n', color: 'green' }).start(); function compiledFail () { if (spinner) { spinner.color = 'red'; spinner.text = gutil.colors.white('Webpack 编译失败: \n'); spinner.fail(); spinner = null; } } server.listen(config.dev.port, 'localhost', (err) => { if (err) { compiledFail(); throw new gutil.PluginError('[webpack-dev-server err]', err); } }); // 编译完成 compiler.plugin('done', (stats) => { if (spinner) { spinner.text = gutil.colors.green(`Webpack 编译成功, open browser to visit ${url}\n`); spinner.succeed(); spinner = null; } }); // 编译失败 compiler.plugin('failed', (err) => { compiledFail(); throw new gutil.PluginError('[webpack build err]', err); }); // 监听文件修改 compiler.plugin('compilation', compilation => {}); ================================================ FILE: build/happypack.js ================================================ const HappyPack = require('happypack'); const os = require('os'); const happyThreadPool = HappyPack.ThreadPool({ size: os.cpus().length }); module.exports = function (opts) { return { id: opts.id, threadPool: happyThreadPool, verbose: true, loaders: opts.loaders }; }; ================================================ FILE: build/webpack.base.config.js ================================================ const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const HappyPack = require('happypack'); const getHappyPackConfig = require('./happypack'); const config = require('../config'); module.exports = { module: { rules: [ { test: /\.vue$/, use: [{ loader: 'happypack/loader?id=vue' }] }, { test: /\.js$/, exclude: /node_modules/, use: ['happypack/loader?id=js'] }, { test: /\.(png|jpg|gif|jpeg)$/, use: [{ loader: 'file-loader', options: { limit: 8192, name: '[name].[ext]?[hash:8]' } }] } ] }, resolve: { extensions: ['.vue', '.js'], modules: [path.join(__dirname, '../node_modules')], alias: { '@src': path.resolve(__dirname, '../src'), '@gh': path.resolve(__dirname, '../gh'), '@components': path.resolve(__dirname, '../gh/components'), 'vue$': 'vue/dist/vue.js' } }, resolveLoader: { modules: [path.join(__dirname, '../node_modules')] }, performance: { hints: false }, plugins: [ new HappyPack(getHappyPackConfig({ id: 'vue', loaders: [{ path: 'vue-loader', query: { // https://github.com/vuejs/vue-loader/issues/863 esModule: false } }] })), new HappyPack(getHappyPackConfig({ id: 'js', loaders: ['babel-loader'] })), // https://github.com/ampedandwired/html-webpack-plugin new HtmlWebpackPlugin({ filename: 'index.html', template: 'tpl.html', inject: true, env: process.env.NODE_ENV, minify: { removeComments: true, collapseWhitespace: true, removeAttributeQuotes: false } }) ] }; ================================================ FILE: build/webpack.dev.config.js ================================================ const path = require('path'); const webpack = require('webpack'); const OpenBrowserPlugin = require('open-browser-webpack-plugin'); const HappyPack = require('happypack'); const getHappyPackConfig = require('./happypack'); const devConfig = require('./webpack.base.config'); const config = require('../config'); const url = `http://localhost:${config.dev.port}`; devConfig.module.rules.unshift({ test: /\.less$/, use: ['happypack/loader?id=less-dev'] }, { test: /\.css$/, use: ['happypack/loader?id=css-dev'] }); devConfig.plugins = (devConfig.plugins || []).concat([ new webpack.HotModuleReplacementPlugin(), new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify(config.dev.env) } }), new HappyPack(getHappyPackConfig({ id: 'less-dev', loaders: ['vue-style-loader', 'css-loader', 'postcss-loader', 'less-loader'] })), new HappyPack(getHappyPackConfig({ id: 'css-dev', loaders: ['vue-style-loader', 'css-loader', 'postcss-loader'] })), new webpack.NoEmitOnErrorsPlugin(), new OpenBrowserPlugin({ url: url }) ]); // see https://webpack.github.io/docs/webpack-dev-server.html devConfig.devServer = { hot: true, noInfo: false, quiet: false, port: config.dev.port, // #https://github.com/webpack/webpack-dev-server/issues/882 disableHostCheck: true, headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept' }, inline: true, // 解决开发模式下 在子路由刷新返回 404 的情景 historyApiFallback: { index: config.dev.assetsPublicPath }, stats: { colors: true, modules: false }, contentBase: config.dev.contentBase, publicPath: config.dev.assetsPublicPath }; module.exports = Object.assign({}, devConfig, { entry: { index: [ 'webpack/hot/dev-server', `webpack-dev-server/client?http://localhost:${config.dev.port}/`, path.resolve(__dirname, '../gh/page/index.js') ] }, output: { filename: '[name].js', path: config.dev.assetsRoot, publicPath: config.dev.assetsPublicPath, sourceMapFilename: '[file].map', chunkFilename: '[name].js' }, devtool: 'source-map' }); ================================================ FILE: build/webpack.prod.config.js ================================================ const path = require('path'); const webpack = require('webpack'); const ExtractTextPlugin = require("extract-text-webpack-plugin"); const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin'); const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const WebpackMd5Hash = require('webpack-md5-hash'); const os = require('os'); const CompressionPlugin = require("compression-webpack-plugin"); const HappyPack = require('happypack'); const getHappyPackConfig = require('./happypack'); const prodConfig = require('./webpack.base.config'); const config = require('../config'); prodConfig.module.rules.unshift({ test: /\.less$/, use: ExtractTextPlugin.extract({ fallback: 'vue-style-loader', use: ['happypack/loader?id=less-prod'] }) }, { test: /\.css$/, use: ExtractTextPlugin.extract({ fallback: 'vue-style-loader', use: ['happypack/loader?id=css-prod'] }) }); prodConfig.plugins = (prodConfig.plugins || []).concat([ new CleanWebpackPlugin(['demo'], { root: path.join(__dirname, '../'), verbose: true, dry: false }), new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify(config.build.env) } }), new ExtractTextPlugin({ filename: '[name].[contenthash:8].css' }), new HappyPack(getHappyPackConfig({ id: 'less-prod', loaders: ['css-loader', { path: 'postcss-loader', query: { sourceMap: 'inline' } }, 'less-loader'] })), new HappyPack(getHappyPackConfig({ id: 'css-prod', loaders: ['css-loader', { path: 'postcss-loader', query: { sourceMap: 'inline' } }] })), // Compress extracted CSS. We are using this plugin so that possible // duplicated CSS from different components can be deduped. new OptimizeCSSPlugin({ cssProcessorOptions: { safe: true }, assetNameRegExp: /\.less$/g }), new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', minChunks: ({ resource }) => ( resource && resource.indexOf('node_modules') >= 0 && resource.match(/\.js$/) ) }), // gzip new CompressionPlugin({ asset: '[path].gz[query]', algorithm: 'gzip', test: /\.(js|html|less)$/, threshold: 10240, minRatio: 0.8 }), new ParallelUglifyPlugin({ workerCount: os.cpus().length, cacheDir: '.cache/', uglifyJS: { compress: { warnings: false, /* eslint-disable camelcase */ drop_debugger: true, drop_console: true }, comments: false, sourceMap: true, mangle: true } }), new webpack.optimize.ModuleConcatenationPlugin(), new WebpackMd5Hash() ]); module.exports = Object.assign({}, prodConfig, { entry: { gh: path.resolve(__dirname, '../gh/page/index.js') }, output: { filename: '[name].[chunkhash:8].js', path: config.build.assetsRoot, publicPath: config.build.assetsPublicPath, sourceMapFilename: '[file].map', chunkFilename: '[name].[chunkhash:8].js' } }); ================================================ FILE: components/area-cascader/cascader/caspanel.vue ================================================ ================================================ FILE: components/area-cascader/cascader/index.vue ================================================ ================================================ FILE: components/area-cascader/index.js ================================================ import AreaCascader from './index.vue'; import Bus from '@src/bus.js'; AreaCascader.install = function (Vue) { Bus.saveVueRef(Vue); Vue.component(AreaCascader.name, AreaCascader); }; export default AreaCascader; ================================================ FILE: components/area-cascader/index.vue ================================================ ================================================ FILE: components/area-cascader/mixins/emitter.js ================================================ function broadcast (componentName, eventName, params) { this.$children.forEach(child => { const name = child.$options.name; if (name === componentName) { child.$emit.apply(child, [eventName].concat(params)); } else { broadcast.apply(child, [componentName, eventName].concat([params])); } }); } export default { methods: { // dispatch (componentName, eventName, params) { // let parent = this.$parent || this.$root; // let name = parent.$options.name; // while (parent && (!name || name !== componentName)) { // parent = parent.$parent; // if (parent) { // name = parent.$options.name; // } // } // if (parent) { // parent.$emit.apply(parent, [eventName].concat(params)); // } // }, broadcast (componentName, eventName, params) { broadcast.call(this, componentName, eventName, params); } } }; ================================================ FILE: components/area-select/index.js ================================================ import AreaSelect from './index.vue'; AreaSelect.install = function (Vue) { Vue.component(AreaSelect.name, AreaSelect); }; export default AreaSelect; ================================================ FILE: components/area-select/index.vue ================================================ ================================================ FILE: components/area-select/select/index.vue ================================================ ================================================ FILE: components/area-select/select/option.vue ================================================ ================================================ FILE: components.json ================================================ { "area-select": "./components/area-select/index.js", "area-cascader": "./components/area-cascader/index.js" } ================================================ FILE: config/index.js ================================================ const path = require('path'); module.exports = { dev: { env: 'development', assetsRoot: path.resolve(__dirname, '../demo'), assetsPublicPath: '/', contentBase: path.resolve(__dirname, '../demo'), port: 4000 }, build: { env: 'production', assetsRoot: path.resolve(__dirname, '../demo'), assetsPublicPath: './demo/' } }; ================================================ FILE: demo/gh.ac2a7e95.css ================================================ .start { margin-top: 40px; } .start h3 { text-align: center; font-size: 25px; color: #6289ad; } .start h4 { font-size: 18px; color: #6289ad; } .start pre { margin-top: 15px; background: #f8f8f8; padding: 15px 10px; color: #000; font-size: 16px; font-weight: 400; } .start .install { margin-top: 20px; } .start .install p { margin-top: 20px; margin-bottom: 20px; } .start .register { margin-top: 20px; }html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; outline:0; vertical-align:baseline; background:transparent; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } html,body { height: 100%; width: 100%; /* # https://github.com/AlloyTeam/Mars/blob/master/solutions/font-family.md */ font-family: -apple-system, BlinkMacSystemFont, "PingFang SC","Helvetica Neue",STHeiti,"Microsoft Yahei",Tahoma,Simsun,sans-serif; } body { margin:0; padding:0; -webkit-box-sizing: border-box; box-sizing: border-box; font-size: 14px; line-height: 1; background: none; -moz-user-select:none; -webkit-user-select:none; -ms-user-select:none; user-select:none; overflow-x:hidden; -webkit-overflow-scrolling:touch; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent; } ol, ul, nav ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; } table { border-collapse:collapse; border-spacing:0; } a{ text-decoration:none; margin: 0; padding: 0; border: 0; font-size:100%; vertical-align:baseline; background:transparent; -webkit-appearance: none; -webkit-tap-highlight-color: transparent; } :focus { outline: none; } ins { background-color:#ff9; color:#000; text-decoration:none; } mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; } del { text-decoration: line-through; } abbr[title], dfn[title] { border-bottom:1px dotted #000; cursor:help; } hr { display:block; height:1px; border:0; border-top:1px solid #cccccc; margin:1em 0; padding:0; } input[type="text"], input[type="password"], textarea, input, select { outline: none; -webkit-appearance: none; } input, select { vertical-align:middle; } * { -webkit-box-sizing: border-box; box-sizing: border-box; /* # https://github.com/AlloyTeam/Mars/blob/master/solutions/font-family.md */ font-family: -apple-system, BlinkMacSystemFont, "PingFang SC","Helvetica Neue",STHeiti,"Microsoft Yahei",Tahoma,Simsun,sans-serif; /*font: 0.12rem/1 "Microsoft YaHei", Tahoma, Arial, Helvetica, \\5b8b\4f53, "Helvetica Neue", "PingFang SC", "Heiti SC", "Hiragino Sans GB", "\5FAE\8F6F\96C5\9ED1", sans-serif;*/ color: inherit; } /* el-scrollbar */ /* .size-example .area-select.large .el-select:last-child{ margin-left: 30px } */.app-main { margin-top: 20px; } .app-main h3 { text-align: center; font-size: 25px; color: #6289ad; } .app-main h4 { margin-top: 25px; font-size: 18px; color: #6289ad; } .app-main h5 { margin-top: 20px; font-size: 16px; color: #6289ad; } .app-main .desc { margin-top: 15px; } .app-main .desc code { background: #f8f8f8; color: #333; padding: 5px; } .app-main .code-area { position: relative; width: 100%; height: auto; border: 1px solid #dce7f4; border-radius: 4px; margin-top: 20px; padding: 0; } .app-main .code-area > div { margin-top: 40px; display: inline-block; vertical-align: middle; } .app-main .code-area .area-left { width: 75%; margin-left: 10px; } .app-main .code-area .area-right { width: 21%; margin-left: 10px; } .app-main .code-area .area-right pre { background: #f8f8f8; padding: 15px 10px; color: #6289ad; line-height: 20px; } .app-main .code-area .original-code { width: 90%; margin: 25px 45px -10px; } .app-main .code-area .original-code pre { background: #f8f8f8; padding: 15px 10px; } .app-main .code-area .show-code { width: 100%; cursor: pointer; text-align: center; border-top: 1px solid #dce7f4; padding-top: 10px; padding-bottom: 10px; color: #6289ad; font-weight: 500; font-size: 18px; } .app-main .code-area .show-code:hover { background-color: #dce7f4; color: #fff; }.area-zoom-in-top-enter-active, .area-zoom-in-top-leave-active { opacity: 1; -webkit-transform: scaleY(1); -ms-transform: scaleY(1); transform: scaleY(1); -webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); -o-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); -webkit-transform-origin: center top; -ms-transform-origin: center top; transform-origin: center top; } .area-zoom-in-top-enter, .area-zoom-in-top-leave-active { opacity: 0; -webkit-transform: scaleY(0); -ms-transform: scaleY(0); transform: scaleY(0); } .area-select { position: relative; display: inline-block; vertical-align: top; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; height: 32px; cursor: pointer; background: #FFFFFF; border-radius: 4px; border: 1px solid #e1e2e6; } .area-select * { -webkit-box-sizing: border-box; box-sizing: border-box; } .area-select:hover { border-color: #a1a4ad; } .area-select.small { width: 126px; } .area-select.medium { width: 160px; } .area-select.large { width: 194px; } .area-select.is-disabled { background: #eceff5; cursor: not-allowed; } .area-select.is-disabled:hover { border-color: #e1e2e6; } .area-select.is-disabled .area-selected-trigger { cursor: not-allowed; } .area-select .area-selected-trigger { position: relative; display: block; font-size: 14px; cursor: pointer; margin: 0; overflow: hidden; white-space: nowrap; -o-text-overflow: ellipsis; text-overflow: ellipsis; height: 100%; padding: 8px 20px 7px 12px; } .area-select .area-select-icon { position: absolute; top: 50%; margin-top: -2px; right: 6px; content: ''; width: 0; height: 0; border: 6px solid transparent; border-top-color: #a1a4ad; -webkit-transition: all .3s linear; -o-transition: all .3s linear; transition: all .3s linear; -webkit-transform-origin: center; -ms-transform-origin: center; transform-origin: center; } .area-select .area-select-icon.active { margin-top: -8px; -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .area-selectable-list-wrap { position: absolute; width: 100%; max-height: 275px; z-index: 15000; border: 1px solid #a1a4ad; border-radius: 2px; background-color: #FFFFFF; -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04); -webkit-box-sizing: border-box; box-sizing: border-box; margin: 5px 0; overflow-x: hidden; overflow-x: auto; } .area-selectable-list { position: relative; margin: 0; padding: 6px 0; width: 100%; font-size: 14px; color: #565656; list-style: none; } .area-selectable-list .area-select-option { position: relative; white-space: nowrap; overflow: hidden; -o-text-overflow: ellipsis; text-overflow: ellipsis; cursor: pointer; padding: 0px 15px 0px 10px; height: 32px; line-height: 32px; } .area-selectable-list .area-select-option.hover { background-color: #e4e8f1; } .area-selectable-list .area-select-option.selected { background-color: #e4e8f1; color: #FF6200; font-weight: 700; } .cascader-menu-list-wrap { position: absolute; white-space: nowrap; z-index: 15000; border: 1px solid #a1a4ad; border-radius: 2px; background-color: #FFFFFF; -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04); -webkit-box-sizing: border-box; box-sizing: border-box; margin: 5px 0; overflow: hidden; font-size: 0; } .cascader-menu-list { position: relative; margin: 0; font-size: 14px; color: #565656; padding: 6px 0; list-style: none; display: inline-block; height: 204px; overflow-x: hidden; overflow-y: auto; min-width: 160px; vertical-align: top; background-color: #fff; border-right: 1px solid #e4e7ed; } .cascader-menu-list:last-child { border-right: none; } .cascader-menu-list .cascader-menu-option { position: relative; white-space: nowrap; overflow: hidden; -o-text-overflow: ellipsis; text-overflow: ellipsis; cursor: pointer; padding: 0px 15px 0px 10px; height: 32px; line-height: 32px; } .cascader-menu-list .cascader-menu-option.hover { background-color: #e4e8f1; } .cascader-menu-list .cascader-menu-option:hover { background-color: #e4e8f1; } .cascader-menu-list .cascader-menu-option.selected { background-color: #e4e8f1; color: #FF6200; font-weight: 700; } .cascader-menu-list .cascader-menu-option.cascader-menu-extensible:after { position: absolute; top: 50%; margin-top: -4px; right: 5px; content: ""; width: 0; height: 0; border: 4px solid transparent; border-left-color: #a1a4ad; } .cascader-menu-list::-webkit-scrollbar, .area-selectable-list-wrap::-webkit-scrollbar { width: 8px; background: transparent; } .cascader-menu-list::-webkit-scrollbar-button:vertical:increment, .area-selectable-list-wrap::-webkit-scrollbar-button:vertical:increment, .cascader-menu-list::-webkit-scrollbar-button:vertical:decremen, .area-selectable-list-wrap::-webkit-scrollbar-button:vertical:decremen, .cascader-menu-list::-webkit-scrollbar-button:vertical:start:increment, .area-selectable-list-wrap::-webkit-scrollbar-button:vertical:start:increment, .cascader-menu-list::-webkit-scrollbar-button:vertical:end:decrement, .area-selectable-list-wrap::-webkit-scrollbar-button:vertical:end:decrement { display: none; } .cascader-menu-list::-webkit-scrollbar-thumb:vertical, .area-selectable-list-wrap::-webkit-scrollbar-thumb:vertical { background-color: #b8b8b8; border-radius: 4px; } .cascader-menu-list::-webkit-scrollbar-thumb:vertical:hover, .area-selectable-list-wrap::-webkit-scrollbar-thumb:vertical:hover { background-color: #777; } ================================================ FILE: demo/gh.f9e788c4.js ================================================ webpackJsonp([0],[,,,,,,,,,function(e,t,s){"use strict";function a(e,t){if(!Object.prototype.toString.call(e).includes("Element")||!Object.prototype.toString.call(t).includes("Element"))return!1;for(var s=t;s;){if(s===e)return!0;s=s.parentNode}return!1}function i(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]}function n(e){return"[object Array]"===Object.prototype.toString.call(e)}function r(e,t){if(!t)return void(e.scrollTop=0);var s=t.offsetTop,a=t.offsetTop+t.offsetHeight,i=e.scrollTop,n=i+e.clientHeight;sn&&(e.scrollTop=a-e.clientHeight)}function l(e,t){var s=t.height,a=t.top,i=document.documentElement.clientHeight,n=a+s,r=i-n;return re?-(e+10):r-e:s}s.d(t,"b",function(){return a}),s.d(t,"a",function(){return i}),s.d(t,"c",function(){return n}),s.d(t,"d",function(){return r}),s.d(t,"e",function(){return l})},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,s){var a=s(0),i=s(74),n=s(75),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){var a=s(0),i=s(76),n=s(77),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){var a=s(0),i=s(81),n=s(110),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";var a={_Vue:null,createEventBus:function(){return new this._Vue},saveVueRef:function(e){this._Vue=e}};t.a=a},function(e,t,s){"use strict";function a(e,t,s){this.$children.forEach(function(i){i.$options.name===e?i.$emit.apply(i,[t].concat(s)):a.apply(i,[e,t].concat([s]))})}t.a={methods:{broadcast:function(e,t,s){a.call(this,e,t,s)}}}},,function(e,t,s){"use strict";function a(e){d.a.saveVueRef(e),h.map(function(t){e.component(t.name,t)})}Object.defineProperty(t,"__esModule",{value:!0});var i=(s(44),s(45)),n=s.n(i),r=s(49),l=(s(52),s(53)),c=s.n(l),o=s(79),u=s.n(o),d=s(40),h=[c.a,u.a],v={install:a,AreaSelect:c.a,AreaCascader:u.a},f=v;"undefined"!=typeof window&&window.Vue&&a(window.Vue);var p=s(112),_=s.n(p);n.a.prototype.$pca=r.pca,n.a.prototype.$pcaa=r.pcaa,n.a.use(f);n.a.config.devtools=!1,n.a.config.productionTip=!1,new n.a({el:"#app",render:function(e){return e(_.a)}})},function(e,t){},,,,,,,,function(e,t){},function(e,t,s){function a(e){s(54)}var i=s(0),n=s(57),r=s(78),l=a,c=i(n,r,!1,l,null,null);e.exports=c.exports},function(e,t,s){var a=s(55);"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);s(5)("3bccc8cc",a,!0,{})},function(e,t,s){t=e.exports=s(4)(!1),t.push([e.i,".area-select-wrap .area-select{margin-left:10px}.area-select-wrap .area-select-empty{padding:4px 0;margin:0;text-align:center;color:#999;font-size:14px}",""])},,function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(24),i=s.n(a),n=s(33),r=s.n(n),l=s(35),c=s.n(l),o=s(36),u=s.n(o),d=s(37),h=s.n(d),v=s(38),f=s.n(v),p=s(9);t.default={name:"area-select",components:{"v-select":h.a,"v-option":f.a},props:{value:{type:Array,required:!0},type:{type:String,default:"code",validator:function(e){return["all","code","text"].indexOf(e)>-1}},placeholders:{type:Array,default:function(){return[]}},level:{type:Number,default:1,validator:function(e){return[0,1,2].indexOf(e)>-1}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].indexOf(e)>-1}},disabled:{type:Boolean,default:!1},data:{type:Object,required:!0}},data:function(){if(!this.data||!this.data[86])throw new Error("[vue-area-linkage]: 需要提供地区数据,格式参考见:https://github.com/dwqs/area-data");return{provinces:this.data[86],citys:{},areas:{},curProvince:"",curProvinceCode:"",curCity:"",curCityCode:"",curArea:"",curAreaCode:"",defaults:[],isCode:!1,isSetDefault:!1}},watch:{curProvinceCode:function(e,t){this.curProvince=this.provinces[e],this.provinceChange(e)},curCityCode:function(e,t){this.curCity=this.citys[e],this.cityChange(e)},curAreaCode:function(e,t){this.curArea=this.areas[e],this.areaChange(e)},value:function(e){!this.isSetDefault&&Object(p.c)(e)&&e.length===this.level+1&&(this.beforeSetDefault(),this.setDefaultValue()),!this.isSetDefault&&Object(p.c)(e)&&e.length&&e.length!==this.level+1&&Object(p.a)(!1,"设置的默认值和 level 值不匹配")}},methods:{provinceChange:function(e){var t=this;if(0===this.level)this.selectChange();else if(this.level>=1){if(this.citys=this.data[e],!this.citys)return this.citys=c()({},this.curProvinceCode,this.curProvince),this.curCity=this.curProvince,void(this.curCityCode=this.curCityCode);var s=r()(this.citys)[0],a=i()(this.citys)[0];this.defaults[1]&&(this.isCode?(a=u()(i()(this.citys),function(e){return e===t.defaults[1]}),Object(p.a)(a,"城市 "+this.defaults[1]+" 不存在于省份 "+this.defaults[0]+" 中"),s=this.citys[a]):(s=u()(this.citys,function(e){return e===t.defaults[1]}),Object(p.a)(s,"城市 "+this.defaults[1]+" 不存在于省份 "+this.defaults[0]+" 中"),a=u()(i()(this.citys),function(e){return t.citys[e]===t.defaults[1]}))),this.curCity=s,this.curCityCode=a}},cityChange:function(e){var t=this;if(1===this.level)this.selectChange();else if(2===this.level){if(this.areas=this.data[e],!this.areas)return this.areas=c()({},this.curCityCode,this.curCity),this.curArea=this.curCity,void(this.curAreaCode=this.curCityCode);var s=r()(this.areas)[0],a=i()(this.areas)[0];this.defaults[2]&&(this.isCode?(a=u()(i()(this.areas),function(e){return e===t.defaults[2]}),Object(p.a)(a,"县区 "+this.defaults[2]+" 不存在于城市 "+this.defaults[1]+" 中"),s=this.areas[a]):(s=u()(this.areas,function(e){return e===t.defaults[2]}),Object(p.a)(s,"县区 "+this.defaults[2]+" 不存在于城市 "+this.defaults[1]+" 中"),a=u()(i()(this.areas),function(e){return t.areas[e]===t.defaults[2]}))),this.curArea=s,this.curAreaCode=a}},areaChange:function(e){this.curAreaCode=e,this.selectChange()},getAreaCode:function(){var e=[];switch(this.level){case 0:e=[this.curProvinceCode];break;case 1:e=[this.curProvinceCode,this.curCityCode];break;case 2:e=[this.curProvinceCode,"710000"===this.curProvinceCode?this.curProvinceCode:this.curCityCode,this.curAreaCode]}return e},getAreaText:function(){var e=[];switch(this.level){case 0:e=[this.curProvince];break;case 1:e=[this.curProvince,"710000"===this.curProvinceCode?this.curProvince:this.curCity];break;case 2:e=[this.curProvince,"710000"===this.curProvinceCode?this.curProvince:this.curCity,this.curArea]}return e},getAreaCodeAndText:function(e){var t=[];switch(this.level){case 0:t=[c()({},this.curProvinceCode,this.curProvince)];break;case 1:t=[c()({},this.curProvinceCode,this.curProvince),c()({},this.curCityCode,this.curCity)];break;case 2:var s="710000"===this.curProvinceCode?this.curProvinceCode:this.curCityCode,a="710000"===this.curProvinceCode?this.curProvince:this.curCity;t=[c()({},this.curProvinceCode,this.curProvince),c()({},s,a),c()({},this.curAreaCode,this.curArea)]}return t},beforeSetDefault:function(){var e=/^[\u4E00-\u9FA5\uF900-\uFA2D]{2,}$/,t=/^\d{6,}$/,s=t.test(this.value[0]),a=void 0;a=s?this.value.every(function(e){return t.test(e)}):this.value.every(function(t){return e.test(t)}),Object(p.a)(a,"传入的默认值参数有误"),this.defaults=[].concat(this.value),this.isCode=s,this.isSetDefault=!0},setDefaultValue:function(){var e=this,t="";if(this.isCode)t=this.defaults[0];else{var s=u()(this.provinces,function(t){return t===e.defaults[0]});Object(p.a)(s,"省份 "+this.defaults[0]+" 不存在"),t=u()(i()(this.provinces),function(t){return e.provinces[t]===e.defaults[0]})}this.curProvinceCode=t,this.$nextTick(function(){e.defaults=[]})},selectChange:function(){this.isSetDefault=!0;var e=[];"code"===this.type?e=this.getAreaCode():"text"===this.type?e=this.getAreaText():"all"===this.type&&(e=this.getAreaCodeAndText()),this.$emit("input",e),this.$emit("change",e)}},created:function(){Object(p.c)(this.value)&&this.value.length===this.level+1&&(this.beforeSetDefault(),this.setDefaultValue()),Object(p.c)(this.value)&&this.value.length&&this.value.length!==this.level+1&&Object(p.a)(!1,"设置的默认值和 level 值不匹配")}}},,,,,,,,,,,,,,,,,function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(9);t.default={provide:function(){return{select:this}},props:{value:{type:[String,Number,Boolean]},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:"请选择"},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].indexOf(e)>-1}}},data:function(){return{shown:!1,options:[],label:"",val:"",areaRect:null,top:32}},watch:{value:function(e){this.setDef()},options:function(e){this.setDef()}},methods:{setDef:function(){var e=this;if(this.value){var t=this.options.filter(function(t){return t.value===e.value});this.label=t[0]?t[0].label:"",this.val=t[0]?t[0].value:""}else this.label="",this.val=""},handleTriggerClick:function(){this.disabled||(this.shown=!this.shown)},setPosition:function(){var e=parseInt(window.getComputedStyle(this.$refs.wrap,null).getPropertyValue("height"));this.top=Object(a.e)(e,this.areaRect)},handleDocClick:function(e){var t=e.target;!Object(a.b)(this.$el,t)&&this.shown&&(this.shown=!1)},handleDocResize:function(){var e=this;this.areaRect=this.$refs.area.getBoundingClientRect(),this.$nextTick(function(){e.setPosition()})},setSelectedValue:function(e){this.label=e.label,this.val=e.value,this.$emit("input",e.value),this.shown=!1,this.$emit("change",e.value)},scrollToSelectedOption:function(){var e=this;this.setPosition();var t=this.options.filter(function(t){return t.value===e.val});if(t.length){var s=t[0].$el,i=this.$el.querySelector(".area-selectable-list-wrap");Object(a.d)(i,s)}},handleListEnter:function(){var e=this;this.$nextTick(function(){return e.scrollToSelectedOption()})}},mounted:function(){var e=this;this.areaRect=this.$refs.area.getBoundingClientRect(),this.top=this.areaRect.height,window.document.addEventListener("scroll",this.handleDocResize,!1),window.addEventListener("resize",this.handleDocResize,!1),window.document.addEventListener("click",this.handleDocClick,!1),this.$nextTick(function(){e.setDef()})},beforeDestroy:function(){window.document.removeEventListener("scroll",this.handleDocResize,!1),window.removeEventListener("resize",this.handleDocResize,!1),window.document.removeEventListener("click",this.handleDocClick,!1)}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{ref:"area",staticClass:"area-select",class:{medium:"medium"===e.size,small:"small"===e.size,large:"large"===e.size,"is-disabled":e.disabled}},[s("span",{ref:"trigger",staticClass:"area-selected-trigger",on:{click:e.handleTriggerClick}},[e._v(e._s(e.label?e.label:e.placeholder))]),e._v(" "),s("i",{class:["area-select-icon",{active:e.shown}],on:{click:function(t){t.stopPropagation(),e.handleTriggerClick(t)}}}),e._v(" "),s("transition",{attrs:{name:"area-zoom-in-top"},on:{"before-enter":e.handleListEnter}},[s("div",{directives:[{name:"show",rawName:"v-show",value:e.shown,expression:"shown"}],ref:"wrap",staticClass:"area-selectable-list-wrap",style:{top:e.top+"px"}},[s("ul",{staticClass:"area-selectable-list"},[e._t("default")],2)])])],1)},a=[];e.exports={render:s,staticRenderFns:a}},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={inject:["select"],props:{value:{type:[String,Number,Boolean],required:!0},label:[String,Number]},data:function(){return{hover:!1,isSelected:!1}},computed:{curSelected:function(){return this.select.val}},methods:{leaveItem:function(){this.hover=!1},hoverItem:function(){this.hover=!0},selectOptionClick:function(){this.select.setSelectedValue(this)}},created:function(){this.select.options.push(this)}}},function(e,t){var s=function(){var e=this,t=e.$createElement;return(e._self._c||t)("li",{class:["area-select-option",{hover:e.hover,selected:e.curSelected===e.value}],attrs:{value:e.value},on:{click:function(t){t.stopPropagation(),e.selectOptionClick(t)},mouseleave:e.leaveItem,mouseenter:e.hoverItem}},[e._v("\n "+e._s(e.label)+"\n")])},a=[];e.exports={render:s,staticRenderFns:a}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"area-select-wrap"},[s("v-select",{attrs:{placeholder:e.placeholders[0]?e.placeholders[0]:"请选择",size:e.size,disabled:e.disabled},model:{value:e.curProvinceCode,callback:function(t){e.curProvinceCode=t},expression:"curProvinceCode"}},e._l(e.provinces,function(e,t){return s("v-option",{key:t,attrs:{label:e,value:t}})})),e._v(" "),e.level>=1?s("v-select",{attrs:{placeholder:e.placeholders[1]?e.placeholders[1]:"请选择",size:e.size,disabled:e.disabled},model:{value:e.curCityCode,callback:function(t){e.curCityCode=t},expression:"curCityCode"}},[Object.keys(e.citys).length?e._l(e.citys,function(e,t){return s("v-option",{key:t,attrs:{label:e,value:t}})}):s("p",{staticClass:"area-select-empty"},[e._v("暂无数据")])],2):e._e(),e._v(" "),e.level>=2?s("v-select",{attrs:{placeholder:e.placeholders[2]?e.placeholders[2]:"请选择",size:e.size,disabled:e.disabled},model:{value:e.curAreaCode,callback:function(t){e.curAreaCode=t},expression:"curAreaCode"}},[Object.keys(e.areas).length?e._l(e.areas,function(e,t){return s("v-option",{key:t,attrs:{label:e,value:t}})}):s("p",{staticClass:"area-select-empty"},[e._v("暂无数据")])],2):e._e()],1)},a=[];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(80),n=s(111),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(24),i=s.n(a),n=s(33),r=s.n(n),l=s(35),c=s.n(l),o=s(36),u=s.n(o),d=s(39),h=s.n(d),v=s(9);t.default={name:"area-cascader",components:{"v-cascader":h.a},props:{value:{required:!0},placeholder:{type:String,default:"请选择"},type:{type:String,default:"code",validator:function(e){return["all","code","text"].indexOf(e)>-1}},level:{type:Number,default:0,validator:function(e){return[0,1].indexOf(e)>-1}},size:{type:String,default:"large",validator:function(e){return["small","medium","large"].indexOf(e)>-1}},separator:{type:String,default:"/"},disabled:{type:Boolean,default:!1},data:{type:Object,required:!0}},data:function(){if(!this.data||!this.data[86])throw new Error("[vue-area-linkage]: 需要提供地区数据:https://github.com/dwqs/area-data");return{provinces:this.data[86],citys:{},areas:{},options:[],curProvince:"",curProvinceCode:"",curCity:"",curCityCode:"",curArea:"",curAreaCode:"",defaultsAreaCodes:[],defaults:[],isCode:!1,isSetDefault:!1}},watch:{value:function(e){!this.isSetDefault&&Object(v.c)(e)&&e.length===this.level+2&&(this.beforeSetDefault(),this.setDefaultValue()),!this.isSetDefault&&Object(v.c)(e)&&e.length&&e.length!==this.level+2&&Object(v.a)(!1,"设置的默认值和 level 值不匹配")},curProvinceCode:function(e){var t=this;if(this.curProvince=this.provinces[e],this.citys=this.data[e],!this.citys)return this.citys=c()({},this.curProvinceCode,this.curProvince),this.curCity=this.curProvince,void(this.curCityCode=this.curCityCode);var s=r()(this.citys)[0],a=i()(this.citys)[0];this.defaults[1]&&(this.isCode?(a=u()(i()(this.citys),function(e){return e===t.defaults[1]}),Object(v.a)(a,"城市 "+this.defaults[1]+" 不存在于省份 "+this.defaults[0]+" 中"),s=this.citys[a]):(s=u()(this.citys,function(e){return e===t.defaults[1]}),Object(v.a)(s,"城市 "+this.defaults[1]+" 不存在于省份 "+this.defaults[0]+" 中"),a=u()(i()(this.citys),function(e){return t.citys[e]===t.defaults[1]}))),this.curCity=s,this.curCityCode=a},curCityCode:function(e){var t=this;if(this.curCity=this.citys[e],0===this.level)this.setDefaultsCodes();else if(1===this.level){if(this.areas=this.data[e],!this.areas)return this.areas=c()({},this.curCityCode,this.curCity),this.curArea=this.curCity,void(this.curAreaCode=this.curCityCode);var s=r()(this.areas)[0],a=i()(this.areas)[0];this.defaults[2]&&(this.isCode?(a=u()(i()(this.areas),function(e){return e===t.defaults[2]}),Object(v.a)(a,"县区 "+this.defaults[2]+" 不存在于城市 "+this.defaults[1]+" 中"),s=this.areas[a]):(s=u()(this.areas,function(e){return e===t.defaults[2]}),Object(v.a)(s,"县区 "+this.defaults[2]+" 不存在于城市 "+this.defaults[1]+" 中"),a=u()(i()(this.areas),function(e){return t.areas[e]===t.defaults[2]}))),this.curArea=s,this.curAreaCode=a}},curAreaCode:function(e){this.curArea=this.areas[e],this.curAreaCode=e,this.setDefaultsCodes()}},methods:{beforeSetDefault:function(){var e=/^[\u4E00-\u9FA5\uF900-\uFA2D]{2,}$/,t=/^\d{6,}$/,s=t.test(this.value[0]),a=void 0;a=s?this.value.every(function(e){return t.test(e)}):this.value.every(function(t){return e.test(t)}),Object(v.a)(a,"传入的默认值参数有误"),this.defaults=[].concat(this.value),this.isCode=s},setDefaultValue:function(){var e=this,t="";if(this.isCode)t=this.defaults[0];else{var s=u()(this.provinces,function(t){return t===e.defaults[0]});Object(v.a)(s,"省份 "+this.defaults[0]+" 不存在"),t=u()(i()(this.provinces),function(t){return e.provinces[t]===e.defaults[0]})}this.curProvinceCode=t,this.$nextTick(function(){e.defaults=[]})},handleChange:function(e,t){var s=[];this.isSetDefault,this.isSetDefault=!0,t[0]===t[1]&&(e[1]=e[0]),"code"===this.type?s=[].concat(e):"text"===this.type?s=[].concat(t):"all"===this.type&&(s=e.map(function(e,s){return c()({},e,t[s])})),this.$emit("input",s),this.$emit("change",s)},iterate:function(e,t){var s=[];for(var a in e)s.push({label:e[a],value:a,panelIndex:t});return s},iterateCities:function(){for(var e=[],t=this.iterate(this.data[86],0),s=0,a=t.length;s-1}},separator:{type:String,default:"/"}},components:{caspanel:l.a},data:function(){return{areaRect:null,top:32,shown:!1,eventBus:null,activeValues:[],values:[],labels:[],label:"",isClickOutSide:!1}},watch:{defaultsAreaCodes:function(e){e.length&&this.initValue()}},methods:{initValue:function(){this.broadcast("Caspanel","update-selected",{value:this.defaultsAreaCodes}),this.values=[].concat(this.defaultsAreaCodes)},getActiveLabels:function(e){var t=this.data[86],s=this.data[e[0]],a=e.length;if(a<2)return[];var i=[];if(2===a)i=[t[e[0]],s[e[1]]];else if(3===a){var n=this.data[e[1]];i=[t[e[0]],s[e[1]],n?n[e[2]]:s[e[2]]]}return i},resetActiveVal:function(){this.activeValues=[].concat(this.values),this.labels=this.getActiveLabels(this.values),!this.shown&&this.values.length&&this.broadcast("Caspanel","update-selected",{value:this.values})},handleTriggerClick:function(){if(!this.disabled){this.$emit("set-default");var e=this.shown;this.shown=!this.shown,e?(this.isClickOutSide=!0,this.resetActiveVal()):this.isClickOutSide=!1}},setPosition:function(){var e=parseInt(window.getComputedStyle(this.$refs.wrap,null).getPropertyValue("height"));this.top=Object(i.e)(e,this.areaRect)},handleDocClick:function(e){var t=e.target;!Object(i.b)(this.$el,t)&&this.shown&&(this.shown=!1,this.isClickOutSide=!0,this.resetActiveVal())},handleDocResize:function(){var e=this;this.areaRect=this.$refs.area.getBoundingClientRect(),this.$nextTick(function(){e.setPosition()})},handleMenuItemClick:function(e,t){var s=e.label,a=e.value,i=(e.children,e.panelIndex),n=this.activeValues,r=this.labels;n=n.slice(0,i+1),n[i]=a,r=r.slice(0,i+1),r[i]=s,this.activeValues=[].concat(n),this.labels=[].concat(r)},handleSelectedChange:function(){this.shown=!1,this.values=[].concat(this.activeValues),this.label=this.labels.join(this.separator),this.isClickOutSide||this.$emit("change",this.values,this.labels)},handleListEnter:function(){var e=this;this.$nextTick(function(){e.setPosition(),e.eventBus.$emit("set-scroll-top")})}},created:function(){if(!a.a._Vue)throw new Error("[area-cascader]: Must be call Vue.use(VueAreaLinkage) before used");this.eventBus=a.a.createEventBus(),this.eventBus.$on("selected",this.handleSelectedChange)},mounted:function(){this.areaRect=this.$refs.area.getBoundingClientRect(),this.top=this.areaRect.height,window.document.addEventListener("scroll",this.handleDocResize,!1),window.addEventListener("resize",this.handleDocResize,!1),window.document.addEventListener("click",this.handleDocClick,!1),this.defaultsAreaCodes&&this.defaultsAreaCodes.length&&this.initValue()},beforeDestroy:function(){window.document.removeEventListener("scroll",this.handleDocResize,!1),window.removeEventListener("resize",this.handleDocResize,!1),window.document.removeEventListener("click",this.handleDocClick,!1)}}},function(e,t,s){var a=s(0),i=s(83),n=s(109),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(84),i=s.n(a),n=s(104),r=s.n(n),l=s(9),c=s(41),o=0;t.default={name:"Caspanel",inject:["cascader"],mixins:[c.a],props:{data:{type:Array,default:function(){return[]}}},data:function(){return{sublist:[],val:"",list:null}},watch:{data:function(){this.sublist=[]}},methods:{getUniqueKey:function(){return o++},getBaseItem:function(e){var t=r()({},e);return t.children&&delete t.children,t},handleClickItem:function(e){this.cascader.handleMenuItemClick(e),e.children?this.sublist=[].concat(e.children):(this.sublist=[],this.cascader.eventBus.$emit("selected"))},triggerItem:function(e,t){this.getBaseItem(e);this.cascader.handleMenuItemClick(e),e.children?this.sublist=[].concat(e.children):(this.sublist=[],this.cascader.eventBus.$emit("selected"))},initCaspanel:function(e){for(var t=this,s=e.value,a=[].concat(i()(s)),n=0;na{position:fixed;right:0;top:0}header p a{color:#008efd}",""])},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("header",[s("a",{staticClass:"github-corner",attrs:{href:"https://github.com/dwqs/vue-area-linkage","aria-label":"View source on Github"}},[s("svg",{staticStyle:{fill:"#ABD3B4",color:"#fff",position:"absolute",top:"0",border:"0",right:"0"},attrs:{width:"80",height:"80",viewBox:"0 0 250 250","aria-hidden":"true"}},[s("path",{attrs:{d:"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"}}),s("path",{staticClass:"octo-arm",staticStyle:{"transform-origin":"130px 106px"},attrs:{d:"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2",fill:"currentColor"}}),s("path",{staticClass:"octo-body",attrs:{d:"M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z",fill:"currentColor"}})])]),e._v(" "),s("h2",[e._v("Vue Area Linkage: 中国行政区联动选择器")]),e._v(" "),s("p",[e._v("\n 省、市、区联动选择\n ")])])},a=[];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(121),n=s(167),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(122),i=(s.n(a),s(123)),n=s.n(i),r=s(126),l=s.n(r),c=s(131),o=s.n(c),u=s(134),d=s.n(u),h=s(137),v=s.n(h),f=s(140),p=s.n(f),_=s(143),C=s.n(_),m=s(146),g=s.n(m),b=s(149),w=s.n(b),y=s(152),x=s.n(y),k=s(155),$=s.n(k),P=s(158),O=s.n(P),S=s(161),A=s.n(S),j=s(164),E=s.n(j);t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}},components:{Basic:n.a,Returns:o.a,Province:d.a,"v-area":v.a,AreaCode:p.a,Placeholders:C.a,DefaultValue:g.a,CasBasic:w.a,CasReturns:x.a,CasAreaCode:$.a,CasPlaceholder:O.a,CasArea:E.a,Size:l.a,CasDefaultVal:A.a}}},function(e,t){},function(e,t,s){var a=s(0),i=s(124),n=s(125),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-select",{attrs:{data:e.$pca},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//返回值是一个数组,分别是省市的行政区域代码")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-select v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){function a(e){s(127)}var i=s(0),n=s(129),r=s(130),l=a,c=i(n,r,!1,l,"data-v-4b1e58a8",null);e.exports=c.exports},function(e,t,s){var a=s(128);"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);s(5)("06ae20ea",a,!0,{})},function(e,t,s){t=e.exports=s(4)(!1),t.push([e.i,"",""])},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area size-example"},[s("div",{staticClass:"area-left"},[s("area-select",{attrs:{size:"large",data:e.$pca},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t ;return s("pre",[s("code",[s("span",[e._v("//size:['small','medium','large'], 默认值是 medium")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-select v-model='selected' size=\"large\">"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(132),n=s(133),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-select",{attrs:{type:"text",data:e.$pca},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//返回值是一个数组,分别是省市的行政区域文本")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-select type='text' v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(135),n=s(136),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-select",{attrs:{level:0,data:e.$pca},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//返回值是一个数组,分别是省份行政区域代码")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-select :level='0' v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(138),n=s(139),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-select",{attrs:{level:2,data:e.$pcaa},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//返回值是一个数组,分别是省份行政区域文本")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-select :level='2' type='text' v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(141),n=s(142),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-select",{attrs:{type:"all",data:e.$pca},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//返回值是一个数组,数组项是包含省市的行政区域代码和文本的对象")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-select type='all' v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(144),n=s(145),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-select",{attrs:{placeholders:["选择省","选择市"],data:e.$pca},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//设置 placeholders,其值应该和关联层次对应")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-select :placeholders=['选择省', '选择市'] v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(147),n=s(148),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:["440000","440300","440305"],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-select",{attrs:{level:2,data:e.$pcaa},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//绑定默认值selected=['440000','440300','440305'],代码对应的区域文本是['广东省', '深圳市', '南山区']")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-select :level=\"2\" v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(150),n=s(151),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-cascader",{attrs:{data:e.$pca},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//返回值是一个数组,分别是省市的行政区域代码")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-cascader v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(153),n=s(154),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-cascader",{attrs:{type:"text",data:e.$pca},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//返回值是一个数组,分别是省市的行政区域文本")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-cascader type='text' v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(156),n=s(157),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-cascader",{attrs:{type:"all",data:e.$pca},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//返回值是一个数组,数组项是包含行政区域代码和文本的对象")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-cascader type='all' v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(159),n=s(160),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-cascader",{attrs:{placeholder:"请选择地区",data:e.$pca},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//返回值是一个数组,分别是省市的行政区域代码")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-cascader placeholder=\"请选择地区\" v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(162),n=s(163),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:["440000","440300","440305"],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-cascader",{attrs:{level:1,data:e.$pcaa},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//绑定默认值selected=['440000','440300','440305'],代码对应的区域文本是['广东省', '深圳市', '南山区']")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v("area-cascader :level=\"1\" v-model='selected'>"),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(165),n=s(166),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{selected:[],shown:!1}},methods:{toggle:function(){this.shown=!this.shown}}}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"code-area"},[s("div",{staticClass:"area-left"},[s("area-cascader",{attrs:{level:1,type:"text",placeholder:"请选择地区",data:e.$pcaa},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),s("div",{staticClass:"area-right"},[s("pre",[s("code",[e._v(e._s(e.selected))])])]),e._v(" "),e.shown?s("div",{ref:"original",staticClass:"original-code"},[e._m(0)]):e._e(),e._v(" "),s("div",{staticClass:"show-code",on:{click:e.toggle}},[e._v("\n "+e._s(this.shown?"Hide Code":"Show Code")+"\n ")])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",[s("code",[s("span",[e._v("//返回值是一个数组,数组项是行政区域文本")]),s("br"),s("span",[e._v("<")]),e._v("template"),s("span",[e._v(">")]),s("br"),e._v("    "),s("span",[e._v("<")]),e._v('area-cascader :level="1" type="text" placeholder="请选择地区" v-model=\'selected\'>'),s("br"),e._v("<"),e._v("/template"),s("span",[e._v(">")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"app-main"},[s("h3",[e._v("基本使用")]),e._v(" "),s("h4",[e._v("1. 作为选择器")]),e._v(" "),s("h5",[e._v("默认形式")]),e._v(" "),s("basic"),e._v(" "),s("h5",[e._v("改变大小")]),e._v(" "),s("size"),e._v(" "),s("h5",[e._v("返回区域文本")]),e._v(" "),s("returns"),e._v(" "),s("h5",[e._v("返回区域代码和文本")]),e._v(" "),s("area-code"),e._v(" "),s("h5",[e._v("设置 placeholders")]),e._v(" "),s("placeholders"),e._v(" "),e._m(0),e._v(" "),s("h5",[e._v("设置默认值")]),e._v(" "),s("default-value"),e._v(" "),e._m(1),e._v(" "),s("h5",[e._v("只选省份")]),e._v(" "),s("province"),e._v(" "),s("h5",[e._v("省市区联动")]),e._v(" "),s("v-area"),e._v(" "),s("h4",[e._v("2. 作为级联器(只支持2/3级联动)")]),e._v(" "),s("h5",[e._v("默认形式")]),e._v(" "),s("cas-basic"),e._v(" "),s("h5",[e._v("返回区域文本")]),e._v(" "),s("cas-returns"),e._v(" "),s("h5",[e._v("返回区域文本和代码")]),e._v(" "),s("cas-area-code"),e._v(" "),s("h5",[e._v("设置 placeholder")]),e._v(" "),s("cas-placeholder"),e._v(" "),s("h5",[e._v("设置默认值")]),e._v(" "),s("cas-default-val"),e._v(" "),s("h5",[e._v("省市区联动")]),e._v(" "),s("cas-area")],1)},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("p",{staticClass:"desc"},[s("code",[e._v("placeholders")]),e._v(" 是一个数组, 数组项顺序分别对应省/市/区.\n ")])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("p",{staticClass:"desc"},[s("code",[e._v("selected")]),e._v(" 是一个数组, 数组项顺序分别对应省/市/区, 且类型(区域代码/区域文本)必须统一. 以第一个元素类型为基准. 类型不统一将报错.\n ")])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){var a=s(0),i=s(169),n=s(171),r=a(i,n,!1,null,null,null);e.exports=r.exports},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(170);s.n(a);t.default={}},function(e,t){},function(e,t){var s=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"start"},[s("h3",[e._v("快速开始")]),e._v(" "),s("div",{staticClass:"install"},[s("h4",[e._v("安装")]),e._v(" "),s("pre",[e._v("npm i --save vue-area-linkage")]),e._v(" "),s("p",[e._v("或者")]),e._v(" "),s("pre",[e._v("yarn add vue-area-linkage")])]),e._v(" "),s("div",{staticClass:"register"},[s("h4",[e._v("全局注册")]),e._v(" "),s("pre",[e._v("import Vue from 'vue';"),s("br"),s("br"),e._v("import 'vue-area-linkage/dist/index.css'; // v2 or higher"),s("br"),s("br"),e._v("import VueAreaLinkage from 'vue-area-linkage';"),s("br"),s("br"),e._v("Vue.use(VueAreaLinkage);"),s("br")])]),e._v(" "),s("br")])}];e.exports={render:s,staticRenderFns:a}},function(e,t,s){function a(e){s(173)}var i=s(0),n=s(175),r=a,l=i(null,n,!1,r,null,null);e.exports=l.exports},function(e,t,s){var a=s(174);"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);s(5)("b269eb6c",a,!0,{})},function(e,t,s){t=e.exports=s(4)(!1),t.push([e.i,"footer{margin-top:30px;text-align:center;color:#999}footer p{margin-top:15px;cursor:pointer}footer p:hover{color:#008efd}",""])},function(e,t){var s=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("footer",[s("p",[e._v("React 版本:"),s("a",{attrs:{target:"_blank",href:"https://github.com/dwqs/react-area-linkage"}},[e._v("React Area Linkage")])]),e._v(" "),s("p",[e._v("最新数据来源:"),s("a",{attrs:{href:"https://github.com/dwqs/area-data",target:"_blank"}},[e._v("省/市/区数据")])]),e._v(" "),s("p",[e._v("官方数据:"),s("a",{attrs:{href:"http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2016/index.html",target:"_blank"}},[e._v("国家统计局-城乡划分")])])])}];e.exports={render:s,staticRenderFns:a}},function(e,t){var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"app-wrap",attrs:{id:"app"}},[s("v-header"),e._v(" "),s("v-start"),e._v(" "),s("v-main"),e._v(" "),s("v-footer")],1)},a=[];e.exports={render:s,staticRenderFns:a}}],[43]); ================================================ FILE: demo/vendor.8d61534d.js ================================================ !function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(r,i,a){for(var s,u,c,l=0,f=[];ln.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],o=0;o0?r:n)(e)}},function(e,t,n){var r=n(28)("keys"),o=n(29);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t,n){e.exports={default:n(58),__esModule:!0}},function(e,t,n){var r=n(26);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(19),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(6),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(64);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(21),o=n(6).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){e.exports={default:n(67),__esModule:!0}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";t.__esModule=!0;var r=n(70),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e,t,n){return t in e?(0,o.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){(function(e,n){function r(e,t){for(var n=-1,r=e?e.length:0;++n-1}function x(e,t){var n=this.__data__,r=R(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}function $(e){var t=-1,n=e?e.length:0;for(this.clear();++tu))return!1;var l=a.get(e);if(l&&a.get(t))return l==t;var f=-1,p=!0,d=i&Ue?new T:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=Ve}function ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ae(e){return!!e&&"object"==typeof e}function Oe(e){return"symbol"==typeof e||Ae(e)&&Dt.call(e)==it}function je(e){if(!e)return 0===e?e:0;if((e=Se(e))===He||e===-He){return(e<0?-1:1)*ze}return e===e?e:0}function Te(e){var t=je(e),n=t%1;return t===t?n?t-n:t:0}function Se(e){if("number"==typeof e)return e;if(Oe(e))return Je;if(ke(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ke(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(dt,"");var n=mt.test(e);return n||gt.test(e)?wt(e.slice(2),n?2:8):ht.test(e)?Je:+e}function Ee(e){return null==e?"":Q(e)}function Me(e,t,n){var r=null==e?void 0:U(e,t);return void 0===r?n:r}function Ie(e,t){return null!=e&&se(e,t,H)}function Ne(e){return we(e)?D(e):G(e)}function Pe(e){return e}function Le(e){return ce(e)?i(he(e)):Z(e)}var Fe=200,De="Expected a function",Re="__lodash_hash_undefined__",Ue=1,Be=2,He=1/0,Ve=9007199254740991,ze=1.7976931348623157e308,Je=NaN,qe="[object Arguments]",We="[object Array]",Ke="[object Boolean]",Ge="[object Date]",Xe="[object Error]",Ye="[object Function]",Ze="[object GeneratorFunction]",Qe="[object Map]",et="[object Number]",tt="[object Object]",nt="[object RegExp]",rt="[object Set]",ot="[object String]",it="[object Symbol]",at="[object ArrayBuffer]",st="[object DataView]",ut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ct=/^\w*$/,lt=/^\./,ft=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pt=/[\\^$.*+?()[\]{}|]/g,dt=/^\s+|\s+$/g,vt=/\\(\\)?/g,ht=/^[-+]0x[0-9a-f]+$/i,mt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,_t=/^(?:0|[1-9]\d*)$/,bt={};bt["[object Float32Array]"]=bt["[object Float64Array]"]=bt["[object Int8Array]"]=bt["[object Int16Array]"]=bt["[object Int32Array]"]=bt["[object Uint8Array]"]=bt["[object Uint8ClampedArray]"]=bt["[object Uint16Array]"]=bt["[object Uint32Array]"]=!0,bt[qe]=bt[We]=bt[at]=bt[Ke]=bt[st]=bt[Ge]=bt[Xe]=bt[Ye]=bt[Qe]=bt[et]=bt[tt]=bt[nt]=bt[rt]=bt[ot]=bt["[object WeakMap]"]=!1;var wt=parseInt,xt="object"==typeof e&&e&&e.Object===Object&&e,$t="object"==typeof self&&self&&self.Object===Object&&self,Ct=xt||$t||Function("return this")(),kt="object"==typeof t&&t&&!t.nodeType&&t,At=kt&&"object"==typeof n&&n&&!n.nodeType&&n,Ot=At&&At.exports===kt,jt=Ot&&xt.process,Tt=function(){try{return jt&&jt.binding("util")}catch(e){}}(),St=Tt&&Tt.isTypedArray,Et=Array.prototype,Mt=Function.prototype,It=Object.prototype,Nt=Ct["__core-js_shared__"],Pt=function(){var e=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Lt=Mt.toString,Ft=It.hasOwnProperty,Dt=It.toString,Rt=RegExp("^"+Lt.call(Ft).replace(pt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=Ct.Symbol,Bt=Ct.Uint8Array,Ht=It.propertyIsEnumerable,Vt=Et.splice,zt=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Jt=Math.max,qt=ae(Ct,"DataView"),Wt=ae(Ct,"Map"),Kt=ae(Ct,"Promise"),Gt=ae(Ct,"Set"),Xt=ae(Ct,"WeakMap"),Yt=ae(Object,"create"),Zt=me(qt),Qt=me(Wt),en=me(Kt),tn=me(Gt),nn=me(Xt),rn=Ut?Ut.prototype:void 0,on=rn?rn.valueOf:void 0,an=rn?rn.toString:void 0;f.prototype.clear=p,f.prototype.delete=d,f.prototype.get=v,f.prototype.has=h,f.prototype.set=m,y.prototype.clear=g,y.prototype.delete=_,y.prototype.get=b,y.prototype.has=w,y.prototype.set=x,$.prototype.clear=C,$.prototype.delete=k,$.prototype.get=A,$.prototype.has=O,$.prototype.set=j,T.prototype.add=T.prototype.push=S,T.prototype.has=E,M.prototype.clear=I,M.prototype.delete=N,M.prototype.get=P,M.prototype.has=L,M.prototype.set=F;var sn=B;(qt&&sn(new qt(new ArrayBuffer(1)))!=st||Wt&&sn(new Wt)!=Qe||Kt&&"[object Promise]"!=sn(Kt.resolve())||Gt&&sn(new Gt)!=rt||Xt&&"[object WeakMap]"!=sn(new Xt))&&(sn=function(e){var t=Dt.call(e),n=t==tt?e.constructor:void 0,r=n?me(n):void 0;if(r)switch(r){case Zt:return st;case Qt:return Qe;case en:return"[object Promise]";case tn:return rt;case nn:return"[object WeakMap]"}return t});var un=ge(function(e){e=Ee(e);var t=[];return lt.test(e)&&t.push(""),e.replace(ft,function(e,n,r,o){t.push(r?o.replace(vt,"$1"):n||e)}),t}),cn=function(e){return function(t,n,r){var o=Object(t);if(!we(t)){var i=K(n,3);t=Ne(t),n=function(e){return i(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[i?t[a]:a]:void 0}}(ye);ge.Cache=$;var ln=Array.isArray,fn=St?function(e){return function(t){return e(t)}}(St):W;n.exports=cn}).call(t,n(10),n(73)(e))},,,,,,function(e,t,n){var r=n(7).f,o=n(13),i=n(2)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},,,function(e,t,n){(function(t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){return void 0===e||null===e}function r(e){return void 0!==e&&null!==e}function o(e){return!0===e}function i(e){return!1===e}function a(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function s(e){return null!==e&&"object"==typeof e}function u(e){return mi.call(e).slice(8,-1)}function c(e){return"[object Object]"===mi.call(e)}function l(e){return"[object RegExp]"===mi.call(e)}function f(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function d(e){var t=parseFloat(e);return isNaN(t)?e:t}function v(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o-1)return e.splice(n,1)}}function m(e,t){return _i.call(e,t)}function y(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function g(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function _(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function b(e,t){for(var n in t)e[n]=t[n];return e}function w(e){for(var t={},n=0;n0&&(s=xe(s,(n||"")+"_"+i),we(s[0])&&we(c)&&(l[u]=M(c.text+s[0].text),s.shift()),l.push.apply(l,s)):a(s)?we(c)?l[u]=M(c.text+s):""!==s&&l.push(M(s)):we(s)&&we(c)?l[u]=M(c.text+s.text):(o(t._isVList)&&r(s.tag)&&e(s.key)&&r(n)&&(s.key="__vlist"+n+"_"+i+"__"),l.push(s)));return l}function $e(e,t){return(e.__esModule||Gi&&"Module"===e[Symbol.toStringTag])&&(e=e.default),s(e)?t.extend(e):e}function Ce(e,t,n,r,o){var i=ca();return i.asyncFactory=e,i.asyncMeta={data:t,context:n,children:r,tag:o},i}function ke(t,n,i){if(o(t.error)&&r(t.errorComp))return t.errorComp;if(r(t.resolved))return t.resolved;if(o(t.loading)&&r(t.loadingComp))return t.loadingComp;if(!r(t.contexts)){var a=t.contexts=[i],u=!0,c=function(){for(var e=0,t=a.length;eBa)){Xi("You may have an infinite update loop "+(e.user?'in watcher with expression "'+e.expression+'"':"in a component render function."),e.vm);break}var n=Va.slice(),r=Ha.slice();He(),qe(n),ze(r),Ki&&Si.devtools&&Ki.emit("flush")}function ze(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&Be(r,"updated")}}function Je(e){e._inactive=!1,Va.push(e)}function qe(e){for(var t=0;tKa&&Ha[n].id>e.id;)n--;Ha.splice(n+1,0,e)}else Ha.push(e);qa||(qa=!0,fe(Ve))}}function Ke(e,t,n){Ya.get=function(){return this[t][n]},Ya.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Ya)}function Ge(e){e._watchers=[];var t=e.$options;t.props&&Xe(e,t.props),t.methods&&nt(e,t.methods),t.data?Ye(e):F(e._data={},!0),t.computed&&Qe(e,t.computed),t.watch&&t.watch!==Hi&&rt(e,t.watch)}function Xe(e,t){var n=e.$options.propsData||{},r=e._props={},o=e.$options._propKeys=[],i=!e.$parent;da.shouldConvert=i;for(var a in t)!function(i){o.push(i);var a=ee(i,t,n,e),s=Ci(i);(gi(s)||Si.isReservedAttr(s))&&Xi('"'+s+'" is a reserved attribute and cannot be used as component prop.',e),D(r,i,a,function(){e.$parent&&!Ua&&Xi("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: \""+i+'"',e)}),i in e||Ke(e,"_props",i)}(a);da.shouldConvert=!0}function Ye(e){var t=e.$options.data;t=e._data="function"==typeof t?Ze(t,e):t||{},c(t)||(t={},Xi("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",e));for(var n=Object.keys(t),r=e.$options.props,o=e.$options.methods,i=n.length;i--;){var a=n[i];o&&m(o,a)&&Xi('Method "'+a+'" has already been defined as a data property.',e),r&&m(r,a)?Xi('The data property "'+a+'" is already declared as a prop. Use prop default value instead.',e):A(a)||Ke(e,"_data",a)}F(t,!0)}function Ze(e,t){try{return e.call(t,t)}catch(e){return ae(e,t,"data()"),{}}}function Qe(e,t){var n=e._computedWatchers=Object.create(null),r=Wi();for(var o in t){var i=t[o],a="function"==typeof i?i:i.get;null==a&&Xi('Getter is missing for computed property "'+o+'".',e),r||(n[o]=new Xa(e,a||x,x,Za)),o in e?o in e.$data?Xi('The computed property "'+o+'" is already defined in data.',e):e.$options.props&&o in e.$options.props&&Xi('The computed property "'+o+'" is already defined as a prop.',e):et(e,o,i)}}function et(e,t,n){var r=!Wi();"function"==typeof n?(Ya.get=r?tt(t):n,Ya.set=x):(Ya.get=n.get?r&&!1!==n.cache?tt(t):n.get:x,Ya.set=n.set?n.set:x),Ya.set===x&&(Ya.set=function(){Xi('Computed property "'+t+'" was assigned to but it has no setter.',this)}),Object.defineProperty(e,t,Ya)}function tt(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),ia.target&&t.depend(),t.value}}function nt(e,t){var n=e.$options.props;for(var r in t)null==t[r]&&Xi('Method "'+r+'" has an undefined value in the component definition. Did you reference the function correctly?',e),n&&m(n,r)&&Xi('Method "'+r+'" has already been defined as a prop.',e),r in e&&A(r)&&Xi('Method "'+r+'" conflicts with an existing Vue instance method. Avoid defining component methods that start with _ or $.'),e[r]=null==t[r]?x:g(t[r],e)}function rt(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o=0||n.indexOf(e[o])<0)&&r.push(e[o]);return r}return e}function Pt(e){this instanceof Pt||Xi("Vue is a constructor and should be called with the `new` keyword"),this._init(e)}function Lt(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=_(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}function Ft(e){e.mixin=function(e){return this.options=Z(this.options,e),this}}function Dt(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=e.name||n.options.name;i&&W(i);var a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=Z(n.options,e),a.super=n,a.options.props&&Rt(a),a.options.computed&&Ut(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,ji.forEach(function(e){a[e]=n[e]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=b({},a.options),o[r]=a,a}}function Rt(e){var t=e.options.props;for(var n in t)Ke(e.prototype,"_props",n)}function Ut(e){var t=e.options.computed;for(var n in t)et(e.prototype,n,t[n])}function Bt(e){ji.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&W(e),"component"===t&&c(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function Ht(e){return e&&(e.Ctor.options.name||e.tag)}function Vt(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!l(e)&&e.test(t)}function zt(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var a=n[i];if(a){var s=Ht(a.componentOptions);s&&!t(s)&&Jt(n,i,r,o)}}}function Jt(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,h(n,t)}function qt(e){for(var t=e.data,n=e,o=e;r(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(t=Wt(o.data,t));for(;r(n=n.parent);)n&&n.data&&(t=Wt(t,n.data));return Kt(t.staticClass,t.class)}function Wt(e,t){return{staticClass:Gt(e.staticClass,t.staticClass),class:r(e.class)?[e.class,t.class]:t.class}}function Kt(e,t){return r(e)||r(t)?Gt(e,Xt(t)):""}function Gt(e,t){return e?t?e+" "+t:e:t||""}function Xt(e){return Array.isArray(e)?Yt(e):s(e)?Zt(e):"string"==typeof e?e:""}function Yt(e){for(var t,n="",o=0,i=e.length;o-1?Ss[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Ss[e]=/HTMLUnknownElement/.test(t.toString())}function tn(e){if("string"==typeof e){var t=document.querySelector(e);return t||(Xi("Cannot find element: "+e),document.createElement("div"))}return e}function nn(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function rn(e,t){return document.createElementNS(ks[e],t)}function on(e){return document.createTextNode(e)}function an(e){return document.createComment(e)}function sn(e,t,n){e.insertBefore(t,n)}function un(e,t){e.removeChild(t)}function cn(e,t){e.appendChild(t)}function ln(e){return e.parentNode}function fn(e){return e.nextSibling}function pn(e){return e.tagName}function dn(e,t){e.textContent=t}function vn(e,t,n){e.setAttribute(t,n)}function hn(e,t){var n=e.data.ref;if(n){var r=e.context,o=e.componentInstance||e.elm,i=r.$refs;t?Array.isArray(i[n])?h(i[n],o):i[n]===o&&(i[n]=void 0):e.data.refInFor?Array.isArray(i[n])?i[n].indexOf(o)<0&&i[n].push(o):i[n]=[o]:i[n]=o}}function mn(t,n){return t.key===n.key&&(t.tag===n.tag&&t.isComment===n.isComment&&r(t.data)===r(n.data)&&yn(t,n)||o(t.isAsyncPlaceholder)&&t.asyncFactory===n.asyncFactory&&e(n.asyncFactory.error))}function yn(e,t){if("input"!==e.tag)return!0;var n,o=r(n=e.data)&&r(n=n.attrs)&&n.type,i=r(n=t.data)&&r(n=n.attrs)&&n.type;return o===i||Es(o)&&Es(i)}function gn(e,t,n){var o,i,a={};for(o=t;o<=n;++o)i=e[o].key,r(i)&&(a[i]=o);return a}function _n(e,t){(e.data.directives||t.data.directives)&&bn(e,t)}function bn(e,t){var n,r,o,i=e===Ns,a=t===Ns,s=wn(e.data.directives,e.context),u=wn(t.data.directives,t.context),c=[],l=[];for(n in u)r=s[n],o=u[n],r?(o.oldValue=r.value,$n(o,"update",t,e),o.def&&o.def.componentUpdated&&l.push(o)):($n(o,"bind",t,e),o.def&&o.def.inserted&&c.push(o));if(c.length){var f=function(){for(var n=0;n=0&&" "===(m=e.charAt(h));h--);m&&Bs.test(m)||(l=!0)}}else void 0===i?(v=o+1,i=e.slice(0,o).trim()):t();if(void 0===i?i=e.slice(0,o).trim():0!==v&&t(),a)for(o=0;o-1?{exp:e.slice(0,ls),key:'"'+e.slice(ls+1)+'"'}:{exp:e,key:null};for(us=e,ls=fs=ps=0;!Hn();)cs=Bn(),Vn(cs)?Jn(cs):91===cs&&zn(cs);return{exp:e.slice(0,fs),key:e.slice(fs+1,ps)}}function Bn(){return us.charCodeAt(++ls)}function Hn(){return ls>=ss}function Vn(e){return 34===e||39===e}function zn(e){var t=1;for(fs=ls;!Hn();)if(e=Bn(),Vn(e))Jn(e);else if(91===e&&t++,93===e&&t--,0===t){ps=ls;break}}function Jn(e){for(var t=e;!Hn()&&(e=Bn())!==t;);}function qn(e,t,n){ds=n;var r=t.value,o=t.modifiers,i=e.tag,a=e.attrsMap.type;if("input"===i&&"file"===a&&ds("<"+e.tag+' v-model="'+r+'" type="file">:\nFile inputs are read only. Use a v-on:change listener instead.'),e.component)return Dn(e,r,o),!1;if("select"===i)Gn(e,r,o);else if("input"===i&&"checkbox"===a)Wn(e,r,o);else if("input"===i&&"radio"===a)Kn(e,r,o);else if("input"===i||"textarea"===i)Xn(e,r,o);else{if(!Si.isReservedTag(i))return Dn(e,r,o),!1;ds("<"+e.tag+' v-model="'+r+"\">: v-model is not supported on this element type. If you are working with contenteditable, it's recommended to wrap a library dedicated for that purpose inside a custom component.")}return!0}function Wn(e,t,n){var r=n&&n.number,o=Ln(e,"value")||"null",i=Ln(e,"true-value")||"true",a=Ln(e,"false-value")||"false";En(e,"checked","Array.isArray("+t+")?_i("+t+","+o+")>-1"+("true"===i?":("+t+")":":_q("+t+","+i+")")),Pn(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+t+"=$$a.concat([$$v]))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+Rn(t,"$$c")+"}",null,!0)}function Kn(e,t,n){var r=n&&n.number,o=Ln(e,"value")||"null";o=r?"_n("+o+")":o,En(e,"checked","_q("+t+","+o+")"),Pn(e,"change",Rn(t,o),null,!0)}function Gn(e,t,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",i="var $$selectedVal = "+o+";";i=i+" "+Rn(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Pn(e,"change",i,null,!0)}function Xn(e,t,n){var r=e.attrsMap.type,o=e.attrsMap["v-bind:value"]||e.attrsMap[":value"];if(o){var i=e.attrsMap["v-bind:value"]?"v-bind:value":":value";ds(i+'="'+o+'" conflicts with v-model on the same element because the latter already expands to a value binding internally')}var a=n||{},s=a.lazy,u=a.number,c=a.trim,l=!s&&"range"!==r,f=s?"change":"range"===r?Hs:"input",p="$event.target.value";c&&(p="$event.target.value.trim()"),u&&(p="_n("+p+")");var d=Rn(t,p);l&&(d="if($event.target.composing)return;"+d),En(e,"value","("+t+")"),Pn(e,f,d,null,!0),(c||u)&&Pn(e,"blur","$forceUpdate()")}function Yn(e){if(r(e[Hs])){var t=Fi?"change":"input";e[t]=[].concat(e[Hs],e[t]||[]),delete e[Hs]}r(e[Vs])&&(e.change=[].concat(e[Vs],e.change||[]),delete e[Vs])}function Zn(e,t,n){var r=vs;return function o(){null!==e.apply(null,arguments)&&er(t,o,n,r)}}function Qn(e,t,n,r,o){t=le(t),n&&(t=Zn(t,e,r)),vs.addEventListener(e,t,Vi?{capture:r,passive:o}:r)}function er(e,t,n,r){(r||vs).removeEventListener(e,t._withTask||t,n)}function tr(t,n){if(!e(t.data.on)||!e(n.data.on)){var r=n.data.on||{},o=t.data.on||{};vs=n.elm,Yn(r),he(r,o,Qn,er,n.context),vs=void 0}}function nr(t,n){if(!e(t.data.domProps)||!e(n.data.domProps)){var o,i,a=n.elm,s=t.data.domProps||{},u=n.data.domProps||{};r(u.__ob__)&&(u=n.data.domProps=b({},u));for(o in s)e(u[o])&&(a[o]="");for(o in u){if(i=u[o],"textContent"===o||"innerHTML"===o){if(n.children&&(n.children.length=0),i===s[o])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===o){a._value=i;var c=e(i)?"":String(i);rr(a,c)&&(a.value=c)}else a[o]=i}}}function rr(e,t){return!e.composing&&("OPTION"===e.tagName||or(e,t)||ir(e,t))}function or(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}function ir(e,t){var n=e.value,o=e._vModifiers;if(r(o)){if(o.lazy)return!1;if(o.number)return d(n)!==d(t);if(o.trim)return n.trim()!==t.trim()}return n!==t}function ar(e){var t=sr(e.style);return e.staticStyle?b(e.staticStyle,t):t}function sr(e){return Array.isArray(e)?w(e):"string"==typeof e?qs(e):e}function ur(e,t){var n,r={};if(t)for(var o=e;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=ar(o.data))&&b(r,n);(n=ar(e.data))&&b(r,n);for(var i=e;i=i.parent;)i.data&&(n=ar(i.data))&&b(r,n);return r}function cr(t,n){var o=n.data,i=t.data;if(!(e(o.staticStyle)&&e(o.style)&&e(i.staticStyle)&&e(i.style))){var a,s,u=n.elm,c=i.staticStyle,l=i.normalizedStyle||i.style||{},f=c||l,p=sr(n.data.style)||{};n.data.normalizedStyle=r(p.__ob__)?b({},p):p;var d=ur(n,!0);for(s in f)e(d[s])&&Gs(u,s,"");for(s in d)(a=d[s])!==f[s]&&Gs(u,s,null==a?"":a)}}function lr(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function fr(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?e.setAttribute("class",n):e.removeAttribute("class")}}function pr(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&b(t,Qs(e.name||"v")),b(t,e),t}return"string"==typeof e?Qs(e):void 0}}function dr(e){su(function(){su(e)})}function vr(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),lr(e,t))}function hr(e,t){e._transitionClasses&&h(e._transitionClasses,t),fr(e,t)}function mr(e,t,n){var r=yr(e,t),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===tu?ou:au,u=0,c=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++u>=a&&c()};setTimeout(function(){u0&&(n=tu,l=a,f=i.length):t===nu?c>0&&(n=nu,l=c,f=u.length):(l=Math.max(a,c),n=l>0?a>c?tu:nu:null,f=n?n===tu?i.length:u.length:0),{type:n,timeout:l,propCount:f,hasTransform:n===tu&&uu.test(r[ru+"Property"])}}function gr(e,t){for(;e.length explicit "+t+" duration is not a valid number - got "+JSON.stringify(e)+".",n.context):isNaN(e)&&Xi(" explicit "+t+" duration is NaN - the duration expression might be incorrect.",n.context)}function $r(e){return"number"==typeof e&&!isNaN(e)}function Cr(t){if(e(t))return!1;var n=t.fns;return r(n)?Cr(Array.isArray(n)?n[0]:n):(t._length||t.length)>1}function kr(e,t){!0!==t.data.show&&br(t)}function Ar(e,t,n){Or(e,t,n),(Fi||Ri)&&setTimeout(function(){Or(e,t,n)},0)}function Or(e,t,n){var r=t.value,o=e.multiple;if(o&&!Array.isArray(r))return void Xi('