amis-playground
Version:
amis-playground 是一个amis在线代码编辑器可实时预览运行效果
2 lines (1 loc) • 1.58 kB
JavaScript
import{r as h,i as D,Y as E,a$ as U,e as d,dN as L,R as l,dj as T,bB as $,a as P,d as B,ac as F,f as O,h as W,n as Y}from"./index-7c288cb3.js";function q(e){var a,r=e.className,u=e.style,f=e.steps,n=e.status,_=e.mode,C=e.iconPosition,V=e.labelPlacement,N=e.progressDot,c=e.data,I=e.source,w=e.render,x=e.mobileUI,p=h(I,c,"| raw"),b=(Array.isArray(p)?p:void 0)||f||[],s=D(n)?h(n,c,"| raw"):n,v=function(t){return typeof t=="string"?Y(t,c):t&&w("inner",t)},i=(a=E(e))!==null&&a!==void 0?a:0,y=typeof i=="string"&&isNaN(+i)?U(i,c)||i:+i,S=b.findIndex(function(t){return t.value&&t.value===y}),R=S!==-1?S:y,j=b.map(function(t,m){var o=A(t,m);return d(d({},t),{status:o,title:v(t.title),subTitle:v(t.subTitle),description:v(t.description)})});function A(t,m){var o;if(typeof s=="string")m===R&&(o=s||n||L.process);else if(typeof s=="object"){var g=t.value;g&&s[g]&&(o=s[g])}return o}return l.createElement(T,{current:R,steps:j,className:r,style:u,status:s,mode:_,iconPosition:C,progressDot:N,labelPlacement:V,mobileUI:x})}var z=$()(function(e){P(a,e);function a(){return e!==null&&e.apply(this,arguments)||this}return a.prototype.render=function(){var r=this.props,u=r.config;r.deferLoad,r.loading,r.updateConfig;var f=B(r,["config","deferLoad","loading","updateConfig"]),n=F(u)?u:null;return l.createElement(q,d({},f,n))},a}(l.Component)),H=function(e){P(a,e);function a(){return e!==null&&e.apply(this,arguments)||this}return a.prototype.render=function(){return l.createElement(z,d({},this.props))},a=O([W({type:"steps"})],a),a}(l.Component);export{q as StepsCmpt,H as StepsRenderer};