szld-libs 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20789,7 +20789,7 @@ const vN = (v) => new Promise((g) => {
20789
20789
  );
20790
20790
  }, Nw = (v) => {
20791
20791
  const { valueType: g, valueProps: p, value: R, onChange: _, onBtnClick: A, inputRef: S } = v, Q = qm(() => {
20792
- let H = /* @__PURE__ */ Ce(NS, { placeholder: "请输入", ...p, allowClear: !0 });
20792
+ let H = /* @__PURE__ */ Ce(NS, { placeholder: "请输入", allowClear: !0, ...p });
20793
20793
  switch (g) {
20794
20794
  case "rate":
20795
20795
  H = /* @__PURE__ */ Ce(F_, { ...p });
@@ -20808,8 +20808,8 @@ const vN = (v) => new Promise((g) => {
20808
20808
  U_,
20809
20809
  {
20810
20810
  placeholder: "请选择",
20811
- ...p,
20812
- allowClear: !0
20811
+ allowClear: !0,
20812
+ ...p
20813
20813
  }
20814
20814
  );
20815
20815
  break;
@@ -20828,8 +20828,8 @@ const vN = (v) => new Promise((g) => {
20828
20828
  NS.TextArea,
20829
20829
  {
20830
20830
  placeholder: "请输入",
20831
- ...p,
20832
- allowClear: !0
20831
+ allowClear: !0,
20832
+ ...p
20833
20833
  }
20834
20834
  );
20835
20835
  break;
@@ -20844,8 +20844,8 @@ const vN = (v) => new Promise((g) => {
20844
20844
  HT,
20845
20845
  {
20846
20846
  style: { width: "100%" },
20847
- ...p,
20848
- allowClear: !0
20847
+ allowClear: !0,
20848
+ ...p
20849
20849
  }
20850
20850
  );
20851
20851
  break;
@@ -20854,8 +20854,8 @@ const vN = (v) => new Promise((g) => {
20854
20854
  HT.RangePicker,
20855
20855
  {
20856
20856
  style: { width: "100%" },
20857
- ...p,
20858
- allowClear: !0
20857
+ allowClear: !0,
20858
+ ...p
20859
20859
  }
20860
20860
  );
20861
20861
  break;
@@ -20864,8 +20864,8 @@ const vN = (v) => new Promise((g) => {
20864
20864
  N_,
20865
20865
  {
20866
20866
  style: { width: "100%" },
20867
- ...p,
20868
- allowClear: !0
20867
+ allowClear: !0,
20868
+ ...p
20869
20869
  }
20870
20870
  );
20871
20871
  break;
@@ -20873,8 +20873,8 @@ const vN = (v) => new Promise((g) => {
20873
20873
  H = /* @__PURE__ */ Ce(
20874
20874
  O_,
20875
20875
  {
20876
- ...p,
20877
- allowClear: !0
20876
+ allowClear: !0,
20877
+ ...p
20878
20878
  }
20879
20879
  );
20880
20880
  break;
@@ -188,4 +188,4 @@ Check the render method of %s.`,je(tn)||"Unknown"));var m=lu(s,f);m.payload={ele
188
188
 
189
189
  let root = createRoot(domContainer);
190
190
  root.render(<App />);`),t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(u=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var f=ew(e,Qh,null,a,i,u,s);jh(f.current,e);var h=e.nodeType===nn?e.parentNode:e;return Kd(h),new qS(f)}function Km(e){this._internalRoot=e}function qO(e){e&&ph(e)}Km.prototype.unstable_scheduleHydration=qO;function XO(e,t,a){if(!Zm(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");Tw(e),t===void 0&&S("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=a??null,u=a!=null&&a.hydratedSources||null,s=!1,f=!1,h="",m=Ew;a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onRecoverableError!==void 0&&(m=a.onRecoverableError));var C=tw(t,null,e,Qh,i,s,f,h,m);if(jh(C.current,e),Kd(e),u)for(var E=0;E<u.length;E++){var D=u[E];aD(C,D)}return new Km(C)}function Zm(e){return!!(e&&(e.nodeType===Er||e.nodeType===Ma||e.nodeType===kl||!dt))}function $p(e){return!!(e&&(e.nodeType===Er||e.nodeType===Ma||e.nodeType===kl||e.nodeType===nn&&e.nodeValue===" react-mount-point-unstable "))}function Tw(e){e.nodeType===Er&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),op(e)&&(e._reactRootContainer?S("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):S("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var KO=v.ReactCurrentOwner,ww;ww=function(e){if(e._reactRootContainer&&e.nodeType!==nn){var t=rw(e._reactRootContainer.current);t&&t.parentNode!==e&&S("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var a=!!e._reactRootContainer,i=XS(e),u=!!(i&&eo(i));u&&!a&&S("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Er&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function XS(e){return e?e.nodeType===Ma?e.documentElement:e.firstChild:null}function Rw(){}function ZO(e,t,a,i,u){if(u){if(typeof i=="function"){var s=i;i=function(){var x=Xm(f);s.call(x)}}var f=tw(t,i,e,no,null,!1,!1,"",Rw);e._reactRootContainer=f,jh(f.current,e);var h=e.nodeType===nn?e.parentNode:e;return Kd(h),cu(),f}else{for(var m;m=e.lastChild;)e.removeChild(m);if(typeof i=="function"){var C=i;i=function(){var x=Xm(E);C.call(x)}}var E=ew(e,no,null,!1,!1,"",Rw);e._reactRootContainer=E,jh(E.current,e);var D=e.nodeType===nn?e.parentNode:e;return Kd(D),cu(function(){Ip(t,E,a,i)}),E}}function JO(e,t){e!==null&&typeof e!="function"&&S("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function Jm(e,t,a,i,u){ww(a),JO(u===void 0?null:u,"render");var s=a._reactRootContainer,f;if(!s)f=ZO(a,t,e,u,i);else{if(f=s,typeof u=="function"){var h=u;u=function(){var m=Xm(f);h.call(m)}}Ip(t,f,e,u)}return Xm(f)}function eN(e){{var t=KO.current;if(t!==null&&t.stateNode!==null){var a=t.stateNode._warnedAboutRefsInRender;a||S("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Rt(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Er?e:HO(e,"findDOMNode")}function tN(e,t,a){if(S("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!$p(t))throw new Error("Target container is not a DOM element.");{var i=op(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return Jm(null,e,t,!0,a)}function nN(e,t,a){if(S("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!$p(t))throw new Error("Target container is not a DOM element.");{var i=op(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return Jm(null,e,t,!1,a)}function rN(e,t,a,i){if(S("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!$p(a))throw new Error("Target container is not a DOM element.");if(e==null||!Vo(e))throw new Error("parentComponent must be a valid React Component");return Jm(e,t,a,!1,i)}function aN(e){if(!$p(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=op(e)&&e._reactRootContainer===void 0;t&&S("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var a=XS(e),i=a&&!eo(a);i&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return cu(function(){Jm(null,null,e,!1,function(){e._reactRootContainer=null,CC(e)})}),!0}else{{var u=XS(e),s=!!(u&&eo(u)),f=e.nodeType===Er&&$p(e.parentNode)&&!!e.parentNode._reactRootContainer;s&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",f?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}de(jO),uh(VO),ts(BO),Ld(va),sh(Zo),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&S("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Bv(ux),Xs(kS,X_,cu);function iN(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Zm(t))throw new Error("Target container is not a DOM element.");return FO(e,t,null,a)}function lN(e,t,a,i){return rN(e,t,a,i)}var KS={usingClientEntryPoint:!1,Events:[eo,Zc,Vh,qs,Fo,kS]};function uN(e,t){return KS.usingClientEntryPoint||S('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),GO(e,t)}function oN(e,t,a){return KS.usingClientEntryPoint||S('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),XO(e,t,a)}function sN(e){return LT()&&S("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),cu(e)}var cN=WO({findFiberByHostInstance:fs,bundleType:1,version:$S,rendererPackageName:"react-dom"});if(!cN&&Sn&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var bw=window.location.protocol;/^(https?|file):$/.test(bw)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(bw==="file:"?`
191
- You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Jr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KS,Jr.createPortal=iN,Jr.createRoot=uN,Jr.findDOMNode=eN,Jr.flushSync=sN,Jr.hydrate=tN,Jr.hydrateRoot=oN,Jr.render=nN,Jr.unmountComponentAtNode=aN,Jr.unstable_batchedUpdates=kS,Jr.unstable_renderSubtreeIntoContainer=lN,Jr.version=$S,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jr}(function(p){function g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(v){console.error(v)}}}process.env.NODE_ENV==="production"?(g(),p.exports=tb()):p.exports=nb()})(ZR);const rb=p=>new Promise(g=>{const v=new FileReader;v.onloadend=R=>g(R.target.result),v.readAsDataURL(p)}),ab=p=>new Promise(g=>{const v=new Image;v.onload=()=>g(v),v.src=p}),ib=(p,g,v)=>new Promise(R=>p.toBlob(_=>R(_),g,v)),lb=p=>{const R=p.width,_=p.height;let A=p.width,S=p.height;return(R>1400||_>1400)&&(R/_>1400/1400?(A=1400,S=Math.round(1400*(_/R))):(S=1400,A=Math.round(1400*(R/_)))),{width:A,height:S}},ub=async(p,g="image/jpeg",v=.5,R=300)=>{const _=p.name;if(p.size/1024<R)return p;const A=document.createElement("canvas"),S=A.getContext("2d"),Q=await rb(p),H=await ab(Q),j=lb(H);A.width=j.width,A.height=j.height,S.clearRect(0,0,j.width,j.height),S.drawImage(H,0,0,j.width,j.height);const K=await ib(A,g,v);return new File([K],_,{type:g})},H1=[Ds.jpeg,Ds.jpg,Ds.png],j1=p=>{const{maxCount:g=1,listType:v="picture-card",fileList:R=[],maxSize:_=2,accept:A=H1.join(","),uploadBtnName:S="上传",uploadHint:Q=null,compression:H}=p,[j,K]=at.useState(!1),[G,ie]=at.useState(""),ae=()=>v!=="text"?un("div",{style:{position:"relative"},children:[un("div",{children:[Ce(OR,{}),Ce("div",{style:{marginTop:8},children:S})]}),Q]}):un(Wp,{children:[Ce(Qe.Button,{icon:Ce(AR,{}),children:S}),Q]}),Ue=Se=>new Promise((it,Pe)=>{const Tt=A.split(","),Ie=Jp(Se.name)||"";A&&!Tt.includes(Ie)&&(Qe.message.error(`只允许上传 ${A} 文件`),Pe(!1)),Se.size/1024/1024<_||(Qe.message.error(`文件必须小于${_}MB`),Pe(!1)),H&&it(ub(Se,H.type,H.quality,H.limit)),it(Se)}).catch(it=>Qe.Upload.LIST_IGNORE),Je=Se=>{p.onChange&&p.onChange(Se)},qe=Se=>{p.onPreview?p.onPreview(Se):Yt(Se)},Yt=async Se=>{let ze=Jp(Se.name)||"";if(ze||(ze=Jp(Se.name||Se.url)||""),ze===Ds.pdf)return Qe.Modal.info({title:"PDF",width:"60%",content:Ce("iframe",{title:"PDF预览",src:Se.url||Se.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});H1.includes(ze)&&(!Se.url&&!Se.thumbUrl&&!Se.preview&&(Se.preview=await N1(Se.originFileObj)),ie(Se.url||Se.thumbUrl||Se.preview),K(!0))};return un(Wp,{children:[Ce(Qe.Upload,{beforeUpload:Ue,onChange:Je,listType:v,...p,onPreview:qe,children:R.length>=g?null:ae()}),Ce(Qe.Image,{style:{display:"none"},preview:{visible:j,src:G,onVisibleChange:()=>{K(!1),ie("")}}})]})},ev={fieldModal:"create-form-module_fieldModal_8bf3d",content:"create-form-module_content_61f84",suffix:"create-form-module_suffix_42205",placeholder:"create-form-module_placeholder_90d6a"},ob={labelCol:{span:4},wrapperCol:{span:20}},V1=p=>{switch(p){case"upload":return"fileList";case"switch":return"checked";default:return"value"}},B1=p=>{const{items:g,rowProps:v,formProps:R,readonly:_=!1,hiddenTitle:A=!1}=p,S=(j,K)=>{var G,ie;if(K.btnType==="submit"){(G=R==null?void 0:R.form)==null||G.validateFields().then(ae=>{K.onClick&&K.onClick(ae)});return}if(K.btnType==="reset"){(ie=R==null?void 0:R.form)==null||ie.resetFields(),K.onClick&&K.onClick(j);return}K.btnType==="cancel"&&K.onClick&&K.onClick(j)},Q=j=>Array.isArray(j)?j:j&&j.fileList,H=j=>{var G;const K=R==null?void 0:R.initialValues;return j.dataIndex?((G=j.render)==null?void 0:G.call(j,K==null?void 0:K[j.dataIndex],K))||j.value||(K==null?void 0:K[j.dataIndex]):""};return Ce(Qe.Form,{layout:"horizontal",form:R==null?void 0:R.form,...ob,...R||{},children:Ce(Qe.Row,{gutter:16,...v,children:g.filter(j=>!j.hidden).map((j,K)=>Ce(Qe.Col,{...j.colProps||{span:24},children:Ce(Qe.Form.Item,{...j.valueType==="upload"?{getValueFromEvent:Q}:{},label:A?"":j.title,name:j.valueType==="btns"?void 0:j.dataIndex,...j.formItemProps,children:j.readonly?Ce("div",{children:H(j)}):j.readonly===void 0&&_?Ce("div",{children:H(j)}):Ce(P1,{onChange:G=>{var ie;return(ie=j==null?void 0:j.onChange)==null?void 0:ie.call(j,G)},valueType:j.valueType,onBtnClick:S,valueProps:j.valueProps})})},j.dataIndex||K))})})},P1=p=>{const{valueType:g,valueProps:v,value:R,onChange:_,onBtnClick:A,inputRef:S}=p,Q=at.useMemo(()=>{let H=Ce(Qe.Input,{placeholder:"请输入",...v,allowClear:!0});switch(g){case"rate":H=Ce(Qe.Rate,{...v});break;case"password":H=Ce(Qe.Input.Password,{...v});break;case"modal":H=Ce(sb,{...v});break;case"checkbox":H=Ce(Qe.Checkbox.Group,{...v});break;case"select":H=Ce(Qe.Select,{placeholder:"请选择",...v,allowClear:!0});break;case"inputNumber":H=Ce(Qe.InputNumber,{style:{width:"100%"},placeholder:"请输入",...v});break;case"textarea":H=Ce(Qe.Input.TextArea,{placeholder:"请输入",...v,allowClear:!0});break;case"radio":H=Ce(Qe.Radio.Group,{...v});break;case"switch":H=Ce(Qe.Switch,{...v});break;case"datePicker":H=Ce(Qe.DatePicker,{style:{width:"100%"},...v,allowClear:!0});break;case"rangePicker":H=Ce(Qe.DatePicker.RangePicker,{style:{width:"100%"},...v,allowClear:!0});break;case"timePicker":H=Ce(Qe.TimePicker,{style:{width:"100%"},...v,allowClear:!0});break;case"cascader":H=Ce(Qe.Cascader,{...v,allowClear:!0});break;case"upload":H=Ce(j1,{...v});break;case"btns":H=Ce(Qe.Space,{children:v==null?void 0:v.map(j=>at.createElement(Qe.Button,{type:j.btnType==="submit"?"primary":"default",...Rf.omit(j,["btnType"]),key:j.key||j.btnType,onClick:K=>{A==null||A(K,j)}},j.title||j.children))});break}return H},[g,v,_,R]);if(g==="custom"){const H=v;return at.cloneElement(H.children,{[V1(g||"input")]:R,onChange:_,ref:S})}return at.cloneElement(Q,{[V1(g||"input")]:R,onChange:_,ref:S})},sb=p=>{const{placeholder:g,labelKey:v,onToggle:R,value:_,onClear:A,className:S,style:Q}=p;return un("div",{className:[ev.fieldModal,S].filter(H=>H).join(" "),style:Q,children:[Ce("div",{className:ev.content,onClick:()=>R(!0),children:_?Ce("span",{children:_[v]}):Ce("span",{className:ev.placeholder,children:g})}),Ce("span",{className:ev.suffix,onClick:A,children:_&&Ce(RR,{})})]})},cb={search:"search-table-module_search_17add"};function fb(p){const{tableProps:g={},searchProps:v}=p,{columns:R=[],minColumnWidth:_=200,...A}=g;return un(Wp,{children:[v&&Ce(B1,{hiddenTitle:!0,...v,items:v.items}),Ce(Qe.Table,{columns:R.filter(S=>!S.hidden).map(S=>({...S,width:S.width||_})),scroll:{x:R.filter(S=>!S.hidden).reduce((S,Q)=>S+(typeof Q.width=="number"?Q.width:_),0)},...A,className:kf(cb.table,g==null?void 0:g.className),pagination:typeof(g==null?void 0:g.pagination)=="boolean"?g.pagination:{hideOnSinglePage:!0,showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:S=>`共 ${S} 条`,...g==null?void 0:g.pagination}})]})}const db={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},I1=at.createContext(null),pb=({index:p,...g})=>{const[v]=Qe.Form.useForm();return Ce(Qe.Form,{form:v,component:!1,children:Ce(I1.Provider,{value:v,children:Ce("tr",{...g})})})};function vb(p){console.log(p,"props");const{title:g,editable:v,children:R,dataIndex:_,record:A,rules:S,onChange:Q,type:H="input",valueProps:j,...K}=p,G=at.useRef(null),ie=at.useContext(I1),ae=async()=>{try{const qe=await ie.validateFields();Q({...A,...qe})}catch(qe){console.log("Save failed:",qe)}},Ue=()=>Ce(P1,{valueType:H,valueProps:{...j,onBlur:ae,onPressEnter:ae},inputRef:G});let Je=R;return v&&(Je=Ce(Qe.Form.Item,{style:{margin:0},initialValue:A[_],name:_,rules:S,children:Ue()})),Ce("td",{children:Je})}function hb(p){const{columns:g,onChange:v,...R}=p,_={body:{row:pb,cell:vb}},A=g==null?void 0:g.map(S=>S.editable?{...S,onCell:Q=>({...S,record:Q,onChange:v})}:S);return Ce(Qe.Table,{...R,components:_,rowClassName:()=>db.editableRow,columns:A})}const $1=p=>{const{auth:g=!0,...v}=p;return g?Ce(Qe.Button,{...v}):null},mb=p=>{const{PId:g,auths:v,...R}=p,_=at.useMemo(()=>!!(v&&v.find(A=>A.PId===g)),[g,v]);return Ce($1,{...R,auth:_})},On={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},yb=p=>{const{data:g,current:v,rowKey:R,renderContent:_}=p,[A,S]=at.useState(!1),Q=at.useMemo(()=>p.currentIndex!==void 0?p.currentIndex:!v||g.length===0?0:g.findIndex(G=>G.PNId===v),[v,g]),H=at.useMemo(()=>Q>1?A?0:Q-1:0,[Q,A]),j=()=>{S(!0)};return un("ul",{className:On.main,children:[Q>1&&!A&&un("li",{className:kf(On.item,On.itemDone),children:[Ce("div",{className:On.tail}),Ce("div",{className:On.node}),Ce("div",{className:On.content,children:un("div",{className:On.collpase,children:[un("div",{children:["已收起",Ce("span",{children:Q-1}),"个节点"]}),un("a",{className:On.btn,onClick:j,children:["展开节点",Ce(kR,{})]})]})})]}),g.slice(H).map((K,G)=>un("li",{className:kf(On.item,Q===G+H?On.itemActive:Q>G+H?On.itemDone:On.itemUnDo),children:[Ce("div",{className:On.tail}),Ce("div",{className:On.node}),un("div",{className:On.content,children:[_?_(K,G,A?Q:Q-H):un(Wp,{children:[Ce("div",{className:On.title,children:K.PNName}),un("div",{className:On.dateWrapper,children:[K.PlanFinishDate&&un("span",{children:["预计完成时间: ",K.PlanFinishDate]}),K.UpdateTime&&un("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",K.UpdateTime]})]}),K.Remark&&Ce("div",{className:On.remark,children:K.Remark})]}),A&&Q-1===G&&un("a",{className:On.btn,onClick:()=>S(!1),children:["收起节点 ",Ce(LR,{})]})]})]},typeof R=="string"?K[R]:R(K)))]})},gb=p=>{const{current:g,data:v,rowKey:R,renderContent:_,currentIndex:A,...S}=p;return(()=>{Qe.Modal.info({icon:null,title:"流程节点",width:700,content:Ce(yb,{rowKey:R,renderContent:_,current:g,currentIndex:A,data:v}),closable:!0,footer:null,maskClosable:!0,...S})})(),null},Sb=(p,g)=>{const v=new URL(p),R=new URL(g);return v.protocol===R.protocol&&v.host===R.host&&v.port===R.port},Cb=p=>{const g=String(p).split("/");return g[g.length-1]},Eb=p=>{var v;return(v=p.headers.get("content-disposition"))==null?void 0:v.split(";")[1].split("=")[1]},Tb=(p,g)=>{const v=g||Cb(p);if(Sb(p,window.location.href)){Cy(p,v);return}let R=g;fetch(p,{method:"get"}).then(_=>(R||(R=Eb(_)),_.blob())).then(_=>{Y1(_,R||v)}).catch(()=>{Cy(p,"")})},wb=p=>{for(var g=p.split(","),v=g[0].match(/:(.*?);/)[1],R=window.atob(g[1]),_=R.length,A=new Uint8Array(_);_--;)A[_]=R.charCodeAt(_);return new Blob([A],{type:v})},Y1=(p,g)=>{let v="";p instanceof Blob?v=window.URL.createObjectURL(p):v=window.URL.createObjectURL(wb(p));const R=window.navigator;if(R.msSaveOrOpenBlob){R.msSaveOrOpenBlob(p,g);return}Cy(v,g),window.URL.revokeObjectURL(v)},Cy=(p,g)=>{let v=document.createElement("a");v.style.display="none",v.href=p,v.target="_blank",v.download=g,document.body.appendChild(v),v.click(),document.body.removeChild(v)},Rb=Object.freeze(Object.defineProperty({__proto__:null,downloadUrl:Tb,downloadBlob:Y1},Symbol.toStringTag,{value:"Module"}));class bb{constructor(g){xw(this,"options",{id:"",canvasId:"verifyCanvas",width:100,height:30,type:"blend",code:""});this.options=g}GVerify(){this.options.numArr="0,1,2,3,4,5,6,7,8,9".split(","),this.options.letterArr=this.getAllLetter(),this._init(),this.refresh()}_init(){const g=document.getElementById(this.options.id),v=document.createElement("canvas");v.id=this.options.canvasId,v.width=Number(this.options.width),v.height=Number(this.options.height),v.style.cursor="pointer",v.innerHTML="您的浏览器版本不支持canvas",g&&g.appendChild(v),v.onclick=()=>{this.refresh()}}refresh(){this.options.code="";const g=document.getElementById(this.options.canvasId);let v,R=[];if(g.getContext)v=g.getContext("2d");else return;v.textBaseline="middle",v.fillStyle=this.randomColor(180,240),v.fillRect(0,0,this.options.width,this.options.height),this.options.type=="blend"?R=this.options.numArr.concat(this.options.letterArr):this.options.type=="number"?R=this.options.numArr:R=this.options.letterArr;for(let _=1;_<=4;_++){const A=R[this.randomNum(0,R.length)];this.options.code+=A,v.font="20px SimHei",v.fillStyle=this.randomColor(50,160),v.shadowBlur=this.randomNum(-3,3),v.shadowColor="rgba(0, 0, 0, 0.3)";const S=Number(this.options.width)/5*_,Q=Number(this.options.height)/2,H=this.randomNum(-30,30);v.translate(S,Q),v.rotate(H*Math.PI/180),v.fillText(A,0,0),v.rotate(-H*Math.PI/180),v.translate(-S,-Q)}for(let _=0;_<2;_++)v.strokeStyle=this.randomColor(40,180),v.beginPath(),v.moveTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height)/2)),v.lineTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height))),v.stroke();for(let _=0;_<Number(this.options.width)/10;_++)v.fillStyle=this.randomColor(0,255),v.beginPath(),v.arc(this.randomNum(0,this.options.width),this.randomNum(0,this.options.height),1,0,2*Math.PI),v.fill()}validate(g){const v=g.toLowerCase(),R=this.options.code.toLowerCase();return v==R}getAllLetter(){return"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z".split(",")}randomNum(g,v){return Math.floor(Math.random()*(v-g)+g)}randomColor(g,v){const R=this.randomNum(g,v),_=this.randomNum(g,v),A=this.randomNum(g,v);return"rgb("+R+","+_+","+A+")"}}const xb=Object.freeze(Object.defineProperty({__proto__:null,getGVerify:bb},Symbol.toStringTag,{value:"Module"}));_t.AuthButton=$1,_t.BackHeader=jR,_t.CoralButton=mb,_t.CreateForm=B1,_t.EditTable=hb,_t.SearchTable=fb,_t.UploadFile=j1,_t.download=Rb,_t.fileType=VR,_t.showWorkFlow=gb,_t.utils=KR,_t.verfyCode=xb,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
191
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Jr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KS,Jr.createPortal=iN,Jr.createRoot=uN,Jr.findDOMNode=eN,Jr.flushSync=sN,Jr.hydrate=tN,Jr.hydrateRoot=oN,Jr.render=nN,Jr.unmountComponentAtNode=aN,Jr.unstable_batchedUpdates=kS,Jr.unstable_renderSubtreeIntoContainer=lN,Jr.version=$S,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jr}(function(p){function g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(v){console.error(v)}}}process.env.NODE_ENV==="production"?(g(),p.exports=tb()):p.exports=nb()})(ZR);const rb=p=>new Promise(g=>{const v=new FileReader;v.onloadend=R=>g(R.target.result),v.readAsDataURL(p)}),ab=p=>new Promise(g=>{const v=new Image;v.onload=()=>g(v),v.src=p}),ib=(p,g,v)=>new Promise(R=>p.toBlob(_=>R(_),g,v)),lb=p=>{const R=p.width,_=p.height;let A=p.width,S=p.height;return(R>1400||_>1400)&&(R/_>1400/1400?(A=1400,S=Math.round(1400*(_/R))):(S=1400,A=Math.round(1400*(R/_)))),{width:A,height:S}},ub=async(p,g="image/jpeg",v=.5,R=300)=>{const _=p.name;if(p.size/1024<R)return p;const A=document.createElement("canvas"),S=A.getContext("2d"),Q=await rb(p),H=await ab(Q),j=lb(H);A.width=j.width,A.height=j.height,S.clearRect(0,0,j.width,j.height),S.drawImage(H,0,0,j.width,j.height);const K=await ib(A,g,v);return new File([K],_,{type:g})},H1=[Ds.jpeg,Ds.jpg,Ds.png],j1=p=>{const{maxCount:g=1,listType:v="picture-card",fileList:R=[],maxSize:_=2,accept:A=H1.join(","),uploadBtnName:S="上传",uploadHint:Q=null,compression:H}=p,[j,K]=at.useState(!1),[G,ie]=at.useState(""),ae=()=>v!=="text"?un("div",{style:{position:"relative"},children:[un("div",{children:[Ce(OR,{}),Ce("div",{style:{marginTop:8},children:S})]}),Q]}):un(Wp,{children:[Ce(Qe.Button,{icon:Ce(AR,{}),children:S}),Q]}),Ue=Se=>new Promise((it,Pe)=>{const Tt=A.split(","),Ie=Jp(Se.name)||"";A&&!Tt.includes(Ie)&&(Qe.message.error(`只允许上传 ${A} 文件`),Pe(!1)),Se.size/1024/1024<_||(Qe.message.error(`文件必须小于${_}MB`),Pe(!1)),H&&it(ub(Se,H.type,H.quality,H.limit)),it(Se)}).catch(it=>Qe.Upload.LIST_IGNORE),Je=Se=>{p.onChange&&p.onChange(Se)},qe=Se=>{p.onPreview?p.onPreview(Se):Yt(Se)},Yt=async Se=>{let ze=Jp(Se.name)||"";if(ze||(ze=Jp(Se.name||Se.url)||""),ze===Ds.pdf)return Qe.Modal.info({title:"PDF",width:"60%",content:Ce("iframe",{title:"PDF预览",src:Se.url||Se.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});H1.includes(ze)&&(!Se.url&&!Se.thumbUrl&&!Se.preview&&(Se.preview=await N1(Se.originFileObj)),ie(Se.url||Se.thumbUrl||Se.preview),K(!0))};return un(Wp,{children:[Ce(Qe.Upload,{beforeUpload:Ue,onChange:Je,listType:v,...p,onPreview:qe,children:R.length>=g?null:ae()}),Ce(Qe.Image,{style:{display:"none"},preview:{visible:j,src:G,onVisibleChange:()=>{K(!1),ie("")}}})]})},ev={fieldModal:"create-form-module_fieldModal_8bf3d",content:"create-form-module_content_61f84",suffix:"create-form-module_suffix_42205",placeholder:"create-form-module_placeholder_90d6a"},ob={labelCol:{span:4},wrapperCol:{span:20}},V1=p=>{switch(p){case"upload":return"fileList";case"switch":return"checked";default:return"value"}},B1=p=>{const{items:g,rowProps:v,formProps:R,readonly:_=!1,hiddenTitle:A=!1}=p,S=(j,K)=>{var G,ie;if(K.btnType==="submit"){(G=R==null?void 0:R.form)==null||G.validateFields().then(ae=>{K.onClick&&K.onClick(ae)});return}if(K.btnType==="reset"){(ie=R==null?void 0:R.form)==null||ie.resetFields(),K.onClick&&K.onClick(j);return}K.btnType==="cancel"&&K.onClick&&K.onClick(j)},Q=j=>Array.isArray(j)?j:j&&j.fileList,H=j=>{var G;const K=R==null?void 0:R.initialValues;return j.dataIndex?((G=j.render)==null?void 0:G.call(j,K==null?void 0:K[j.dataIndex],K))||j.value||(K==null?void 0:K[j.dataIndex]):""};return Ce(Qe.Form,{layout:"horizontal",form:R==null?void 0:R.form,...ob,...R||{},children:Ce(Qe.Row,{gutter:16,...v,children:g.filter(j=>!j.hidden).map((j,K)=>Ce(Qe.Col,{...j.colProps||{span:24},children:Ce(Qe.Form.Item,{...j.valueType==="upload"?{getValueFromEvent:Q}:{},label:A?"":j.title,name:j.valueType==="btns"?void 0:j.dataIndex,...j.formItemProps,children:j.readonly?Ce("div",{children:H(j)}):j.readonly===void 0&&_?Ce("div",{children:H(j)}):Ce(P1,{onChange:G=>{var ie;return(ie=j==null?void 0:j.onChange)==null?void 0:ie.call(j,G)},valueType:j.valueType,onBtnClick:S,valueProps:j.valueProps})})},j.dataIndex||K))})})},P1=p=>{const{valueType:g,valueProps:v,value:R,onChange:_,onBtnClick:A,inputRef:S}=p,Q=at.useMemo(()=>{let H=Ce(Qe.Input,{placeholder:"请输入",allowClear:!0,...v});switch(g){case"rate":H=Ce(Qe.Rate,{...v});break;case"password":H=Ce(Qe.Input.Password,{...v});break;case"modal":H=Ce(sb,{...v});break;case"checkbox":H=Ce(Qe.Checkbox.Group,{...v});break;case"select":H=Ce(Qe.Select,{placeholder:"请选择",allowClear:!0,...v});break;case"inputNumber":H=Ce(Qe.InputNumber,{style:{width:"100%"},placeholder:"请输入",...v});break;case"textarea":H=Ce(Qe.Input.TextArea,{placeholder:"请输入",allowClear:!0,...v});break;case"radio":H=Ce(Qe.Radio.Group,{...v});break;case"switch":H=Ce(Qe.Switch,{...v});break;case"datePicker":H=Ce(Qe.DatePicker,{style:{width:"100%"},allowClear:!0,...v});break;case"rangePicker":H=Ce(Qe.DatePicker.RangePicker,{style:{width:"100%"},allowClear:!0,...v});break;case"timePicker":H=Ce(Qe.TimePicker,{style:{width:"100%"},allowClear:!0,...v});break;case"cascader":H=Ce(Qe.Cascader,{allowClear:!0,...v});break;case"upload":H=Ce(j1,{...v});break;case"btns":H=Ce(Qe.Space,{children:v==null?void 0:v.map(j=>at.createElement(Qe.Button,{type:j.btnType==="submit"?"primary":"default",...Rf.omit(j,["btnType"]),key:j.key||j.btnType,onClick:K=>{A==null||A(K,j)}},j.title||j.children))});break}return H},[g,v,_,R]);if(g==="custom"){const H=v;return at.cloneElement(H.children,{[V1(g||"input")]:R,onChange:_,ref:S})}return at.cloneElement(Q,{[V1(g||"input")]:R,onChange:_,ref:S})},sb=p=>{const{placeholder:g,labelKey:v,onToggle:R,value:_,onClear:A,className:S,style:Q}=p;return un("div",{className:[ev.fieldModal,S].filter(H=>H).join(" "),style:Q,children:[Ce("div",{className:ev.content,onClick:()=>R(!0),children:_?Ce("span",{children:_[v]}):Ce("span",{className:ev.placeholder,children:g})}),Ce("span",{className:ev.suffix,onClick:A,children:_&&Ce(RR,{})})]})},cb={search:"search-table-module_search_17add"};function fb(p){const{tableProps:g={},searchProps:v}=p,{columns:R=[],minColumnWidth:_=200,...A}=g;return un(Wp,{children:[v&&Ce(B1,{hiddenTitle:!0,...v,items:v.items}),Ce(Qe.Table,{columns:R.filter(S=>!S.hidden).map(S=>({...S,width:S.width||_})),scroll:{x:R.filter(S=>!S.hidden).reduce((S,Q)=>S+(typeof Q.width=="number"?Q.width:_),0)},...A,className:kf(cb.table,g==null?void 0:g.className),pagination:typeof(g==null?void 0:g.pagination)=="boolean"?g.pagination:{hideOnSinglePage:!0,showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:S=>`共 ${S} 条`,...g==null?void 0:g.pagination}})]})}const db={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},I1=at.createContext(null),pb=({index:p,...g})=>{const[v]=Qe.Form.useForm();return Ce(Qe.Form,{form:v,component:!1,children:Ce(I1.Provider,{value:v,children:Ce("tr",{...g})})})};function vb(p){console.log(p,"props");const{title:g,editable:v,children:R,dataIndex:_,record:A,rules:S,onChange:Q,type:H="input",valueProps:j,...K}=p,G=at.useRef(null),ie=at.useContext(I1),ae=async()=>{try{const qe=await ie.validateFields();Q({...A,...qe})}catch(qe){console.log("Save failed:",qe)}},Ue=()=>Ce(P1,{valueType:H,valueProps:{...j,onBlur:ae,onPressEnter:ae},inputRef:G});let Je=R;return v&&(Je=Ce(Qe.Form.Item,{style:{margin:0},initialValue:A[_],name:_,rules:S,children:Ue()})),Ce("td",{children:Je})}function hb(p){const{columns:g,onChange:v,...R}=p,_={body:{row:pb,cell:vb}},A=g==null?void 0:g.map(S=>S.editable?{...S,onCell:Q=>({...S,record:Q,onChange:v})}:S);return Ce(Qe.Table,{...R,components:_,rowClassName:()=>db.editableRow,columns:A})}const $1=p=>{const{auth:g=!0,...v}=p;return g?Ce(Qe.Button,{...v}):null},mb=p=>{const{PId:g,auths:v,...R}=p,_=at.useMemo(()=>!!(v&&v.find(A=>A.PId===g)),[g,v]);return Ce($1,{...R,auth:_})},On={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},yb=p=>{const{data:g,current:v,rowKey:R,renderContent:_}=p,[A,S]=at.useState(!1),Q=at.useMemo(()=>p.currentIndex!==void 0?p.currentIndex:!v||g.length===0?0:g.findIndex(G=>G.PNId===v),[v,g]),H=at.useMemo(()=>Q>1?A?0:Q-1:0,[Q,A]),j=()=>{S(!0)};return un("ul",{className:On.main,children:[Q>1&&!A&&un("li",{className:kf(On.item,On.itemDone),children:[Ce("div",{className:On.tail}),Ce("div",{className:On.node}),Ce("div",{className:On.content,children:un("div",{className:On.collpase,children:[un("div",{children:["已收起",Ce("span",{children:Q-1}),"个节点"]}),un("a",{className:On.btn,onClick:j,children:["展开节点",Ce(kR,{})]})]})})]}),g.slice(H).map((K,G)=>un("li",{className:kf(On.item,Q===G+H?On.itemActive:Q>G+H?On.itemDone:On.itemUnDo),children:[Ce("div",{className:On.tail}),Ce("div",{className:On.node}),un("div",{className:On.content,children:[_?_(K,G,A?Q:Q-H):un(Wp,{children:[Ce("div",{className:On.title,children:K.PNName}),un("div",{className:On.dateWrapper,children:[K.PlanFinishDate&&un("span",{children:["预计完成时间: ",K.PlanFinishDate]}),K.UpdateTime&&un("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",K.UpdateTime]})]}),K.Remark&&Ce("div",{className:On.remark,children:K.Remark})]}),A&&Q-1===G&&un("a",{className:On.btn,onClick:()=>S(!1),children:["收起节点 ",Ce(LR,{})]})]})]},typeof R=="string"?K[R]:R(K)))]})},gb=p=>{const{current:g,data:v,rowKey:R,renderContent:_,currentIndex:A,...S}=p;return(()=>{Qe.Modal.info({icon:null,title:"流程节点",width:700,content:Ce(yb,{rowKey:R,renderContent:_,current:g,currentIndex:A,data:v}),closable:!0,footer:null,maskClosable:!0,...S})})(),null},Sb=(p,g)=>{const v=new URL(p),R=new URL(g);return v.protocol===R.protocol&&v.host===R.host&&v.port===R.port},Cb=p=>{const g=String(p).split("/");return g[g.length-1]},Eb=p=>{var v;return(v=p.headers.get("content-disposition"))==null?void 0:v.split(";")[1].split("=")[1]},Tb=(p,g)=>{const v=g||Cb(p);if(Sb(p,window.location.href)){Cy(p,v);return}let R=g;fetch(p,{method:"get"}).then(_=>(R||(R=Eb(_)),_.blob())).then(_=>{Y1(_,R||v)}).catch(()=>{Cy(p,"")})},wb=p=>{for(var g=p.split(","),v=g[0].match(/:(.*?);/)[1],R=window.atob(g[1]),_=R.length,A=new Uint8Array(_);_--;)A[_]=R.charCodeAt(_);return new Blob([A],{type:v})},Y1=(p,g)=>{let v="";p instanceof Blob?v=window.URL.createObjectURL(p):v=window.URL.createObjectURL(wb(p));const R=window.navigator;if(R.msSaveOrOpenBlob){R.msSaveOrOpenBlob(p,g);return}Cy(v,g),window.URL.revokeObjectURL(v)},Cy=(p,g)=>{let v=document.createElement("a");v.style.display="none",v.href=p,v.target="_blank",v.download=g,document.body.appendChild(v),v.click(),document.body.removeChild(v)},Rb=Object.freeze(Object.defineProperty({__proto__:null,downloadUrl:Tb,downloadBlob:Y1},Symbol.toStringTag,{value:"Module"}));class bb{constructor(g){xw(this,"options",{id:"",canvasId:"verifyCanvas",width:100,height:30,type:"blend",code:""});this.options=g}GVerify(){this.options.numArr="0,1,2,3,4,5,6,7,8,9".split(","),this.options.letterArr=this.getAllLetter(),this._init(),this.refresh()}_init(){const g=document.getElementById(this.options.id),v=document.createElement("canvas");v.id=this.options.canvasId,v.width=Number(this.options.width),v.height=Number(this.options.height),v.style.cursor="pointer",v.innerHTML="您的浏览器版本不支持canvas",g&&g.appendChild(v),v.onclick=()=>{this.refresh()}}refresh(){this.options.code="";const g=document.getElementById(this.options.canvasId);let v,R=[];if(g.getContext)v=g.getContext("2d");else return;v.textBaseline="middle",v.fillStyle=this.randomColor(180,240),v.fillRect(0,0,this.options.width,this.options.height),this.options.type=="blend"?R=this.options.numArr.concat(this.options.letterArr):this.options.type=="number"?R=this.options.numArr:R=this.options.letterArr;for(let _=1;_<=4;_++){const A=R[this.randomNum(0,R.length)];this.options.code+=A,v.font="20px SimHei",v.fillStyle=this.randomColor(50,160),v.shadowBlur=this.randomNum(-3,3),v.shadowColor="rgba(0, 0, 0, 0.3)";const S=Number(this.options.width)/5*_,Q=Number(this.options.height)/2,H=this.randomNum(-30,30);v.translate(S,Q),v.rotate(H*Math.PI/180),v.fillText(A,0,0),v.rotate(-H*Math.PI/180),v.translate(-S,-Q)}for(let _=0;_<2;_++)v.strokeStyle=this.randomColor(40,180),v.beginPath(),v.moveTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height)/2)),v.lineTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height))),v.stroke();for(let _=0;_<Number(this.options.width)/10;_++)v.fillStyle=this.randomColor(0,255),v.beginPath(),v.arc(this.randomNum(0,this.options.width),this.randomNum(0,this.options.height),1,0,2*Math.PI),v.fill()}validate(g){const v=g.toLowerCase(),R=this.options.code.toLowerCase();return v==R}getAllLetter(){return"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z".split(",")}randomNum(g,v){return Math.floor(Math.random()*(v-g)+g)}randomColor(g,v){const R=this.randomNum(g,v),_=this.randomNum(g,v),A=this.randomNum(g,v);return"rgb("+R+","+_+","+A+")"}}const xb=Object.freeze(Object.defineProperty({__proto__:null,getGVerify:bb},Symbol.toStringTag,{value:"Module"}));_t.AuthButton=$1,_t.BackHeader=jR,_t.CoralButton=mb,_t.CreateForm=B1,_t.EditTable=hb,_t.SearchTable=fb,_t.UploadFile=j1,_t.download=Rb,_t.fileType=VR,_t.showWorkFlow=gb,_t.utils=KR,_t.verfyCode=xb,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
@@ -114,7 +114,7 @@ const CreateForm = (props) => {
114
114
  const FormFields = (props) => {
115
115
  const { valueType, valueProps, value, onChange, onBtnClick, inputRef } = props;
116
116
  const children = useMemo(() => {
117
- let result = /* @__PURE__ */ jsx(Input, { placeholder: "请输入", ...valueProps, allowClear: true });
117
+ let result = /* @__PURE__ */ jsx(Input, { placeholder: "请输入", allowClear: true, ...valueProps });
118
118
  switch (valueType) {
119
119
  case "rate":
120
120
  result = /* @__PURE__ */ jsx(Rate, { ...valueProps });
@@ -133,8 +133,8 @@ const FormFields = (props) => {
133
133
  Select,
134
134
  {
135
135
  placeholder: "请选择",
136
- ...valueProps,
137
- allowClear: true
136
+ allowClear: true,
137
+ ...valueProps
138
138
  }
139
139
  );
140
140
  break;
@@ -153,8 +153,8 @@ const FormFields = (props) => {
153
153
  Input.TextArea,
154
154
  {
155
155
  placeholder: "请输入",
156
- ...valueProps,
157
- allowClear: true
156
+ allowClear: true,
157
+ ...valueProps
158
158
  }
159
159
  );
160
160
  break;
@@ -169,8 +169,8 @@ const FormFields = (props) => {
169
169
  DatePicker,
170
170
  {
171
171
  style: { width: "100%" },
172
- ...valueProps,
173
- allowClear: true
172
+ allowClear: true,
173
+ ...valueProps
174
174
  }
175
175
  );
176
176
  break;
@@ -179,8 +179,8 @@ const FormFields = (props) => {
179
179
  DatePicker.RangePicker,
180
180
  {
181
181
  style: { width: "100%" },
182
- ...valueProps,
183
- allowClear: true
182
+ allowClear: true,
183
+ ...valueProps
184
184
  }
185
185
  );
186
186
  break;
@@ -189,8 +189,8 @@ const FormFields = (props) => {
189
189
  TimePicker,
190
190
  {
191
191
  style: { width: "100%" },
192
- ...valueProps,
193
- allowClear: true
192
+ allowClear: true,
193
+ ...valueProps
194
194
  }
195
195
  );
196
196
  break;
@@ -198,8 +198,8 @@ const FormFields = (props) => {
198
198
  result = /* @__PURE__ */ jsx(
199
199
  Cascader,
200
200
  {
201
- ...valueProps,
202
- allowClear: true
201
+ allowClear: true,
202
+ ...valueProps
203
203
  }
204
204
  );
205
205
  break;
@@ -116,7 +116,7 @@ const CreateForm = (props) => {
116
116
  const FormFields = (props) => {
117
117
  const { valueType, valueProps, value, onChange, onBtnClick, inputRef } = props;
118
118
  const children = React.useMemo(() => {
119
- let result = /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { placeholder: "请输入", ...valueProps, allowClear: true });
119
+ let result = /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { placeholder: "请输入", allowClear: true, ...valueProps });
120
120
  switch (valueType) {
121
121
  case "rate":
122
122
  result = /* @__PURE__ */ jsxRuntime.jsx(antd.Rate, { ...valueProps });
@@ -135,8 +135,8 @@ const FormFields = (props) => {
135
135
  antd.Select,
136
136
  {
137
137
  placeholder: "请选择",
138
- ...valueProps,
139
- allowClear: true
138
+ allowClear: true,
139
+ ...valueProps
140
140
  }
141
141
  );
142
142
  break;
@@ -155,8 +155,8 @@ const FormFields = (props) => {
155
155
  antd.Input.TextArea,
156
156
  {
157
157
  placeholder: "请输入",
158
- ...valueProps,
159
- allowClear: true
158
+ allowClear: true,
159
+ ...valueProps
160
160
  }
161
161
  );
162
162
  break;
@@ -171,8 +171,8 @@ const FormFields = (props) => {
171
171
  antd.DatePicker,
172
172
  {
173
173
  style: { width: "100%" },
174
- ...valueProps,
175
- allowClear: true
174
+ allowClear: true,
175
+ ...valueProps
176
176
  }
177
177
  );
178
178
  break;
@@ -181,8 +181,8 @@ const FormFields = (props) => {
181
181
  antd.DatePicker.RangePicker,
182
182
  {
183
183
  style: { width: "100%" },
184
- ...valueProps,
185
- allowClear: true
184
+ allowClear: true,
185
+ ...valueProps
186
186
  }
187
187
  );
188
188
  break;
@@ -191,8 +191,8 @@ const FormFields = (props) => {
191
191
  antd.TimePicker,
192
192
  {
193
193
  style: { width: "100%" },
194
- ...valueProps,
195
- allowClear: true
194
+ allowClear: true,
195
+ ...valueProps
196
196
  }
197
197
  );
198
198
  break;
@@ -200,8 +200,8 @@ const FormFields = (props) => {
200
200
  result = /* @__PURE__ */ jsxRuntime.jsx(
201
201
  antd.Cascader,
202
202
  {
203
- ...valueProps,
204
- allowClear: true
203
+ allowClear: true,
204
+ ...valueProps
205
205
  }
206
206
  );
207
207
  break;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.2.3",
4
+ "version": "0.2.4",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",