diff --git a/demo/gh.a09051bf.js b/demo/gh.a09051bf.js index 167df00..e47351b 100644 --- a/demo/gh.a09051bf.js +++ b/demo/gh.a09051bf.js @@ -1 +1 @@ -webpackJsonp([0],{10:function(e,t){},25:function(e,t){},26:function(e,t){},27:function(e,t){},28:function(e,t){},9:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(10);var a=n(0),f=n.n(a),o=n(3),r=n.n(o);n(20),n(25);var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return f.a.createElement("header",null,f.a.createElement("a",{href:"https://github.com/dwqs/react-area-linkage",className:"github-corner","aria-label":"View source on Github"},f.a.createElement("svg",{width:"80",height:"80",viewBox:"0 0 250 250",style:{fill:"#ABD3B4",color:"#fff",position:"absolute",top:0,border:0,right:0},"aria-hidden":"true"},f.a.createElement("path",{d:"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"}),f.a.createElement("path",{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",style:{transformOrigin:"130px 106px"},className:"octo-arm"}),f.a.createElement("path",{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",className:"octo-body"}))),f.a.createElement("h2",null,"React Area Linkage: 中国行政区联动选择器"),f.a.createElement("p",null,"省、市、区联动选择"))},t}(a.Component);n(26);var c,s,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return f.a.createElement("div",{className:"start"},f.a.createElement("h3",null,"快速开始"),f.a.createElement("div",{className:"install"},f.a.createElement("h4",null,"安装"),f.a.createElement("pre",null,"npm i --save react-area-linkage"),f.a.createElement("p",null,"或者"),f.a.createElement("pre",null,"yarn add react-area-linkage")),f.a.createElement("div",{className:"register"},f.a.createElement("h4",null,"使用"),f.a.createElement("pre",null,"import React from 'react';",f.a.createElement("br",null),f.a.createElement("br",null),"import ReactDOM from 'react-dom';",f.a.createElement("br",null),f.a.createElement("br",null),"import 'react-area-linkage/dist/index.css';",f.a.createElement("br",null),f.a.createElement("br",null),"import { AreaSelect, AreaCascader } from 'react-area-linkage';",f.a.createElement("br",null),f.a.createElement("br",null),"",f.a.createElement("br",null),f.a.createElement("br",null),"")),f.a.createElement("br",null))},t}(a.Component),u=(n(27),n(28),n(1),n(5)),d=n.n(u),p=n(8),m=n.n(p),h=n(2),y=n.n(h);function v(e,t){if(!(Object.prototype.toString.call(e).includes("Element")&&Object.prototype.toString.call(t).includes("Element")))return!1;for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}function b(e){1")))),this.state.shown&&e&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//设置 placeholders,其值应该和关联层次对应"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect placeholders={['选择省', '选择市']} onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var U=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(T,{size:"large",onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,"["+this.state.selected+"]"))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//size:['small','default','large'], 默认值是 default"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect size='large' onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var J=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(T,{type:"text",onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,"["+this.state.selected+"]"))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//type:['text','all','code'], 默认值是 code. 返回值是一个数组,分别是省市的行政区域文本"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect  type='text' onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var $=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(T,{type:"all",onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,""+JSON.stringify(this.state.selected)))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//返回值是一个数组,数组项是包含省市的行政区域代码和文本的对象"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect  type='all' onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var Z=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){var e=this.props,t=e.level,n=e.type,a=[];return a=0===t?["440000"]:2===t?["440000","440300","440305"]:["广东省","深圳市","南山区","粤海街道"],f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(T,{type:n,level:t,defaultArea:a,onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},0")))),this.state.shown&&3===t&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//返回值是一个数组,分别是省份行政区域文本"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect type='text' level={3} defaultArea={['广东省', '深圳市', '南山区', '粤海街道']} onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),this.state.shown&&0===t&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//返回值是一个数组,分别是省份行政区域代码"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect type='all' level={0} defaultArea={['440000']} onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var G=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(q,{onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,"["+this.state.selected+"]"))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//返回值是一个数组,分别是省市的行政区域代码"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaCascader onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var K=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(q,{type:"all",onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,""+JSON.stringify(this.state.selected)))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//返回值是一个数组,数组项是包含省市的行政区域代码和文本的对象"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaCascader  type='all' onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var Q=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(q,{type:"text",level:1,defaultArea:["440000","440300","440305"],onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,"["+this.state.selected+"]"))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//绑定默认值defaultArea=['440000','440300','440305'], 代码对应的区域文本是['广东省', '深圳市', '南山区']"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaCascader type='text' level={1} defaultArea={defaultArea} onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var X=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(q,{type:"text",level:1,onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,"["+this.state.selected+"]"))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//代码对应的区域文本是['广东省', '深圳市', '南山区']"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaCascader type='text' level={1}  onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var Y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return f.a.createElement("div",{className:"app-main"},f.a.createElement("h3",null,"基本使用"),f.a.createElement("h4",null,"1. 作为选择器"),f.a.createElement("h5",null,"默认形式"),f.a.createElement(F,null),f.a.createElement("h5",null,"改变大小"),f.a.createElement(U,null),f.a.createElement("h5",null,"返回区域文本"),f.a.createElement(J,null),f.a.createElement("h5",null,"返回区域代码和文本"),f.a.createElement($,null),f.a.createElement("h5",null,"设置 placeholders"),f.a.createElement(F,{placeholders:["选择省","选择市"]}),f.a.createElement("p",{className:"desc"},f.a.createElement("code",null,"placeholders")," 是一个数组, 数组项顺序分别对应省/市/区."),f.a.createElement("h5",null,"设置默认值及省市区联动"),f.a.createElement(Z,{level:2}),f.a.createElement("p",{className:"desc"},f.a.createElement("code",null,"selected")," 是一个数组, 数组项顺序分别对应省/市/区, 且类型(区域代码/区域文本)必须统一. 以第一个元素类型为基准. 类型不统一将报错."),f.a.createElement("h5",null,"只选省份"),f.a.createElement(Z,{level:0,type:"all"}),f.a.createElement("h4",null,"2. 作为级联器(只支持2/3级联动)"),f.a.createElement("h5",null,"默认形式"),f.a.createElement(G,null),f.a.createElement("h5",null,"返回区域文本和代码"),f.a.createElement(K,null),f.a.createElement("p",{className:"desc"},f.a.createElement("code",null,"type")," 表示返回值, 支持:['text', 'code', 'all'], 默认值是 code"),f.a.createElement("h5",null,"设置默认值"),f.a.createElement(Q,null),f.a.createElement("h5",null,"省市区联动"),f.a.createElement(X,null))},t}(a.Component);var ee=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return f.a.createElement("footer",null,f.a.createElement("p",null,"Vue 版本:",f.a.createElement("a",{target:"_blank",href:"https://github.com/dwqs/vue-area-linkage"},"Vue Area Linkage")),f.a.createElement("p",null,"最新数据来源:",f.a.createElement("a",{href:"https://github.com/dwqs/area-data",target:"_blank"},"省/市/区数据")),f.a.createElement("p",null,"官方数据:",f.a.createElement("a",{href:"http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2016/index.html",target:"_blank"},"国家统计局-城乡划分")))},t}(a.Component);var te=function(t){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this));return e.onChange=function(e){},e.state={selected:[]},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),n.prototype.render=function(){return f.a.createElement("div",{className:"app-wrap"},f.a.createElement(l,null),f.a.createElement(i,null),f.a.createElement(Y,null),f.a.createElement(ee,null))},n.prototype.componentDidMount=function(){},n}(a.Component);window.onload=function(){r.a.render(f.a.createElement(te,null),document.getElementById("app"))}}},[9]); \ No newline at end of file +webpackJsonp([0],{10:function(e,t){},25:function(e,t){},26:function(e,t){},27:function(e,t){},30:function(e,t){},9:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(10);var a=n(0),f=n.n(a),o=n(4),r=n.n(o);n(20),n(25);var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return f.a.createElement("header",null,f.a.createElement("a",{href:"https://github.com/dwqs/react-area-linkage",className:"github-corner","aria-label":"View source on Github"},f.a.createElement("svg",{width:"80",height:"80",viewBox:"0 0 250 250",style:{fill:"#ABD3B4",color:"#fff",position:"absolute",top:0,border:0,right:0},"aria-hidden":"true"},f.a.createElement("path",{d:"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"}),f.a.createElement("path",{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",style:{transformOrigin:"130px 106px"},className:"octo-arm"}),f.a.createElement("path",{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",className:"octo-body"}))),f.a.createElement("h2",null,"React Area Linkage: 中国行政区联动选择器"),f.a.createElement("p",null,"省、市、区联动选择"))},t}(a.Component);n(26);var c,s,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return f.a.createElement("div",{className:"start"},f.a.createElement("h3",null,"快速开始"),f.a.createElement("div",{className:"install"},f.a.createElement("h4",null,"安装"),f.a.createElement("pre",null,"npm i --save react-area-linkage"),f.a.createElement("p",null,"或者"),f.a.createElement("pre",null,"yarn add react-area-linkage")),f.a.createElement("div",{className:"register"},f.a.createElement("h4",null,"使用"),f.a.createElement("pre",null,"import React from 'react';",f.a.createElement("br",null),f.a.createElement("br",null),"import ReactDOM from 'react-dom';",f.a.createElement("br",null),f.a.createElement("br",null),"import 'react-area-linkage/dist/index.css';",f.a.createElement("br",null),f.a.createElement("br",null),"import { AreaSelect, AreaCascader } from 'react-area-linkage';",f.a.createElement("br",null),f.a.createElement("br",null),"",f.a.createElement("br",null),f.a.createElement("br",null),"")),f.a.createElement("br",null))},t}(a.Component),u=(n(27),n(1)),p=(n(30),n(2),n(8)),d=n.n(p),h=n(3),m=n.n(h);function y(e,t){if(!(Object.prototype.toString.call(e).includes("Element")&&Object.prototype.toString.call(t).includes("Element")))return!1;for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}function v(e){1")))),this.state.shown&&e&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//设置 placeholders,其值应该和关联层次对应"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect placeholders={['选择省', '选择市']} onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var F=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(D,{data:u.pca,size:"large",onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,"["+this.state.selected+"]"))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//size:['small','default','large'], 默认值是 default"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect size='large' onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var U=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(D,{type:"text",data:u.pca,onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,"["+this.state.selected+"]"))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//type:['text','all','code'], 默认值是 code. 返回值是一个数组,分别是省市的行政区域文本"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect  type='text' onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var J=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(D,{data:u.pca,type:"all",onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,""+JSON.stringify(this.state.selected)))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//返回值是一个数组,数组项是包含省市的行政区域代码和文本的对象"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect  type='all' onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var $=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){var e=this.props,t=e.level,n=e.type,a=[],r={};return 0===t?(a=["440000"],r=u.pca):2===t&&(a=["440000","440300","440305"],r=u.pcaa),f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(D,{data:r,type:n,level:t,defaultArea:a,onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},0")))),this.state.shown&&3===t&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//返回值是一个数组,分别是省份行政区域文本"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect type='text' level={3} defaultArea={['广东省', '深圳市', '南山区', '粤海街道']} onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),this.state.shown&&0===t&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//返回值是一个数组,分别是省份行政区域代码"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaSelect type='all' level={0} defaultArea={['440000']} onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var Z=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(q,{data:u.pca,onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,"["+this.state.selected+"]"))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//返回值是一个数组,分别是省市的行政区域代码"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaCascader onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var G=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(q,{data:u.pca,type:"all",onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,""+JSON.stringify(this.state.selected)))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//返回值是一个数组,数组项是包含省市的行政区域代码和文本的对象"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaCascader  type='all' onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var K=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(q,{data:u.pcaa,type:"text",level:1,defaultArea:["440000","440300","440305"],onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,"["+this.state.selected+"]"))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//绑定默认值defaultArea=['440000','440300','440305'], 代码对应的区域文本是['广东省', '深圳市', '南山区']"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaCascader type='text' level={1} defaultArea={defaultArea} onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var Q=function(e){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return t.handleSelectedChange=function(e){t.setState({selected:e})},t.toggle=function(){t.setState({shown:!t.state.shown})},t.state={selected:[],shown:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n.prototype.render=function(){return f.a.createElement("div",{className:"code-area"},f.a.createElement("div",{className:"area-left"},f.a.createElement(q,{data:u.pcaa,type:"text",level:1,onChange:this.handleSelectedChange})),f.a.createElement("div",{className:"area-right"},f.a.createElement("pre",null,f.a.createElement("code",null,"["+this.state.selected+"]"))),this.state.shown&&f.a.createElement("div",{className:"original-code"},f.a.createElement("pre",null,f.a.createElement("code",null,f.a.createElement("span",null,"//代码对应的区域文本是['广东省', '深圳市', '南山区']"),f.a.createElement("br",null),f.a.createElement("span",null,"<"),"AreaCascader type='text' level={1}  onChange={this.handleSelectedChange}/",f.a.createElement("span",null,">")))),f.a.createElement("div",{className:"show-code",onClick:this.toggle},this.state.shown?"Hide Code":"Show Code"))},n}(a.Component);var X=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return f.a.createElement("div",{className:"app-main"},f.a.createElement("h3",null,"基本使用"),f.a.createElement("h4",null,"1. 作为选择器"),f.a.createElement("h5",null,"默认形式"),f.a.createElement(B,null),f.a.createElement("h5",null,"改变大小"),f.a.createElement(F,null),f.a.createElement("h5",null,"返回区域文本"),f.a.createElement(U,null),f.a.createElement("h5",null,"返回区域代码和文本"),f.a.createElement(J,null),f.a.createElement("h5",null,"设置 placeholders"),f.a.createElement(B,{placeholders:["选择省","选择市"]}),f.a.createElement("p",{className:"desc"},f.a.createElement("code",null,"placeholders")," 是一个数组, 数组项顺序分别对应省/市/区."),f.a.createElement("h5",null,"设置默认值及省市区联动"),f.a.createElement($,{level:2}),f.a.createElement("p",{className:"desc"},f.a.createElement("code",null,"selected")," 是一个数组, 数组项顺序分别对应省/市/区, 且类型(区域代码/区域文本)必须统一. 以第一个元素类型为基准. 类型不统一将报错."),f.a.createElement("h5",null,"只选省份"),f.a.createElement($,{level:0,type:"all"}),f.a.createElement("h4",null,"2. 作为级联器(只支持2/3级联动)"),f.a.createElement("h5",null,"默认形式"),f.a.createElement(Z,null),f.a.createElement("h5",null,"返回区域文本和代码"),f.a.createElement(G,null),f.a.createElement("p",{className:"desc"},f.a.createElement("code",null,"type")," 表示返回值, 支持:['text', 'code', 'all'], 默认值是 code"),f.a.createElement("h5",null,"设置默认值"),f.a.createElement(K,null),f.a.createElement("h5",null,"省市区联动"),f.a.createElement(Q,null))},t}(a.Component);var Y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return f.a.createElement("footer",null,f.a.createElement("p",null,"Vue 版本:",f.a.createElement("a",{target:"_blank",href:"https://github.com/dwqs/vue-area-linkage"},"Vue Area Linkage")),f.a.createElement("p",null,"最新数据来源:",f.a.createElement("a",{href:"https://github.com/dwqs/area-data",target:"_blank"},"省/市/区数据")),f.a.createElement("p",null,"官方数据:",f.a.createElement("a",{href:"http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2016/index.html",target:"_blank"},"国家统计局-城乡划分")))},t}(a.Component);var ee=function(t){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this));return e.onChange=function(e){},e.state={selected:[]},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),n.prototype.render=function(){return f.a.createElement("div",{className:"app-wrap"},f.a.createElement(l,null),f.a.createElement(i,null),f.a.createElement(X,null),f.a.createElement(Y,null))},n.prototype.componentDidMount=function(){},n}(a.Component);window.onload=function(){r.a.render(f.a.createElement(ee,null),document.getElementById("app"))}}},[9]); \ No newline at end of file diff --git a/demo/gh.a09051bf.js.gz b/demo/gh.a09051bf.js.gz index 33ad1b4..e98e9fd 100644 Binary files a/demo/gh.a09051bf.js.gz and b/demo/gh.a09051bf.js.gz differ diff --git a/demo/vendor.54999dc1.js b/demo/vendor.54999dc1.js new file mode 100644 index 0000000..bfde3ad --- /dev/null +++ b/demo/vendor.54999dc1.js @@ -0,0 +1 @@ +!function(u){var c=window.webpackJsonp;window.webpackJsonp=function(e,t,n){for(var r,o,a,i=0,l=[];i