-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path33-bc4eac5649ec72ccd951.js
1 lines (1 loc) · 14 KB
/
33-bc4eac5649ec72ccd951.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{648:function(n,a,t){"use strict";t.r(a),t.d(a,"default",function(){return j});var s=t(32),e=t.n(s),p=t(28),o=t.n(p),c=t(580),l=t.n(c),u=t(23),i=t.n(u),r=t(24),k=t.n(r),d=t(25),m=t.n(d),h=t(26),g=t.n(h),f=t(27),v=t.n(f),E=t(0),N=t.n(E),y=t(111),b=t(82),z=function(){var n=function(n){function a(){return i()(this,a),m()(this,g()(a).apply(this,arguments))}return v()(a,n),k()(a,[{key:"render",value:function(){return N.a.createElement("div",null,N.a.createElement(b.f,{title:"有赞微商城",tooltip:N.a.createElement("span",null,"test"),position:"top-center"}),N.a.createElement("br",null),N.a.createElement(b.f,{className:"test-class",title:"有赞微商城",position:"top-center",leftContent:N.a.createElement("a",{className:"zent-link",href:"/"},"left content")}),N.a.createElement("br",null),N.a.createElement(b.f,{title:"有赞微商城",tooltip:N.a.createElement("span",null,"test"),position:"top-center",rightContent:N.a.createElement("a",{className:"zent-link",href:"/"},"right content")}),N.a.createElement("br",null),N.a.createElement(b.f,{className:"test-class",title:"有赞微商城",tooltip:N.a.createElement("span",null,"test"),position:"top-center",leftContent:N.a.createElement("a",{className:"zent-link",href:"/"},"left content"),rightContent:N.a.createElement("a",{className:"zent-link",href:"/"},"right content")}))}}]),a}(N.a.Component);return N.a.createElement(n,null)};function C(n){return N.a.createElement(n.tag,l()({},n.attributes,{dangerouslySetInnerHTML:{__html:n.html}}))}function w(n){return N.a.createElement(C,{tag:"section",html:n.html,attributes:{className:"zandoc-react-markdown"}})}function _(n){return N.a.createElement(C,{tag:"style",html:n.style})}var H=function(n){function a(){var n,t;i()(this,a);for(var s=arguments.length,p=new Array(s),c=0;c<s;c++)p[c]=arguments[c];return t=m()(this,(n=g()(a)).call.apply(n,[this].concat(p))),o()(e()(t),"state",{showCode:!1}),o()(e()(t),"toggle",function(){t.setState({showCode:!t.state.showCode})}),t}return v()(a,n),k()(a,[{key:"render",value:function(){var n=this.state.showCode,a=this.props,t=a.title,s=a.src,e=a.children;return N.a.createElement("div",{className:"zandoc-react-demo"},N.a.createElement("div",{className:"zandoc-react-demo__preview"},e),N.a.createElement("div",{className:"zandoc-react-demo__bottom",onClick:this.toggle},N.a.createElement("div",{className:"zandoc-react-demo__title"},N.a.createElement("p",null,t||"")),N.a.createElement("i",{className:"zenticon zenticon-caret-up zandoc-react-demo__toggle ".concat(n?"zandoc-react-demo__toggle-on":"zandoc-react-demo__toggle-off")})),n&&N.a.createElement("pre",{className:"zandoc-react-demo__code"},N.a.createElement(C,{tag:"code",html:s,attributes:{className:"language-jsx"}})))}}]),a}(E.Component),j=function(n){function a(){return i()(this,a),m()(this,g()(a).apply(this,arguments))}return v()(a,n),k()(a,[{key:"componentDidMount",value:function(){var n=location.hash;if(n){var a=document.querySelector('a[href="'.concat(n,'"]'));a&&Object(y.a)(document.documentElement,0,function n(a,t){for(;a;)return a.offsetTop&&"static"!==getComputedStyle(a).position&&(t+=a.offsetTop),n(a.parentNode,t);return t}(a,-9))}}},{key:"render",value:function(){return N.a.createElement("div",{className:"zandoc-react-container",key:null},N.a.createElement(_,{style:""}),N.a.createElement(w,{html:'<h2 class="anchor-heading"><a href="#blockheader-biao-ti">¶</a><a href="javascript:void(0)" id="blockheader-biao-ti" class="anchor-point"></a>BlockHeader 标题</h2>\n<p>这是一个模块标题。</p>\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>'}),N.a.createElement(H,{title:"基础用法",id:"Demobasic",src:'<span class="token keyword">import</span> <span class="token punctuation">{</span> BlockHeader <span class="token punctuation">}</span> <span class="token keyword">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 <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">return</span> <span class="token punctuation">(</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>BlockHeader</span>\n <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>有赞微商城<span class="token punctuation">"</span></span>\n <span class="token attr-name">tooltip={<span</span><span class="token punctuation">></span></span>test<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>span</span><span class="token punctuation">></span></span><span class="token punctuation">}</span>\n position<span class="token operator">=</span><span class="token string">"top-center"</span>\n <span class="token operator">/</span><span class="token operator">></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>br</span> <span class="token punctuation">/></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>BlockHeader</span>\n <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>test-class<span class="token punctuation">"</span></span>\n <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>有赞微商城<span class="token punctuation">"</span></span>\n <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>top-center<span class="token punctuation">"</span></span>\n <span class="token attr-name">leftContent</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>a</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>zent-link<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>/<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n left content\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>a</span><span class="token punctuation">></span></span>\n <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>br</span> <span class="token punctuation">/></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>BlockHeader</span>\n <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>有赞微商城<span class="token punctuation">"</span></span>\n <span class="token attr-name">tooltip={<span</span><span class="token punctuation">></span></span>test<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>span</span><span class="token punctuation">></span></span><span class="token punctuation">}</span>\n position<span class="token operator">=</span><span class="token string">"top-center"</span>\n rightContent<span class="token operator">=</span><span class="token punctuation">{</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>a</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>zent-link<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>/<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n right content\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>a</span><span class="token punctuation">></span></span>\n <span class="token punctuation">}</span>\n <span class="token operator">/</span><span class="token operator">></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>br</span> <span class="token punctuation">/></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>BlockHeader</span>\n <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>test-class<span class="token punctuation">"</span></span>\n <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>有赞微商城<span class="token punctuation">"</span></span>\n <span class="token attr-name">tooltip={<span</span><span class="token punctuation">></span></span>test<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>span</span><span class="token punctuation">></span></span><span class="token punctuation">}</span>\n position<span class="token operator">=</span><span class="token string">"top-center"</span>\n leftContent<span class="token operator">=</span><span class="token punctuation">{</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>a</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>zent-link<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>/<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n left content\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>a</span><span class="token punctuation">></span></span>\n <span class="token punctuation">}</span>\n rightContent<span class="token operator">=</span><span class="token punctuation">{</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>a</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>zent-link<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>/<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n right content\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>a</span><span class="token punctuation">></span></span>\n <span class="token punctuation">}</span>\n <span class="token operator">/</span><span class="token operator">></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 punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n\nReactDOM<span class="token punctuation">.</span><span class="token function">render</span><span class="token punctuation">(</span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Simple</span> <span class="token punctuation">/></span></span><span class="token punctuation">,</span> mountNode<span class="token punctuation">)</span><span class="token punctuation">;</span>'},N.a.createElement(z)),N.a.createElement(w,{html:'<h2 class="anchor-heading"><a href="#api">¶</a><a href="javascript:void(0)" id="api" class="anchor-point"></a>API</h2>\n<table class="table">\n<thead>\n<tr>\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>className</td>\n<td>自定义类名</td>\n<td>string</td>\n<td>\'\'</td>\n<td></td>\n</tr>\n<tr>\n<td>title</td>\n<td>标题</td>\n<td>ReactNode</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>tooltip</td>\n<td>pop 显示内容</td>\n<td>ReactNode</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>position</td>\n<td>pop 显示位置</td>\n<td>string</td>\n<td>\'top-right\'</td>\n<td></td>\n</tr>\n<tr>\n<td>leftContent</td>\n<td>左侧自定义内容</td>\n<td>ReactNode</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>rightContent</td>\n<td>右侧自定义内容</td>\n<td>ReactNode</td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>'}))}}]),a}(E.Component)}}]);