Files
shz-admin/shihezi/1507.4a491164.async.js

3 lines
24 KiB
JavaScript
Raw Permalink Normal View History

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[1507],{952:function(_e,se,n){var O=n(97269);se.ZP=O.A},78164:function(_e,se,n){n.d(se,{S:function(){return X}});var O=n(15671),c=n(43144),ve=n(97326),w=n(60136),z=n(29388),he=n(4942),te=n(59720),u=n(67294),D=n(85893),X=function(Pe){(0,w.Z)(le,Pe);var ae=(0,z.Z)(le);function le(){var fe;(0,O.Z)(this,le);for(var $=arguments.length,me=new Array($),ge=0;ge<$;ge++)me[ge]=arguments[ge];return fe=ae.call.apply(ae,[this].concat(me)),(0,he.Z)((0,ve.Z)(fe),"state",{hasError:!1,errorInfo:""}),fe}return(0,c.Z)(le,[{key:"componentDidCatch",value:function($,me){console.log($,me)}},{key:"render",value:function(){return this.state.hasError?(0,D.jsx)(te.ZP,{status:"error",title:"Something went wrong.",extra:this.state.errorInfo}):this.props.children}}],[{key:"getDerivedStateFromError",value:function($){return{hasError:!0,errorInfo:$.message}}}]),le}(u.Component)},90081:function(_e,se,n){n.d(se,{U:function(){return G}});var O=n(91),c=n(1413),ve=n(97685),w=n(50888),z=n(64847),he=n(21532),te=n(55241),u=n(77569),D=n(88306),X=n(67294),Pe=n(73177),ae=n(4942),le=function(g){var F="".concat(g.antCls,"-progress-bg");return(0,ae.Z)({},g.componentCls,{"&-multiple":{paddingBlockStart:6,paddingBlockEnd:12,paddingInline:8},"&-progress":{"&-success":(0,ae.Z)({},F,{backgroundColor:g.colorSuccess}),"&-error":(0,ae.Z)({},F,{backgroundColor:g.colorError}),"&-warning":(0,ae.Z)({},F,{backgroundColor:g.colorWarning})},"&-rule":{display:"flex",alignItems:"center","&-icon":{"&-default":{display:"flex",alignItems:"center",justifyContent:"center",width:"14px",height:"22px","&-circle":{width:"6px",height:"6px",backgroundColor:g.colorTextSecondary,borderRadius:"4px"}},"&-loading":{color:g.colorPrimary},"&-error":{color:g.colorError},"&-success":{color:g.colorSuccess}},"&-text":{color:g.colorText}}})};function fe(Ze){return(0,z.Xj)("InlineErrorFormItem",function(g){var F=(0,c.Z)((0,c.Z)({},g),{},{componentCls:".".concat(Ze)});return[le(F)]})}var $=n(85893),me=["rules","name","children","popoverProps"],ge=["errorType","rules","name","popoverProps","children"],pe={marginBlockStart:-5,marginBlockEnd:-5,marginInlineStart:0,marginInlineEnd:0},Me=function(g){var F=g.inputProps,ue=g.input,oe=g.extra,Y=g.errorList,t=g.popoverProps,E=(0,X.useState)(!1),S=(0,ve.Z)(E,2),d=S[0],s=S[1],Q=(0,X.useState)([]),Ee=(0,ve.Z)(Q,2),de=Ee[0],ce=Ee[1],ye=(0,X.useContext)(he.ZP.ConfigContext),Oe=ye.getPrefixCls,e=Oe(),a=(0,z.dQ)(),p=fe("".concat(e,"-form-item-with-help")),K=p.wrapSSR,T=p.hashId;(0,X.useEffect)(function(){F.validateStatus!=="validating"&&ce(F.errors)},[F.errors,F.validateStatus]);var Z=(0,Pe.X)(de.length<1?!1:d,function(L){L!==d&&s(L)}),N=F.validateStatus==="validating";return(0,$.jsx)(te.Z,(0,c.Z)((0,c.Z)((0,c.Z)({trigger:(t==null?void 0:t.trigger)||["click"],placement:(t==null?void 0:t.placement)||"topLeft"},Z),{},{getPopupContainer:t==null?void 0:t.getPopupContainer,getTooltipContainer:t==null?void 0:t.getTooltipContainer,content:K((0,$.jsx)("div",{className:"".concat(e,"-form-item ").concat(T," ").concat(a.hashId).trim(),style:{margin:0,padding:0},children:(0,$.jsxs)("div",{className:"".concat(e,"-form-item-with-help ").concat(T," ").concat(a.hashId).trim(),children:[N?(0,$.jsx)(w.Z,{}):null,Y]})}))},t),{},{children:(0,$.jsxs)($.Fragment,{children:[ue,oe]})}),"popover")},H=function(g){var F=g.rules,ue=g.name,oe=g.children,Y=g.popoverProps,t=(0,O.Z)(g,me);return(0,$.jsx)(u.Z.Item,(0,c.Z)((0,c.Z)({name:ue,rules:F,hasFeedback:!1,shouldUpdate:function(S,d){if(S===d)return!1;var s=[ue].flat(1);s.length>1&&s.pop();try{return JSON.stringify((0,D.Z)(S,s))!==JSON.stringify((0,D.Z)(d,s))}catch(Q){return!0}},_internalItemRender:{mark:"pro_table_render",render:function(S,d){return(0,$.jsx)(Me,(0,c.Z)({inputProps:S,popoverProps:Y},d))}}},t),{},{style:(0,c.Z)((0,c.Z)({},pe),t==null?void 0:t.style),children:oe}))},G=function(g){var F=g.errorType,ue=g.rules,oe=g.name,Y=g.popoverProps,t=g.children,E=(0,O.Z)(g,ge);return oe&&ue!==null&&ue!==void 0&&ue.length&&F==="popover"?(0,$.jsx)(H,(0,c.Z)((0,c.Z
https://procomponents.ant.design/components/editable-table#editable-%E6%96%B0%E5%BB%BA%E8%A1%8C`),new Error("\u8BF7\u8BBE\u7F6E recordCreatorProps.record \u5E76\u8FD4\u56DE\u4E00\u4E2A\u552F\u4E00\u7684key");if(v.add(l),y(Array.from(v)),(r==null?void 0:r.newRecordType)==="dataSource"||e.tableName){var i,o={data:e.dataSource,getRowKey:e.getRowKey,row:(0,u.Z)((0,u.Z)({},h),{},{map_row_parentKey:r!=null&&r.parentKey?(i=s(r==null?void 0:r.parentKey))===null||i===void 0?void 0:i.toString():void 0}),key:l,childrenColumnName:e.childrenColumnName||"children"};e.setDataSource(Q(o,(r==null?void 0:r.position)==="top"?"top":"update"))}else N({defaultValue:h,options:(0,u.Z)((0,u.Z)({},r),{},{recordKey:l})});return!0}),Te=(e==null?void 0:e.saveText)||a.getMessage("editableTable.action.save","\u4FDD\u5B58"),Ie=(e==null?void 0:e.deleteText)||a.getMessage("editableTable.action.delete","\u5220\u9664"),xe=(e==null?void 0:e.cancelText)||a.getMessage("editableTable.action.cancel","\u53D6\u6D88"),Ae=(0,G.J)(function(){var h=(0,w.Z)((0,c.Z)().mark(function r(l,i,o,M){var b,P,_,m,q,U,De;return(0,c.Z)().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,e==null||(b=e.onSave)===null||b===void 0?void 0:b.call(e,l,i,o,M);case 2:return m=Ce.sent,Ce.next=5,W(l);case 5:if(q=M||B.current||{},U=q.options,!(!(U!=null&&U.parentKey)&&(U==null?void 0:U.recordKey)===l)){Ce.next=9;break}return(U==null?void 0:U.position)==="top"?e.setDataSource([i].concat((0,O.Z)(e.dataSource))):e.setDataSource([].concat((0,O.Z)(e.dataSource),[i])),Ce.abrupt("return",m);case 9:return De={data:e.dataSource,getRowKey:e.getRowKey,row:U?(0,u.Z)((0,u.Z)({},i),{},{map_row_parentKey:(P=s((_=U==null?void 0:U.parentKey)!==null&&_!==void 0?_:""))===null||P===void 0?void 0:P.toString()}):i,key:l,childrenColumnName:e.childrenColumnName||"children"},e.setDataSource(Q(De,(U==null?void 0:U.position)==="top"?"top":"update")),Ce.next=13,W(l);case 13:return Ce.abrupt("return",m);case 14:case"end":return Ce.stop()}},r)}));return function(r,l,i,o){return h.apply(this,arguments)}}()),Le=(0,G.J)(function(){var h=(0,w.Z)((0,c.Z)().mark(function r(l,i){var o,M,b;return(0,c.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return M={data:e.dataSource,getRowKey:e.getRowKey,row:i,key:l,childrenColumnName:e.childrenColumnName||"children"},_.next=3,e==null||(o=e.onDelete)===null||o===void 0?void 0:o.call(e,l,i);case 3:return b=_.sent,_.next=6,W(l,!1);case 6:return e.setDataSource(Q(M,"delete")),_.abrupt("return",b);case 8:case"end":return _.stop()}},r)}));return function(r,l){return h.apply(this,arguments)}}()),we=(0,G.J)(function(){var h=(0,w.Z)((0,c.Z)().mark(function r(l,i,o,M){var b,P;return(0,c.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,e==null||(b=e.onCancel)===null||b===void 0?void 0:b.call(e,l,i,o,M);case 2:return P=m.sent,m.abrupt("return",P);case 4:case"end":return m.stop()}},r)}));return function(r,l,i,o){return h.apply(this,arguments)}}()),Ke=e.actionRender&&typeof e.actionRender=="function",Ne=Ke?e.actionRender:function(){},Be=(0,G.J)(Ne),je=function(r){var l=e.getRowKey(r,r.index),i={saveText:Te,cancelText:xe,deleteText:Ie,addEditRecord:be,recordKey:l,cancelEditable:W,index:r.index,tableName:e.tableName,newLineConfig:Z,onCancel:we,onDelete:Le,onSave:Ae,editableKeys:f,setEditableRowKeys:y,preEditRowRef:p,deletePopconfirmMessage:e.deletePopconfirmMessage||"".concat(a.getMessage("deleteThisLine","\u5220\u9664\u6B64\u9879"),"?")},o=ye(r,i);return e.tableName?Re.current.set(I.current.get(s(l))||s(l),o.saveRef):Re.current.set(s(l),o.saveRef),Ke?Be(r,i,{save:o.save,delete:o.delete,cancel:o.cancel}):[o.save,o.delete,o.cancel]};return{editableKeys:f,setEditableRowKeys:y,isEditable:ie,actionRender:je,startEditable:A,cancelEditable:W,addEditRecord:be,saveEditable:re,newLineRecord:Z,preEditableKeys:C,onValuesChange:Se,getRealIndex:e.getRealIndex}}},86738:function(_e,se,n){n.d(se,{Z:function(){return Y}});var O=n(67294),c=n(21640),ve=n(93967),w=n.n(ve),z=n(21770),he=n(98423),te=n(53124),u=n(55241),D=n(86743),X=n(81643),Pe=n(83622),ae=n(33671