-
Notifications
You must be signed in to change notification settings - Fork 0
/
2449-1fa34466a58b567d7268.js
1 lines (1 loc) · 56.3 KB
/
2449-1fa34466a58b567d7268.js
1
(self.webpackChunkzent_docs=self.webpackChunkzent_docs||[]).push([[2449],{82449:(n,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>b});var t=s(73450),p=s(27378),e=s(57318),o=s(56377),c=s(23097),l=s(24246);function u(n,a){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),s.push.apply(s,t)}return s}function i(n){for(var a=1;a<arguments.length;a++){var s=null!=arguments[a]?arguments[a]:{};a%2?u(Object(s),!0).forEach((function(a){(0,t.Z)(n,a,s[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):u(Object(s)).forEach((function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(s,a))}))}return n}var k=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{activeKey:["1"],bg:!0}),(0,t.Z)(this,"handleChange",(n=>{this.setState({activeKey:n})})),(0,t.Z)(this,"handleBgChange",(n=>{this.setState({bg:n})}))}render(){var n=this.state,a=n.activeKey,s=n.bg?"default":"none";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{marginBottom:20},children:[(0,l.jsx)(o.r,{size:"small",checked:this.state.bg,onChange:this.handleBgChange}),(0,l.jsx)("span",{children:" 底色"})]}),(0,l.jsxs)(c.U,{panelTitleBackground:s,activeKey:a,onChange:this.handleChange,children:[(0,l.jsx)(c.U.Panel,{title:"南歌子(暮春)",children:"紫陌寻春去,红尘拂面来。无人不道看花回。惟见石榴新蕊、一枝开。 冰簟堆云髻,金尊滟玉醅。绿阴青子相催。留取红巾千点、照池台。"},"1"),(0,l.jsx)(c.U.Panel,{title:"沁园春",children:"孤馆灯青,野店鸡号,旅枕梦残。渐月华收练,晨霜耿耿,云山摛锦,朝露漙漙。世路无穷,劳生有限,似此区区长鲜欢。微吟罢,凭征鞍无语,往事千端。 当时共客长安。似二陆初来俱少年。有笔头千字,胸中万卷,致君尧舜,此事何难。用舍由时,行藏在我,袖手何妨闲处看。身长健,但优游卒岁,且斗尊前。"},"2"),(0,l.jsx)(c.U.Panel,{title:"浣溪沙",disabled:!0,children:"缥缈红妆照浅溪。薄云疏雨不成泥。送君何处古台西。 废沼夜来秋水满,茂林深处晚莺啼。行人肠断草凄迷。"},"3")]})]})}}return(0,l.jsx)(n,{})},r=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{activeKey:"1"})}handleChange(n){this.setState({activeKey:n})}render(){var n=this.state.activeKey;return(0,l.jsxs)(c.U,{activeKey:n,onChange:this.handleChange.bind(this),accordion:!0,children:[(0,l.jsx)(c.U.Panel,{title:"南歌子(暮春)",children:"紫陌寻春去,红尘拂面来。无人不道看花回。惟见石榴新蕊、一枝开。 冰簟堆云髻,金尊滟玉醅。绿阴青子相催。留取红巾千点、照池台。"},"1"),(0,l.jsx)(c.U.Panel,{title:"沁园春",children:"孤馆灯青,野店鸡号,旅枕梦残。渐月华收练,晨霜耿耿,云山摛锦,朝露漙漙。世路无穷,劳生有限,似此区区长鲜欢。微吟罢,凭征鞍无语,往事千端。 当时共客长安。似二陆初来俱少年。有笔头千字,胸中万卷,致君尧舜,此事何难。用舍由时,行藏在我,袖手何妨闲处看。身长健,但优游卒岁,且斗尊前。"},"2"),(0,l.jsx)(c.U.Panel,{title:"浣溪沙",children:"缥缈红妆照浅溪。薄云疏雨不成泥。送君何处古台西。 废沼夜来秋水满,茂林深处晚莺啼。行人肠断草凄迷。"},"3")]})}}return(0,l.jsx)(n,{})},d=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{activeKey:["1"],bg:!1}),(0,t.Z)(this,"handleChange",(n=>{this.setState({activeKey:n})})),(0,t.Z)(this,"handleBgChange",(n=>{this.setState({bg:n})}))}render(){var n=this.state,a=n.activeKey,s=n.bg?"default":"none";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{marginBottom:20},children:[(0,l.jsx)(o.r,{size:"small",checked:this.state.bg,onChange:this.handleBgChange}),(0,l.jsx)("span",{children:" 底色"})]}),(0,l.jsxs)(c.U,{panelTitleBackground:s,activeKey:a,onChange:this.handleChange,bordered:!1,children:[(0,l.jsx)(c.U.Panel,{title:"南歌子(暮春)",children:"紫陌寻春去,红尘拂面来。无人不道看花回。惟见石榴新蕊、一枝开。 冰簟堆云髻,金尊滟玉醅。绿阴青子相催。留取红巾千点、照池台。"},"1"),(0,l.jsx)(c.U.Panel,{title:"沁园春",children:"孤馆灯青,野店鸡号,旅枕梦残。渐月华收练,晨霜耿耿,云山摛锦,朝露漙漙。世路无穷,劳生有限,似此区区长鲜欢。微吟罢,凭征鞍无语,往事千端。 当时共客长安。似二陆初来俱少年。有笔头千字,胸中万卷,致君尧舜,此事何难。用舍由时,行藏在我,袖手何妨闲处看。身长健,但优游卒岁,且斗尊前。"},"2"),(0,l.jsx)(c.U.Panel,{title:"浣溪沙",children:"缥缈红妆照浅溪。薄云疏雨不成泥。送君何处古台西。 废沼夜来秋水满,茂林深处晚莺啼。行人肠断草凄迷。"},"3")]})]})}}return(0,l.jsx)(n,{})},h=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{activeKey:["1"]})}handleChange(n){this.setState({activeKey:n})}render(){var n=this.state.activeKey;return(0,l.jsxs)(c.U,{activeKey:n,onChange:this.handleChange.bind(this),children:[(0,l.jsx)(c.U.Panel,{title:"南歌子(暮春)",showArrow:!1,children:"紫陌寻春去,红尘拂面来。无人不道看花回。惟见石榴新蕊、一枝开。 冰簟堆云髻,金尊滟玉醅。绿阴青子相催。留取红巾千点、照池台。"},"1"),(0,l.jsx)(c.U.Panel,{title:"沁园春",showArrow:!1,children:"孤馆灯青,野店鸡号,旅枕梦残。渐月华收练,晨霜耿耿,云山摛锦,朝露漙漙。世路无穷,劳生有限,似此区区长鲜欢。微吟罢,凭征鞍无语,往事千端。 当时共客长安。似二陆初来俱少年。有笔头千字,胸中万卷,致君尧舜,此事何难。用舍由时,行藏在我,袖手何妨闲处看。身长健,但优游卒岁,且斗尊前。"},"2"),(0,l.jsx)(c.U.Panel,{title:"浣溪沙",showArrow:!1,children:"缥缈红妆照浅溪。薄云疏雨不成泥。送君何处古台西。 废沼夜来秋水满,茂林深处晚莺啼。行人肠断草凄迷。"},"3")]})}}return(0,l.jsx)(n,{})};function g(n){return(0,l.jsx)(n.tag,i(i({},n.attributes),{},{dangerouslySetInnerHTML:{__html:n.html}}))}function m(n){return(0,l.jsx)(g,{tag:"section",html:n.html,attributes:{className:"zandoc-react-markdown"}})}function v(n){return(0,l.jsx)(g,{tag:"style",html:n.style})}function y(n,a){for(;n;)return n.offsetTop&&"static"!==getComputedStyle(n).position&&(a+=n.offsetTop),y(n.parentNode,a);return a}class f extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{showCode:!1}),(0,t.Z)(this,"toggle",(()=>{this.setState({showCode:!this.state.showCode})}))}render(){var n=this.state.showCode,a=this.props,s=a.title,t=a.src,p=a.children;return(0,l.jsxs)("div",{className:"zandoc-react-demo",children:[(0,l.jsx)("div",{className:"zandoc-react-demo__preview",children:p}),(0,l.jsxs)("div",{className:"zandoc-react-demo__bottom",onClick:this.toggle,children:[(0,l.jsx)("div",{className:"zandoc-react-demo__title",children:(0,l.jsx)("p",{children:s||""})}),(0,l.jsx)("i",{className:"zenticon zenticon-caret-up zandoc-react-demo__toggle ".concat(n?"zandoc-react-demo__toggle-on":"zandoc-react-demo__toggle-off")})]}),n&&(0,l.jsx)("pre",{className:"zandoc-react-demo__code",children:(0,l.jsx)(g,{tag:"code",html:t,attributes:{className:"language-jsx"}})})]})}}class b extends p.Component{componentDidMount(){var n=location.hash;if(n){var a=document.querySelector('a[href="'.concat(n,'"]'));a&&(0,e.l)(document.documentElement,0,y(a,-9))}}render(){return p.createElement("div",{className:"zandoc-react-container"},p.createElement(v,{style:""}),p.createElement(m,{html:'<h2 class="anchor-heading"><a href="#collapse-zhe-die-mian-ban">¶</a><a href="javascript:void(0)" id="collapse-zhe-die-mian-ban" class="anchor-point"></a>Collapse 折叠面板</h2>\n<p>折叠/展开内容区域。</p>\n<h3 class="anchor-heading"><a href="#shi-yong-zhi-nan">¶</a><a href="javascript:void(0)" id="shi-yong-zhi-nan" class="anchor-point"></a>使用指南</h3>\n<ul>\n<li>对复杂区域进行分组和隐藏</li>\n<li>手风琴是一种特殊的折叠面板,同一时刻只允许打开一个折叠区域</li>\n</ul>\n<h3 class="anchor-heading"><a href="#dai-ma-yan-shi">¶</a><a href="javascript:void(0)" id="dai-ma-yan-shi" class="anchor-point"></a>代码演示</h3>'}),p.createElement(f,{title:"基础用法",id:"Demobasic",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Collapse</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Switch</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">class</span> <span class="token class-name">Simple</span> <span class="token keyword">extends</span> <span class="token class-name">React<span class="token punctuation">.</span>Component</span> <span class="token punctuation">{</span>\n state <span class="token operator">=</span> <span class="token punctuation">{</span>\n activeKey<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">\'1\'</span><span class="token punctuation">]</span><span class="token punctuation">,</span>\n bg<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function-variable function">handleChange</span> <span class="token operator">=</span> <span class="token parameter">activeKey</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n activeKey<span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function-variable function">handleBgChange</span> <span class="token operator">=</span> <span class="token parameter">bg</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span> bg <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword">const</span> <span class="token punctuation">{</span> activeKey<span class="token punctuation">,</span> bg <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">state</span><span class="token punctuation">;</span>\n <span class="token keyword">const</span> titleBg <span class="token operator">=</span> bg <span class="token operator">?</span> <span class="token string">\'default\'</span> <span class="token operator">:</span> <span class="token string">\'none\'</span><span class="token punctuation">;</span>\n\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span> marginBottom<span class="token operator">:</span> <span class="token number">20</span> <span class="token punctuation">}</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Switch</span></span>\n <span class="token attr-name">size</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>small<span class="token punctuation">"</span></span>\n <span class="token attr-name">checked</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">state</span><span class="token punctuation">.</span><span class="token property-access">bg</span><span class="token punctuation">}</span></span>\n <span class="token attr-name">onChange</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">handleBgChange</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">/></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>span</span><span class="token punctuation">></span></span> 底色<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>span</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse</span></span>\n <span class="token attr-name">panelTitleBackground</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>titleBg<span class="token punctuation">}</span></span>\n <span class="token attr-name">activeKey</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>activeKey<span class="token punctuation">}</span></span>\n <span class="token attr-name">onChange</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">handleChange</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>南歌子(暮春)<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>1<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n 紫陌寻春去,红尘拂面来。无人不道看花回。惟见石榴新蕊、一枝开。 冰簟堆云髻,金尊滟玉醅。绿阴青子相催。留取红巾千点、照池台。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>沁园春<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>2<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n 孤馆灯青,野店鸡号,旅枕梦残。渐月华收练,晨霜耿耿,云山摛锦,朝露漙漙。世路无穷,劳生有限,似此区区长鲜欢。微吟罢,凭征鞍无语,往事千端。 当时共客长安。似二陆初来俱少年。有笔头千字,胸中万卷,致君尧舜,此事何难。用舍由时,行藏在我,袖手何妨闲处看。身长健,但优游卒岁,且斗尊前。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>浣溪沙<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>3<span class="token punctuation">"</span></span> <span class="token attr-name">disabled</span><span class="token punctuation">></span></span>\n 缥缈红妆照浅溪。薄云疏雨不成泥。送君何处古台西。\n废沼夜来秋水满,茂林深处晚莺啼。行人肠断草凄迷。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span></span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Simple</span></span> <span class="token punctuation">/></span></span><span class="token punctuation">,</span> mountNode<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(k)),p.createElement(f,{title:"手风琴风格,每次只能打开一个面板。",id:"Demoaccordion",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Collapse</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">class</span> <span class="token class-name">Simple</span> <span class="token keyword">extends</span> <span class="token class-name">React<span class="token punctuation">.</span>Component</span> <span class="token punctuation">{</span>\n state <span class="token operator">=</span> <span class="token punctuation">{</span>\n activeKey<span class="token operator">:</span> <span class="token string">\'1\'</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function">handleChange</span><span class="token punctuation">(</span><span class="token parameter">activeKey</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n activeKey<span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n\n <span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword">const</span> <span class="token punctuation">{</span> activeKey <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">state</span><span class="token punctuation">;</span>\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse</span></span>\n <span class="token attr-name">activeKey</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>activeKey<span class="token punctuation">}</span></span>\n <span class="token attr-name">onChange</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">handleChange</span><span class="token punctuation">.</span><span class="token method function property-access">bind</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">)</span><span class="token punctuation">}</span></span>\n <span class="token attr-name">accordion</span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>南歌子(暮春)<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>1<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n 紫陌寻春去,红尘拂面来。无人不道看花回。惟见石榴新蕊、一枝开。 冰簟堆云髻,金尊滟玉醅。绿阴青子相催。留取红巾千点、照池台。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>沁园春<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>2<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n 孤馆灯青,野店鸡号,旅枕梦残。渐月华收练,晨霜耿耿,云山摛锦,朝露漙漙。世路无穷,劳生有限,似此区区长鲜欢。微吟罢,凭征鞍无语,往事千端。 当时共客长安。似二陆初来俱少年。有笔头千字,胸中万卷,致君尧舜,此事何难。用舍由时,行藏在我,袖手何妨闲处看。身长健,但优游卒岁,且斗尊前。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>浣溪沙<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>3<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n 缥缈红妆照浅溪。薄云疏雨不成泥。送君何处古台西。\n废沼夜来秋水满,茂林深处晚莺啼。行人肠断草凄迷。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse</span></span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Simple</span></span> <span class="token punctuation">/></span></span><span class="token punctuation">,</span> mountNode<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(r)),p.createElement(f,{title:"无边框样式",id:"Demonoborder",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Collapse</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">class</span> <span class="token class-name">Simple</span> <span class="token keyword">extends</span> <span class="token class-name">React<span class="token punctuation">.</span>Component</span> <span class="token punctuation">{</span>\n state <span class="token operator">=</span> <span class="token punctuation">{</span>\n activeKey<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">\'1\'</span><span class="token punctuation">]</span><span class="token punctuation">,</span>\n bg<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function-variable function">handleChange</span> <span class="token operator">=</span> <span class="token parameter">activeKey</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n activeKey<span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function-variable function">handleBgChange</span> <span class="token operator">=</span> <span class="token parameter">bg</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span> bg <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword">const</span> <span class="token punctuation">{</span> activeKey<span class="token punctuation">,</span> bg <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">state</span><span class="token punctuation">;</span>\n <span class="token keyword">const</span> titleBg <span class="token operator">=</span> bg <span class="token operator">?</span> <span class="token string">\'default\'</span> <span class="token operator">:</span> <span class="token string">\'none\'</span><span class="token punctuation">;</span>\n\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span> marginBottom<span class="token operator">:</span> <span class="token number">20</span> <span class="token punctuation">}</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Switch</span></span>\n <span class="token attr-name">size</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>small<span class="token punctuation">"</span></span>\n <span class="token attr-name">checked</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">state</span><span class="token punctuation">.</span><span class="token property-access">bg</span><span class="token punctuation">}</span></span>\n <span class="token attr-name">onChange</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">handleBgChange</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">/></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>span</span><span class="token punctuation">></span></span> 底色<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>span</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse</span></span>\n <span class="token attr-name">panelTitleBackground</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>titleBg<span class="token punctuation">}</span></span>\n <span class="token attr-name">activeKey</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>activeKey<span class="token punctuation">}</span></span>\n <span class="token attr-name">onChange</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">handleChange</span><span class="token punctuation">}</span></span>\n <span class="token attr-name">bordered</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token boolean">false</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>南歌子(暮春)<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>1<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n 紫陌寻春去,红尘拂面来。无人不道看花回。惟见石榴新蕊、一枝开。 冰簟堆云髻,金尊滟玉醅。绿阴青子相催。留取红巾千点、照池台。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>沁园春<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>2<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n 孤馆灯青,野店鸡号,旅枕梦残。渐月华收练,晨霜耿耿,云山摛锦,朝露漙漙。世路无穷,劳生有限,似此区区长鲜欢。微吟罢,凭征鞍无语,往事千端。 当时共客长安。似二陆初来俱少年。有笔头千字,胸中万卷,致君尧舜,此事何难。用舍由时,行藏在我,袖手何妨闲处看。身长健,但优游卒岁,且斗尊前。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>浣溪沙<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>3<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n 缥缈红妆照浅溪。薄云疏雨不成泥。送君何处古台西。\n废沼夜来秋水满,茂林深处晚莺啼。行人肠断草凄迷。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span></span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Simple</span></span> <span class="token punctuation">/></span></span><span class="token punctuation">,</span> mountNode<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(d)),p.createElement(f,{title:"无箭头样式",id:"Demonoarrow",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Collapse</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">class</span> <span class="token class-name">Simple</span> <span class="token keyword">extends</span> <span class="token class-name">React<span class="token punctuation">.</span>Component</span> <span class="token punctuation">{</span>\n state <span class="token operator">=</span> <span class="token punctuation">{</span>\n activeKey<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">\'1\'</span><span class="token punctuation">]</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function">handleChange</span><span class="token punctuation">(</span><span class="token parameter">activeKey</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n activeKey\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n\n <span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword">const</span> <span class="token punctuation">{</span> activeKey <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">state</span><span class="token punctuation">;</span>\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse</span></span> <span class="token attr-name">activeKey</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>activeKey<span class="token punctuation">}</span></span> <span class="token attr-name">onChange</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">handleChange</span><span class="token punctuation">.</span><span class="token method function property-access">bind</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">)</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>南歌子(暮春)<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>1<span class="token punctuation">"</span></span> <span class="token attr-name">showArrow</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token boolean">false</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n 紫陌寻春去,红尘拂面来。无人不道看花回。惟见石榴新蕊、一枝开。 冰簟堆云髻,金尊滟玉醅。绿阴青子相催。留取红巾千点、照池台。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>沁园春<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>2<span class="token punctuation">"</span></span> <span class="token attr-name">showArrow</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token boolean">false</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n 孤馆灯青,野店鸡号,旅枕梦残。渐月华收练,晨霜耿耿,云山摛锦,朝露漙漙。世路无穷,劳生有限,似此区区长鲜欢。微吟罢,凭征鞍无语,往事千端。 当时共客长安。似二陆初来俱少年。有笔头千字,胸中万卷,致君尧舜,此事何难。用舍由时,行藏在我,袖手何妨闲处看。身长健,但优游卒岁,且斗尊前。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Collapse.Panel</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>浣溪沙<span class="token punctuation">"</span></span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>3<span class="token punctuation">"</span></span> <span class="token attr-name">showArrow</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token boolean">false</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n 缥缈红妆照浅溪。薄云疏雨不成泥。送君何处古台西。\n废沼夜来秋水满,茂林深处晚莺啼。行人肠断草凄迷。\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse.Panel</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Collapse</span></span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Simple</span></span> <span class="token punctuation">/></span></span>\n <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(h)),p.createElement(m,{html:'<h3 class="anchor-heading"><a href="#api">¶</a><a href="javascript:void(0)" id="api" class="anchor-point"></a>API</h3>\n<h4 class="anchor-heading"><a href="#collpase">¶</a><a href="javascript:void(0)" id="collpase" class="anchor-point"></a>Collpase</h4>\n<table class="table">\n<thead>\n<tr>\n<th>参数</th>\n<th>说明</th>\n<th>类型</th>\n<th>是否必须</th>\n<th>默认值</th>\n<th>备选值</th>\n<th></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>onChange</td>\n<td>切换面板的回调函数</td>\n<td><code>func</code></td>\n<td>是</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>activeKey</td>\n<td>当前打开的面板 id</td>\n<td><code>string | string[]</code>\n(注意手风琴模式时类型才为 \n<code>string</code>\n,否则类型为 \n<code>string[]</code>\n)</td>\n<td>否</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>accordion</td>\n<td>手风琴模式,一次只能有一个 active 的面板</td>\n<td><code>bool</code></td>\n<td>否</td>\n<td><code>false</code></td>\n<td><code>true</code></td>\n<td></td>\n</tr>\n<tr>\n<td>bordered</td>\n<td>是否有外边框</td>\n<td><code>bool</code></td>\n<td>否</td>\n<td><code>true</code></td>\n<td><code>false</code></td>\n<td></td>\n</tr>\n<tr>\n<td>panelTitleBackground</td>\n<td>Panel 标题底色</td>\n<td><code>string</code></td>\n<td>否</td>\n<td><code>\'default\'</code></td>\n<td><code>\'none\'</code></td>\n<td></td>\n</tr>\n<tr>\n<td>className</td>\n<td>额外类名</td>\n<td><code>string</code></td>\n<td>否</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<h4 class="anchor-heading"><a href="#collpase-panel">¶</a><a href="javascript:void(0)" id="collpase-panel" class="anchor-point"></a>Collpase.Panel</h4>\n<table class="table">\n<thead>\n<tr>\n<th>参数</th>\n<th>说明</th>\n<th>类型</th>\n<th>是否必须</th>\n<th>默认值</th>\n<th>备选值</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>key</td>\n<td>面板 id,\n<a href="https://reactjs.org/docs/lists-and-keys.html#keys">React Keys 文档</a></td>\n<td><code>ReactText</code></td>\n<td>是</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>title</td>\n<td>面板标题</td>\n<td><code>node</code></td>\n<td>是</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>disabled</td>\n<td>禁用面板</td>\n<td><code>bool</code></td>\n<td>否</td>\n<td><code>false</code></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>showArrow</td>\n<td>是否显示箭头图标</td>\n<td><code>bool</code></td>\n<td>否</td>\n<td><code>true</code></td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>style</td>\n<td>额外样式</td>\n<td><code>object</code></td>\n<td>否</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>className</td>\n<td>额外类名</td>\n<td><code>string</code></td>\n<td>否</td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>'}))}}},23097:(n,a,s)=>{"use strict";s.d(a,{U:()=>f});var t=s(59312),p=s(24246),e=s(27378),o=s(60042),c=s.n(o),l=s(65922),u=s(79737),i=s(12856),k="cubic-bezier(0.5, 0, 0.5, 0.1)",r=s(1348),d=s(31256),h={borderBottomWidth:0,borderBottomColor:"rgba(255, 255, 255, 0)",transition:"border-bottom-width 160ms "+k+", border-bottom-color 160ms "+k},g={};function m(n){var a=n.className;return(0,p.jsx)("svg",(0,t.pi)({width:"16",height:"10",className:a,xmlns:"http://www.w3.org/2000/svg","data-zv":"9.12.16"},{children:(0,p.jsx)("path",{d:"M8 6.77L14.37.403l1.413 1.414-6.369 6.37h.002L8 9.601.223 1.822 1.637.408 8 6.771z",fillRule:"evenodd","data-zv":"9.12.16"},void 0)}),void 0)}var v=function(n){function a(){var a=null!==n&&n.apply(this,arguments)||this;return a.state={animateAppear:!a.props.active},a.toggle=function(){var n=a.props,s=n.onChange,t=n.panelKey,p=n.active,e=n.disabled;(void 0===e?a.context.value:e)||(0,d.Z)(t)||null==s||s(t,!p)},a}return(0,t.ZT)(a,n),a.prototype.render=function(){var n=this.props,a=n.children,s=n.title,e=n.style,o=n.active,l=n.disabled,r=void 0===l?this.context.value:l,d=n.showArrow,v=n.className,y=n.isLast,f=n.bordered,b=n.panelTitleBackground,C=this.state.animateAppear,w=f&&y,j=w&&!o?h:g,x=w||!o?h:g;return(0,p.jsxs)("div",(0,t.pi)({className:c()("zent-collapse-panel",v,{"zent-collapse-panel--has-arrow":d,"zent-collapse-panel--active":o,"zent-collapse-panel--inactive":!o,"zent-collapse-panel--disabled":r}),style:e,"data-zv":"9.12.16"},{children:[(0,p.jsxs)("div",(0,t.pi)({className:c()("zent-collapse-panel__title",{"zent-collapse-panel__title--bg-none":"none"===b,"zent-collapse-panel__title--bg-default":"default"===b}),style:j,onClick:this.toggle,"data-zv":"9.12.16"},{children:[d&&(0,p.jsx)(m,{className:"zent-collapse-panel__arrow"},void 0),s]}),void 0),(0,p.jsx)(i.Z,(0,t.pi)({mount:o},{children:(0,p.jsx)(u.H,(0,t.pi)({appear:C,duration:160,height:o?"auto":0,easing:k,className:"zent-collapse-panel__content-box",style:x},{children:(0,p.jsx)("div",(0,t.pi)({className:"zent-collapse-panel__content","data-zv":"9.12.16"},{children:a}),void 0)}),void 0)}),void 0)]}),void 0)},a.defaultProps={showArrow:!0},a.contextType=r.d,a}(e.Component),y=s(19185),f=function(n){function a(){var a=null!==n&&n.apply(this,arguments)||this;return a.onChange=function(n,s){if(a.props.accordion){var t=a.props,p=t.onChange;(o=t.activeKey)!==n&&s?p(n):o!==n||s||p(null)}else{var e=a.props,o=e.activeKey,c=(p=e.onChange,[].concat(null!=o?o:[])),l=c.indexOf(n);s?-1===l&&c.push(n):-1!==l&&c.splice(l,1),p(c)}},a}return(0,t.ZT)(a,n),a.prototype.render=function(){var n=this,a=this.props,s=a.className,o=a.bordered,u=a.panelTitleBackground,i=a.children,k=a.activeKey;return(0,p.jsx)("div",(0,t.pi)({className:c()("zent-collapse",s,{"zent-collapse--has-border":o,"zent-collpase--no-border":!o}),"data-zv":"9.12.16"},{children:e.Children.map(i,(function(a,s){var t;if(!(0,y.isElement)(a)||!(0,l.Z)(a.type,v))throw new Error("Invalid children supplied to Collapse. Each child should be a Panel.");var p=null===(t=a.key)||void 0===t?void 0:t.toString();return(0,e.cloneElement)(a,{onChange:n.onChange,active:b(k,p),panelKey:p,panelTitleBackground:u,isLast:s===e.Children.count(i)-1,bordered:o})}))}),void 0)},a.defaultProps={bordered:!0,panelTitleBackground:"default",accordion:!1},a.Panel=v,a}(e.Component);function b(n,a){return"string"==typeof n?n===a:!!Array.isArray(n)&&void 0!==a&&-1!==n.indexOf(a)}},56377:(n,a,s)=>{"use strict";s.d(a,{r:()=>u});var t=s(59312),p=s(24246),e=s(27378),o=s(60042),c=s.n(o),l=s(1348),u=function(n){function a(){var a=null!==n&&n.apply(this,arguments)||this;return a.toggle=function(){var n=a.props,s=n.onChange,t=n.checked;s&&s(!t)},a}return(0,t.ZT)(a,n),a.prototype.render=function(){var n,a=this.props,s=a.className,t=a.size,e=a.disabled,o=void 0===e?this.context.value:e,l=a.loading,u=a.checked,i=o||l,k=c()(((n={})["zent-switch-"+t]="default"!==t,n["zent-switch-disabled"]=i,n["zent-switch-loading"]=l,n["zent-switch-checked"]=u,n),"zent-switch",s);return(0,p.jsx)("div",{className:k,onClick:i?void 0:this.toggle,"data-zv":"9.12.16"},void 0)},a.defaultProps={size:"default"},a.contextType=l.d,a}(e.Component);a.Z=u},79737:(n,a,s)=>{"use strict";s.d(a,{H:()=>l});var t=s(59312),p=s(24246),e=s(27378),o=s(17127);function c(n,a){n.style.height="number"==typeof a?a+"px":a}var l=function(n){function a(){var a=null!==n&&n.apply(this,arguments)||this;return a.ref=(0,e.createRef)(),a.timer=null,a}return(0,t.ZT)(a,n),a.prototype.componentDidMount=function(){var n=this,a=this.props,s=a.appear,t=a.height,p=a.duration,e=this.ref.current;s&&"auto"===t?(e.style.height="0px",(0,o.tA)((function(){n.props.height===t&&(e.style.height=e.offsetHeight+"px",n.timer=setTimeout((function(){n.timer=null,n.props.height===t&&(e.style.height="auto")}),p))}))):c(e,t)},a.prototype.componentDidUpdate=function(n){var a=this,s=this.props,t=s.height,p=s.duration;if(n.height!==t){null!==this.timer&&(clearTimeout(this.timer),this.timer=null);var e=this.ref.current;if("auto"===n.height)e.style.height=e.offsetHeight+"px",(0,o.tA)((function(){a.props.height===t&&c(e,t)}));else if("auto"===t){var l=e.offsetHeight;e.style.height="auto";var u=e.offsetHeight;e.style.height=l+"px",(0,o.tA)((function(){e.style.height=u+"px",a.timer=setTimeout((function(){a.timer=null,a.props.height===t&&(e.style.height=t)}),p)}))}else c(e,t)}},a.prototype.render=function(){var n=this.props,a=n.duration,s=n.className,e=n.style,o=n.easing,c=n.overflow,l=n.children;return(0,p.jsx)("div",(0,t.pi)({ref:this.ref,className:s,style:(0,t.pi)((0,t.pi)({},e),{transition:"height "+a+"ms "+o,overflow:c}),"data-zv":"9.12.16"},{children:l}),void 0)},a.defaultProps={appear:!1,duration:200,easing:"ease",overflow:"hidden"},a}(e.Component)},12856:(n,a,s)=>{"use strict";var t=s(59312),p=function(n){function a(a){var s=n.call(this,a)||this;return s.state={mounted:a.mount},s}return(0,t.ZT)(a,n),a.prototype.render=function(){var n=this.props.children;return this.state.mounted?n:null},a.getDerivedStateFromProps=function(n,a){return n.mount&&!a.mounted?{mounted:!0}:null},a.defaultProps={mount:!1},a}(s(27378).Component);a.Z=p},31256:(n,a,s)=>{"use strict";function t(n){return null==n}s.d(a,{Z:()=>t})},65922:(n,a,s)=>{"use strict";function t(n,a){return n===a||(null==n?void 0:n.prototype)instanceof a}s.d(a,{Z:()=>t})}}]);