amis-playground
Version:
amis-playground 是一个amis在线代码编辑器可实时预览运行效果
2 lines (1 loc) • 1.71 kB
JavaScript
import{a as C,j as x,k as w,i as E,r as F,R as n,V as N,W as R,Q as y,e as r,U as P,f as v,p as A,q as u,h as G,X as K}from"./index-7c288cb3.js";var U=function(t){C(a,t);function a(e){return t.call(this,e)||this}return a.prototype.handleCollapseChange=function(e,p,d){return x(this,void 0,void 0,function(){var o,s;return w(this,function(l){switch(l.label){case 0:return o=this.props.dispatchEvent,[4,o("change",K(this.props,{activeKeys:e,collapseId:p,collapsed:d}))];case 1:return s=l.sent(),s!=null&&s.prevented?[2]:[2]}})})},a.prototype.render=function(){var e=this.props,p=e.defaultActiveKey,d=e.accordion,o=e.expandIcon,s=e.expandIconPosition,l=e.body,f=e.className,b=e.style,g=e.render,S=e.mobileUI,_=e.data,c=e.id,m=e.themeCss,h=e.wrapperCustomStyle,I=e.env,i=this.props.enableFieldSetStyle;return E(i)&&(i=F(i,_,"| raw")),n.createElement(n.Fragment,null,n.createElement(N,{defaultActiveKey:p,accordion:d,expandIcon:o,expandIconPosition:s,className:R(f,y(r(r({},this.props),{name:"className",id:c,themeCss:m})),y(r(r({},this.props),{name:"wrapperCustomStyle",id:c,themeCss:h}))),style:b,mobileUI:S,onCollapseChange:this.handleCollapseChange},g("body",l||"",{enableFieldSetStyle:i})),n.createElement(P,r({},this.props,{config:{wrapperCustomStyle:h,id:c,themeCss:m,classNames:[{key:"className"}]},env:I})))},a.defaultProps={enableFieldSetStyle:!0},v([A,u("design:type",Function),u("design:paramtypes",[Array,Object,Boolean]),u("design:returntype",Promise)],a.prototype,"handleCollapseChange",null),a}(n.Component),j=function(t){C(a,t);function a(){return t!==null&&t.apply(this,arguments)||this}return a=v([G({type:"collapse-group"})],a),a}(U);export{U as CollapseGroupRender,j as CollapseGroupRenderer};