amis-playground
Version:
amis-playground 是一个amis在线代码编辑器可实时预览运行效果
2 lines (1 loc) • 1.7 kB
JavaScript
import{a as y,n as g,R as p,I as C,e as i,Q as m,U as E,f as d,p as h,q as n,h as _,z as M}from"./index-7c288cb3.js";var N=function(s){y(e,s);function e(){return s!==null&&s.apply(this,arguments)||this}return e.prototype.handleClick=function(t){var a=this.props,o=a.dispatchEvent,r=a.data;o(t,r)},e.prototype.handleMouseEnter=function(t){var a=this.props,o=a.dispatchEvent,r=a.data;o(t,r)},e.prototype.handleMouseLeave=function(t){var a=this.props,o=a.dispatchEvent,r=a.data;o(t,r)},e.prototype.render=function(){var t=this.props,a=t.classnames,o=t.className,r=t.data,c=t.id,u=t.themeCss,v=t.env,f=t.wrapperCustomStyle,l=this.props.icon;return typeof l=="string"&&(l=g(this.props.icon,r)),p.createElement(p.Fragment,null,p.createElement(C,i({},this.props,{icon:l,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,className:a(o,m(i(i({},this.props),{name:"className",id:c,themeCss:u})),m(i(i({},this.props),{name:"wrapperCustomStyle",id:c,themeCss:f})))})),p.createElement(E,i({},this.props,{config:{themeCss:u,classNames:[{key:"className"}],id:c},env:v})))},e.defaultProps={icon:"",vendor:"fa"},d([h,n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",void 0)],e.prototype,"handleClick",null),d([h,n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",void 0)],e.prototype,"handleMouseEnter",null),d([h,n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",void 0)],e.prototype,"handleMouseLeave",null),e}(p.Component),k=function(s){y(e,s);function e(){return s!==null&&s.apply(this,arguments)||this}return e=d([_({type:"icon"}),M],e),e}(N);export{N as Icon,k as IconRenderer};