-
Notifications
You must be signed in to change notification settings - Fork 0
/
106-a28f22da2d828c0b81f9.js
1 lines (1 loc) · 12 KB
/
106-a28f22da2d828c0b81f9.js
1
webpackJsonp([106],{1601:function(n,a,t){"use strict";function s(n){return n&&n.__esModule?n:{default:n}}function e(n){return w.default.createElement(n.tag,(0,g.default)({},n.attributes,{dangerouslySetInnerHTML:{__html:n.html}}))}function o(n){return w.default.createElement(e,{tag:"section",html:n.html,attributes:{className:"zandoc-react-markdown"}})}function p(n){return w.default.createElement(e,{tag:"style",html:n.style})}function c(n,a){for(;n;)return n.offsetTop&&"static"!==getComputedStyle(n).position&&(a+=n.offsetTop),c(n.parentNode,a);return a}Object.defineProperty(a,"__esModule",{value:!0});var l=t(1),r=s(l),u=t(4),i=s(u),d=t(2),m=s(d),k=t(3),h=s(k),f=t(7),g=s(f),b=t(0),w=s(b),y=t(232),v=s(y),E=t(359),z=function(){var n=[{name:"Index",href:"//www.youzan.com"},{name:"Application Center",href:"//www.youzan.com"},{name:"Marteting Center"}];return w.default.createElement(E.Breadcrumb,{breads:n})},B=function(){return w.default.createElement(E.Breadcrumb,null,w.default.createElement(E.Breadcrumb.Item,{name:"Index",href:"//www.youzan.com"}),w.default.createElement(E.Breadcrumb.Item,{name:"Application Center",href:"//www.youzan.com",className:"zent-demo-bread"}),w.default.createElement(E.Breadcrumb.Item,{name:"Marteting Center"}))},_=function(){return w.default.createElement(E.Breadcrumb,null,w.default.createElement(E.Breadcrumb.Item,null,w.default.createElement("a",{href:"//www.youzan.com"},"Index")),w.default.createElement(E.Breadcrumb.Item,null,w.default.createElement("span",null,"Application Center")),w.default.createElement("span",null,"Marteting Center"))},I=function(n){function a(){var n,t,s,e;(0,r.default)(this,a);for(var o=arguments.length,p=Array(o),c=0;c<o;c++)p[c]=arguments[c];return t=s=(0,m.default)(this,(n=a.__proto__||Object.getPrototypeOf(a)).call.apply(n,[this].concat(p))),s.state={showCode:!1},s.toggle=function(){s.setState({showCode:!s.state.showCode})},e=t,(0,m.default)(s,e)}return(0,h.default)(a,n),(0,i.default)(a,[{key:"render",value:function(){var n=this.state.showCode,a=this.props,t=a.title,s=a.src,o=a.children;return w.default.createElement("div",{className:"zandoc-react-demo"},w.default.createElement("div",{className:"zandoc-react-demo__preview"},o),w.default.createElement("div",{className:"zandoc-react-demo__bottom",onClick:this.toggle},w.default.createElement("div",{className:"zandoc-react-demo__title"},w.default.createElement("p",null,t||"")),w.default.createElement("i",{className:"zenticon zenticon-caret-up zandoc-react-demo__toggle "+(n?"zandoc-react-demo__toggle-on":"zandoc-react-demo__toggle-off")})),n&&w.default.createElement("pre",{className:"zandoc-react-demo__code"},w.default.createElement(e,{tag:"code",html:s,attributes:{className:"language-jsx"}})))}}]),a}(b.Component),C=function(n){function a(){return(0,r.default)(this,a),(0,m.default)(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return(0,h.default)(a,n),(0,i.default)(a,[{key:"componentDidMount",value:function(){var n=location.hash;if(n){var a=document.querySelector('a[href="'+n+'"]');a&&(0,v.default)(document.documentElement,0,c(a,-9))}}},{key:"render",value:function(){return w.default.createElement("div",{className:"zandoc-react-container",key:null},w.default.createElement(p,{style:""}),w.default.createElement(o,{html:'<h2 class="anchor-heading"><a href="#breadcrumb">¶</a><a href="javascript:void(0)" id="breadcrumb" class="anchor-point"></a>Breadcrumb</h2>\n<p>Breadcrumb is used to provide a hierarchical navigation structure and mark the current position.</p>\n<h3 class="anchor-heading"><a href="#guide">¶</a><a href="javascript:void(0)" id="guide" class="anchor-point"></a>Guide</h3>\n<ul>\n<li>There\'re more than 2 levels of hierarchy。</li>\n<li>Users need to be told where they are.</li>\n<li>Function of navigating upwards is required.</li>\n</ul>\n<h3 class="anchor-heading"><a href="#demos">¶</a><a href="javascript:void(0)" id="demos" class="anchor-point"></a>Demos</h3>'}),w.default.createElement(I,{title:"Basic Usage",id:"Demobasic",src:'<span class="token keyword">import</span> <span class="token punctuation">{</span> Breadcrumb <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">const</span> dataList <span class="token operator">=</span> <span class="token punctuation">[</span>\n <span class="token punctuation">{</span> name<span class="token punctuation">:</span> <span class="token string">\'Index\'</span><span class="token punctuation">,</span> href<span class="token punctuation">:</span> <span class="token string">\'//www.youzan.com\'</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>\n <span class="token punctuation">{</span> name<span class="token punctuation">:</span> <span class="token string">\'Application Center\'</span><span class="token punctuation">,</span> href<span class="token punctuation">:</span> <span class="token string">\'//www.youzan.com\'</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>\n <span class="token punctuation">{</span> name<span class="token punctuation">:</span> <span class="token string">\'Marteting Center\'</span> <span class="token punctuation">}</span>\n<span class="token punctuation">]</span><span class="token punctuation">;</span>\n\nReactDOM<span class="token punctuation">.</span><span class="token function">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Breadcrumb</span> <span class="token attr-name">breads</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span>dataList<span class="token punctuation">}</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>'},w.default.createElement(z)),w.default.createElement(I,{title:"Breadcrmb.Item can be used directory",id:"Demoitem",src:'<span class="token keyword">import</span> <span class="token punctuation">{</span> Alert<span class="token punctuation">,</span> Icon <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\nReactDOM<span class="token punctuation">.</span><span class="token function">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Breadcrumb</span><span class="token punctuation">></span></span>\n <span class="token operator"><</span>Breadcrumb<span class="token punctuation">.</span>Item name<span class="token operator">=</span><span class="token string">"Index"</span> href<span class="token operator">=</span><span class="token string">"//www.youzan.com"</span> <span class="token operator">/</span><span class="token operator">></span>\n <span class="token operator"><</span>Breadcrumb<span class="token punctuation">.</span>Item name<span class="token operator">=</span><span class="token string">"Application Center"</span> href<span class="token operator">=</span><span class="token string">"//www.youzan.com"</span> className<span class="token operator">=</span><span class="token string">"zent-demo-bread"</span> <span class="token operator">/</span><span class="token operator">></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Breadcrumb.Item</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Marteting Center<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>Breadcrumb</span><span class="token punctuation">></span></span>\n <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span>'},w.default.createElement(B)),w.default.createElement(I,{title:"The content of Breadcrumb.Item is customizable.The whole Breadcrumb can be customized as well.",id:"Democustomitem",src:'<span class="token keyword">import</span> <span class="token punctuation">{</span> Alert<span class="token punctuation">,</span> Icon <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\nReactDOM<span class="token punctuation">.</span><span class="token function">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Breadcrumb</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Breadcrumb.Item</span><span class="token punctuation">></span></span>\n <span class="token operator"><</span>a href<span class="token operator">=</span><span class="token string">"//www.youzan.com"</span><span class="token operator">></span>Index<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 tag"><span class="token tag"><span class="token punctuation"></</span>Breadcrumb.Item</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Breadcrumb.Item</span><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>Application Center<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>Breadcrumb.Item</span><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>Marteting Center<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>Breadcrumb</span><span class="token punctuation">></span></span>\n <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span>'},w.default.createElement(_)),w.default.createElement(o,{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="#breadcrumb">¶</a><a href="javascript:void(0)" id="breadcrumb" class="anchor-point"></a>Breadcrumb</h4>\n<table class="table">\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n<th>Type</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>breads</td>\n<td>data</td>\n<td>array</td>\n<td><code>[]</code></td>\n</tr>\n<tr>\n<td>className</td>\n<td>extra custom class name</td>\n<td>string</td>\n<td><code>\'\'</code></td>\n</tr>\n<tr>\n<td>prefix</td>\n<td>custom prefix</td>\n<td>string</td>\n<td><code>\'zent\'</code></td>\n</tr>\n</tbody>\n</table>\n<h4 class="anchor-heading"><a href="#item">¶</a><a href="javascript:void(0)" id="item" class="anchor-point"></a>Item</h4>\n<table class="table">\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n<th>Type</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>className</td>\n<td>extra custom class name</td>\n<td>string</td>\n<td><code>\'\'</code></td>\n</tr>\n<tr>\n<td>name</td>\n<td>content</td>\n<td>string or React node</td>\n<td>-</td>\n</tr>\n<tr>\n<td>href</td>\n<td>hyperlink</td>\n<td>string</td>\n<td>-</td>\n</tr>\n</tbody>\n</table>'}))}}]),a}(b.Component);a.default=C}});