-
Notifications
You must be signed in to change notification settings - Fork 0
/
26-a28f22da2d828c0b81f9.js
1 lines (1 loc) · 37.3 KB
/
26-a28f22da2d828c0b81f9.js
1
webpackJsonp([26],{1606:function(n,a,s){"use strict";function t(n){return n&&n.__esModule?n:{default:n}}function p(n){return v.default.createElement(n.tag,(0,l.default)({},n.attributes,{dangerouslySetInnerHTML:{__html:n.html}}))}function e(n){return v.default.createElement(p,{tag:"section",html:n.html,attributes:{className:"zandoc-react-markdown"}})}function o(n){return v.default.createElement(p,{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 u=s(7),l=t(u),i=s(1),r=t(i),k=s(4),d=t(k),f=s(2),m=t(f),h=s(3),g=t(h),S=s(0),v=t(S),y=s(232),w=t(y),E=s(359),b=function(){var n=function(n){function a(){var n,s,t,p;(0,r.default)(this,a);for(var e=arguments.length,o=Array(e),c=0;c<e;c++)o[c]=arguments[c];return s=t=(0,m.default)(this,(n=a.__proto__||Object.getPrototypeOf(a)).call.apply(n,[this].concat(o))),t.state={current:1,status:"process"},t.nextStep=function(){var n=t.state,a=n.current,s=n.status;3===a&&"process"===s?s="finish":(a++,a>3&&(a%=3),s="process"),t.setState({current:a,status:s})},p=s,(0,m.default)(t,p)}return(0,g.default)(a,n),(0,d.default)(a,[{key:"render",value:function(){var n=this.state,a=n.current,s=n.status;return v.default.createElement("div",null,v.default.createElement(E.Steps,{current:a,status:s},v.default.createElement(E.Steps.Step,{title:"Step One",description:"Share invitation code for friends"}),v.default.createElement(E.Steps.Step,{title:"Step Two",description:"Enter your invitation code when ordering"}),v.default.createElement(E.Steps.Step,{title:"Step Three",description:"Get a reward for the Youzan E-card"})),v.default.createElement(E.Button,{style:{margin:"10px 0 0 30px"},onClick:this.nextStep},"Next"))}}]),a}(S.Component);return v.default.createElement(n,null)},_=function(){return v.default.createElement(E.Steps,{current:2,status:"error"},v.default.createElement(E.Steps.Step,{title:"Step One",description:"Share invitation code for friends"}),v.default.createElement(E.Steps.Step,{title:"Step Two",description:"Enter your invitation code when ordering"}),v.default.createElement(E.Steps.Step,{title:"Step Three",description:"Get a reward for the Youzan E-card"}))},z=function(){var n=function(n){function a(){var n,s,t,p;(0,r.default)(this,a);for(var e=arguments.length,o=Array(e),c=0;c<e;c++)o[c]=arguments[c];return s=t=(0,m.default)(this,(n=a.__proto__||Object.getPrototypeOf(a)).call.apply(n,[this].concat(o))),t.state={current:1,status:"process"},t.nextStep=function(){var n=t.state,a=n.current,s=n.status;3===a&&"process"===s?s="finish":(a++,a>3&&(a%=3),s="process"),t.setState({current:a,status:s})},p=s,(0,m.default)(t,p)}return(0,g.default)(a,n),(0,d.default)(a,[{key:"render",value:function(){var n=this.state,a=n.current,s=n.status;return v.default.createElement("div",null,v.default.createElement(E.Steps,{current:a,status:s,direction:"vertical"},v.default.createElement(E.Steps.Step,{title:"Step One",description:"Share invitation code for friends"}),v.default.createElement(E.Steps.Step,{title:"Step Two",description:"Enter your invitation code when ordering"}),v.default.createElement(E.Steps.Step,{title:"Step Three",description:"Get a reward for the Youzan E-card"})),v.default.createElement(E.Button,{onClick:this.nextStep},"Next"))}}]),a}(S.Component);return v.default.createElement(n,null)},C=function(){var n=function(n){function a(){var n,s,t,p;(0,r.default)(this,a);for(var e=arguments.length,o=Array(e),c=0;c<e;c++)o[c]=arguments[c];return s=t=(0,m.default)(this,(n=a.__proto__||Object.getPrototypeOf(a)).call.apply(n,[this].concat(o))),t.state={current:1},t.onStepChange=function(n){t.setState({current:n})},p=s,(0,m.default)(t,p)}return(0,g.default)(a,n),(0,d.default)(a,[{key:"render",value:function(){var n=this.state.current;return v.default.createElement(E.Steps,{current:n,type:"breadcrumb",onStepChange:this.onStepChange},v.default.createElement(E.Steps.Step,{title:"Sign in to Youzan"}),v.default.createElement(E.Steps.Step,{title:"Choose a store"}),v.default.createElement(E.Steps.Step,{title:"Bind the store"}),v.default.createElement(E.Steps.Step,{title:"Finish"}))}}]),a}(S.Component);return v.default.createElement(n,null)},x=function(){return v.default.createElement(E.Steps,{current:2,sequence:!1,type:"card"},v.default.createElement(E.Steps.Step,{title:"Step1 - Sign in to Youzan"}),v.default.createElement(E.Steps.Step,{title:"Step2 - Choose a store"}),v.default.createElement(E.Steps.Step,{title:"Step3 - Bind the store"}),v.default.createElement(E.Steps.Step,{title:"Step4 - Finish"}))},T=function(n){function a(){var n,s,t,p;(0,r.default)(this,a);for(var e=arguments.length,o=Array(e),c=0;c<e;c++)o[c]=arguments[c];return s=t=(0,m.default)(this,(n=a.__proto__||Object.getPrototypeOf(a)).call.apply(n,[this].concat(o))),t.state={showCode:!1},t.toggle=function(){t.setState({showCode:!t.state.showCode})},p=s,(0,m.default)(t,p)}return(0,g.default)(a,n),(0,d.default)(a,[{key:"render",value:function(){var n=this.state.showCode,a=this.props,s=a.title,t=a.src,e=a.children;return v.default.createElement("div",{className:"zandoc-react-demo"},v.default.createElement("div",{className:"zandoc-react-demo__preview"},e),v.default.createElement("div",{className:"zandoc-react-demo__bottom",onClick:this.toggle},v.default.createElement("div",{className:"zandoc-react-demo__title"},v.default.createElement("p",null,s||"")),v.default.createElement("i",{className:"zenticon zenticon-caret-up zandoc-react-demo__toggle "+(n?"zandoc-react-demo__toggle-on":"zandoc-react-demo__toggle-off")})),n&&v.default.createElement("pre",{className:"zandoc-react-demo__code"},v.default.createElement(p,{tag:"code",html:t,attributes:{className:"language-jsx"}})))}}]),a}(S.Component),j=function(n){function a(){return(0,r.default)(this,a),(0,m.default)(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return(0,g.default)(a,n),(0,d.default)(a,[{key:"componentDidMount",value:function(){var n=location.hash;if(n){var a=document.querySelector('a[href="'+n+'"]');a&&(0,w.default)(document.documentElement,0,c(a,-9))}}},{key:"render",value:function(){return v.default.createElement("div",{className:"zandoc-react-container",key:null},v.default.createElement(o,{style:""}),v.default.createElement(e,{html:'<h2 class="anchor-heading"><a href="#steps">¶</a><a href="javascript:void(0)" id="steps" class="anchor-point"></a>Steps</h2>\n<p>Steps is suitable for operations that need to be guided step by step.</p>\n<h3 class="anchor-heading"><a href="#demos">¶</a><a href="javascript:void(0)" id="demos" class="anchor-point"></a>Demos</h3>'}),v.default.createElement(T,{title:"Default steps of number type",id:"Demonumberstep",src:'<span class="token keyword">import</span> <span class="token punctuation">{</span> Steps<span class="token punctuation">,</span> Button <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">StepsExample</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>\n state <span class="token operator">=</span> <span class="token punctuation">{</span>\n current<span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>\n status<span class="token punctuation">:</span> <span class="token string">\'process\'</span>\n <span class="token punctuation">}</span>\n\n <span class="token function-variable function">nextStep</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">let</span> <span class="token punctuation">{</span> current<span class="token punctuation">,</span> status <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>state<span class="token punctuation">;</span>\n <span class="token keyword">if</span> <span class="token punctuation">(</span>current <span class="token operator">===</span> <span class="token number">3</span> <span class="token operator">&&</span> status <span class="token operator">===</span> <span class="token string">\'process\'</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n status <span class="token operator">=</span> <span class="token string">\'finish\'</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>\n current<span class="token operator">++</span><span class="token punctuation">;</span>\n <span class="token keyword">if</span> <span class="token punctuation">(</span>current <span class="token operator">></span> <span class="token number">3</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n current <span class="token operator">=</span> current <span class="token operator">%</span> <span class="token number">3</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n status <span class="token operator">=</span> <span class="token string">\'process\'</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n current<span class="token punctuation">,</span>\n status\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">let</span> <span class="token punctuation">{</span> current<span class="token punctuation">,</span> status <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>state<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>Steps</span> <span class="token attr-name">current</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span>current<span class="token punctuation">}</span></span> <span class="token attr-name">status</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span>status<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step One<span class="token punctuation">"</span></span> <span class="token attr-name">description</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Share invitation code for friends<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step Two<span class="token punctuation">"</span></span> <span class="token attr-name">description</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Enter your invitation code when ordering<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step Three<span class="token punctuation">"</span></span> <span class="token attr-name">description</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Get a reward for the Youzan E-card<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>Steps</span><span class="token punctuation">></span></span>\n <span class="token operator"><</span>Button style<span class="token operator">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span> margin<span class="token punctuation">:</span> <span class="token string">\'10px 0 0 30px\'</span> <span class="token punctuation">}</span><span class="token punctuation">}</span> onClick<span class="token operator">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span>nextStep<span class="token punctuation">}</span><span class="token operator">></span>Next<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>Button</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 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>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>StepsExample</span> <span class="token punctuation">/></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},v.default.createElement(b)),v.default.createElement(T,{title:"Steps of failure",id:"Demofailstep",src:'<span class="token keyword">import</span> <span class="token punctuation">{</span> Steps <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>Steps</span> <span class="token attr-name">current</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span><span class="token number">2</span><span class="token punctuation">}</span></span> <span class="token attr-name">status</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>error<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step One<span class="token punctuation">"</span></span> <span class="token attr-name">description</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Share invitation code for friends<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step Two<span class="token punctuation">"</span></span> <span class="token attr-name">description</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Enter your invitation code when ordering<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step Three<span class="token punctuation">"</span></span> <span class="token attr-name">description</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Get a reward for the Youzan E-card<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>Steps</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>'},v.default.createElement(_)),v.default.createElement(T,{title:"Steps of vertical direction",id:"Demoverticalstep",src:'<span class="token keyword">import</span> <span class="token punctuation">{</span> Steps<span class="token punctuation">,</span> Button <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">StepsExample</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>\n state <span class="token operator">=</span> <span class="token punctuation">{</span>\n current<span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>\n status<span class="token punctuation">:</span> <span class="token string">\'process\'</span>\n <span class="token punctuation">}</span>\n\n <span class="token function-variable function">nextStep</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">let</span> <span class="token punctuation">{</span> current<span class="token punctuation">,</span> status <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>state<span class="token punctuation">;</span>\n <span class="token keyword">if</span> <span class="token punctuation">(</span>current <span class="token operator">===</span> <span class="token number">3</span> <span class="token operator">&&</span> status <span class="token operator">===</span> <span class="token string">\'process\'</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n status <span class="token operator">=</span> <span class="token string">\'finish\'</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>\n current<span class="token operator">++</span><span class="token punctuation">;</span>\n <span class="token keyword">if</span> <span class="token punctuation">(</span>current <span class="token operator">></span> <span class="token number">3</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n current <span class="token operator">=</span> current <span class="token operator">%</span> <span class="token number">3</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n status <span class="token operator">=</span> <span class="token string">\'process\'</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n current<span class="token punctuation">,</span>\n status\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">let</span> <span class="token punctuation">{</span> current<span class="token punctuation">,</span> status <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>state<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>Steps</span> <span class="token attr-name">current</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span>current<span class="token punctuation">}</span></span> <span class="token attr-name">status</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span>status<span class="token punctuation">}</span></span> <span class="token attr-name">direction</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>vertical<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step One<span class="token punctuation">"</span></span> <span class="token attr-name">description</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Share invitation code for friends<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step Two<span class="token punctuation">"</span></span> <span class="token attr-name">description</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Enter your invitation code when ordering<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step Three<span class="token punctuation">"</span></span> <span class="token attr-name">description</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Get a reward for the Youzan E-card<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>Steps</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Button</span> <span class="token attr-name">onClick</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span>nextStep<span class="token punctuation">}</span></span><span class="token punctuation">></span></span>Next<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>Button</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 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>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>StepsExample</span> <span class="token punctuation">/></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},v.default.createElement(z)),v.default.createElement(T,{title:"Steps of breadcrumb type",id:"Demobreadcrumbstep",src:'<span class="token keyword">import</span> <span class="token punctuation">{</span> Steps <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">StepsExample</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>\n state <span class="token operator">=</span> <span class="token punctuation">{</span>\n current<span class="token punctuation">:</span> <span class="token number">1</span>\n <span class="token punctuation">}</span>\n\n <span class="token function-variable function">onStepChange</span> <span class="token operator">=</span> <span class="token punctuation">(</span>id<span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n current<span class="token punctuation">:</span> id\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">let</span> <span class="token punctuation">{</span> current <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>state<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>Steps</span> <span class="token attr-name">current</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span>current<span class="token punctuation">}</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>breadcrumb<span class="token punctuation">"</span></span> <span class="token attr-name">onStepChange</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span>onStepChange<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Sign in to Youzan<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Choose a store<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Bind the store<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Finish<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>Steps</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>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>StepsExample</span> <span class="token punctuation">/></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},v.default.createElement(C)),v.default.createElement(T,{title:"Steps of card type which override the step number by `sequence`",id:"Democardstep",src:'<span class="token keyword">import</span> <span class="token punctuation">{</span> Steps <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>Steps</span> <span class="token attr-name">current</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span><span class="token number">2</span><span class="token punctuation">}</span></span> <span class="token attr-name">sequence</span><span class="token script language-javascript"><span class="token punctuation">=</span><span class="token punctuation">{</span><span class="token boolean">false</span><span class="token punctuation">}</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>card<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step1 - Sign in to Youzan<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step2 - Choose a store<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step3 - Bind the store<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>Steps.Step</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Step4 - Finish<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>Steps</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>'},v.default.createElement(x)),v.default.createElement(e,{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="#steps">¶</a><a href="javascript:void(0)" id="steps" class="anchor-point"></a>Steps</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<th>Alternative</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td>The type of steps</td>\n<td>string</td>\n<td><code>\'number\'</code></td>\n<td><code>\'card\'</code>\n, \n<code>\'breadcrumb\'</code></td>\n</tr>\n<tr>\n<td>direction</td>\n<td>The direction of steps, especially for steps of number type.</td>\n<td>string</td>\n<td><code>\'horizontal\'</code></td>\n<td><code>\'vertical\'</code></td>\n</tr>\n<tr>\n<td>current</td>\n<td>The curren step which starts from 1. When this property is not passed, \n<code>current</code>\n is 0 and steps is in status of \n<code>wait</code>\n.</td>\n<td>number</td>\n<td><code>0</code></td>\n<td></td>\n</tr>\n<tr>\n<td>status</td>\n<td>The status of steps.</td>\n<td>string</td>\n<td><code>\'process\'</code></td>\n<td><code>\'wait\'</code>\n, \n<code>\'finish\'</code>\n, \n<code>\'error\'</code></td>\n</tr>\n<tr>\n<td>sequence</td>\n<td>Whether to use the default step number or not</td>\n<td>boolean</td>\n<td><code>true</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onStepChange</td>\n<td>The callback function that is triggered when the steps in cliked and changed, especially for steps of card type and breadcrumb type.</td>\n<td>func</td>\n<td><code>\'\'</code></td>\n<td></td>\n</tr>\n<tr>\n<td>className</td>\n<td>The custom classname</td>\n<td>string</td>\n<td><code>\'\'</code></td>\n<td></td>\n</tr>\n<tr>\n<td>prefix</td>\n<td>The custom prefix</td>\n<td>string</td>\n<td><code>\'zent\'</code></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<h4 class="anchor-heading"><a href="#steps-step">¶</a><a href="javascript:void(0)" id="steps-step" class="anchor-point"></a>Steps.Step</h4>\n<p><code>Steps.Step</code> is each item of the <code>Step</code> component.</p>\n<table class="table">\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>title</td>\n<td>the title of each item in steps</td>\n<td>node</td>\n</tr>\n<tr>\n<td>description</td>\n<td>The details of each item in steps (This propterty is not supported in steps of card type and breadcrumb type. )</td>\n<td>node</td>\n</tr>\n</tbody>\n</table>\n<h3 class="anchor-heading"><a href="#known-issues">¶</a><a href="javascript:void(0)" id="known-issues" class="anchor-point"></a>Known issues</h3>\n<p>This component didn\'t deal with the situation where there is only one step. In fact, you shouldn\'t use this component when there is only one step.</p>'}))}}]),a}(S.Component);a.default=j}});