合入主线登录和营业时段策略,对齐旧界面与 React 访问流程
This commit is contained in:
commit
42395de23a
113 files changed
+1915
-558
No files matched your search
+8
@@ -0,0 +1,8 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{$ as t,$n as n,An as r,At as i,Cn as a,Ft as o,G as s,Gt as c,Ht as l,J as u,K as d,Kt as f,Ln as p,Lt as m,Mt as h,Ot as g,Rt as _,St as v,Tn as y,U as b,Ut as x,Vn as S,W as C,X as w,Y as T,Z as E,Zn as D,Zt as O,_ as k,_n as A,b as j,bn as M,cn as N,dn as ee,er as P,et as F,f as I,ft as L,g as R,h as z,hn as B,in as te,jn as V,jt as ne,ln as re,lt as H,m as U,mn as W,n as G,nn as K,nr as q,nt as ie,on as ae,q as oe,sn as se,tt as ce,v as le,vn as ue,vt as de,wt as fe,xt as pe,y as me,yn as he,zn as ge,zt as _e}from"./index-BvkDlq1y.js";import{t as ve}from"./card-BJ98V9Zi.js";import{a as ye,c as be,g as xe,i as Se,n as Ce,r as we}from"./useForm-vGBHLiDP.js";import{i as Te,n as Ee,r as De,t as Oe}from"./LockOutlined-DoZS5WdW.js";import{f as ke}from"./TextArea-r6omQeC2.js";import{t as J}from"./input-CIXLdGWW.js";import{t as Ae}from"./typography-DUlVOiLU.js";var Y=e(q());function je(e){return e==null?null:typeof e==`object`&&!(0,Y.isValidElement)(e)?e:{title:e}}function Me(e){let[t,n]=Y.useState(e);return Y.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var Ne=e=>{let{componentCls:t}=e,n=`${t}-show-help`,r=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:`hidden`,transition:`height ${e.motionDurationFast} ${e.motionEaseInOut},
|
||||
opacity ${e.motionDurationFast} ${e.motionEaseInOut},
|
||||
transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${r}-leave-active`]:{transform:`translateY(-5px)`}}}}},Pe=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${y(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:`border-box`},'input[type="radio"], input[type="checkbox"]':{lineHeight:`normal`},'input[type="file"]':{display:`block`},'input[type="range"]':{display:`block`,width:`100%`},"select[multiple], select[size]":{height:`auto`},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${y(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),Fe=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},Ie=e=>{let{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},O(e)),Pe(e)),{[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},Fe(e,e.controlHeightSM)),"&-large":Object.assign({},Fe(e,e.controlHeightLG))})}},Le=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e;return{[t]:Object.assign(Object.assign({},O(e)),{marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden,
|
||||
&-hidden${i}-row`]:{display:`none`},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:`hidden`,whiteSpace:`nowrap`,textAlign:`end`,verticalAlign:`middle`,"&-left":{textAlign:`start`},"&-wrap":{overflow:`unset`,lineHeight:e.lineHeight,whiteSpace:`unset`,"> label":{verticalAlign:`middle`,textWrap:`balance`}},"> label":{position:`relative`,display:`inline-flex`,alignItems:`center`,maxWidth:`100%`,height:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`SimSun, sans-serif`,lineHeight:1,content:`"*"`},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:`none`}}},[`${t}-optional`]:{display:`inline-block`,marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:`none`}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:`help`,writingMode:`horizontal-tb`,marginInlineStart:e.marginXXS},"&::after":{content:`":"`,position:`relative`,marginBlock:0,marginInlineStart:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{"--ant-display":`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:`flex`,alignItems:`center`}}}},[t]:{"&-additional":{display:`flex`,flexDirection:`column`},"&-explain, &-extra":{clear:`both`,color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:`100%`},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:`auto`,opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:`center`,visibility:`visible`,animationName:L,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},X=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),Re=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label,
|
||||
${t}-col-xl-24${n}-label`]:X(e)}}},ze=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label,
|
||||
> ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},Be=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:X(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},Ve=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label,
|
||||
${r}-col-24${n}-label,
|
||||
${r}-col-xl-24${n}-label`]:X(e)},[`@media (max-width: ${y(e.screenXSMax)})`]:[Be(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:X(e)}}}],[`@media (max-width: ${y(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:X(e)}}},[`@media (max-width: ${y(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:X(e)}}},[`@media (max-width: ${y(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:X(e)}}}}},He=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),Ue=(e,t)=>K(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),We=c(`Form`,(e,{rootPrefixCls:t})=>{let n=Ue(e,t);return[Ie(n),Le(n),Ne(n),Re(n),ze(n),Ve(n),xe(n),L]},He,{order:-1e3}),Z=e(P()),Ge=[];function Ke(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var qe=({help:e,helpStatus:t,errors:n=Ge,warnings:r=Ge,className:a,fieldId:o,onVisibleChanged:c})=>{let{prefixCls:u}=Y.useContext(s),d=`${u}-item-explain`,f=i(u),[p,m,h]=We(u,f),g=Y.useMemo(()=>fe(u),[u]),_=Me(n),v=Me(r),y=Y.useMemo(()=>e==null?[].concat(V(_.map((e,t)=>Ke(e,`error`,`error`,t))),V(v.map((e,t)=>Ke(e,`warning`,`warning`,t)))):[Ke(e,`help`,t)],[e,t,_,v]),b=Y.useMemo(()=>{let e={};return y.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),y.map((t,n)=>Object.assign(Object.assign({},t),{key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[y]),S={};return o&&(S.id=`${o}_help`),p(Y.createElement(l,{motionDeadline:g.motionDeadline,motionName:`${u}-show-help`,visible:!!b.length,onVisibleChanged:c},e=>{let{className:t,style:n}=e;return Y.createElement(`div`,Object.assign({},S,{className:(0,Z.default)(d,t,h,f,a,m),style:n}),Y.createElement(x,Object.assign({keys:b},fe(u),{motionName:`${u}-show-help-item`,component:!1}),e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return Y.createElement(`div`,{key:t,className:(0,Z.default)(i,{[`${d}-${r}`]:r}),style:a},n)}))}))},Je=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ye=Y.forwardRef((e,t)=>{let n=Y.useContext(se),{getPrefixCls:r,direction:a,requiredMark:o,colon:s,scrollToFirstError:c,className:l,style:u}=ee(`form`),{prefixCls:f,className:p,rootClassName:m,size:h,disabled:g=n,form:_,colon:v,labelAlign:y,labelWrap:x,labelCol:S,wrapperCol:C,hideRequiredMark:E,layout:D=`horizontal`,scrollToFirstError:O,requiredMark:k,onFinishFailed:j,name:M,style:P,feedbackIcons:F,variant:I}=e,L=Je(e,[`prefixCls`,`className`,`rootClassName`,`size`,`disabled`,`form`,`colon`,`labelAlign`,`labelWrap`,`labelCol`,`wrapperCol`,`hideRequiredMark`,`layout`,`scrollToFirstError`,`requiredMark`,`onFinishFailed`,`name`,`style`,`feedbackIcons`,`variant`]),R=de(h),z=Y.useContext(A),B=Y.useMemo(()=>k===void 0?E?!1:o===void 0||o:k,[E,k,o]),te=v??s,V=r(`form`,f),ne=i(V),[re,H,U]=We(V,ne),W=(0,Z.default)(V,`${V}-${D}`,{[`${V}-hide-required-mark`]:B===!1,[`${V}-rtl`]:a===`rtl`,[`${V}-${R}`]:R},U,ne,H,l,p,m),[G]=Ce(_),{__INTERNAL__:K}=G;K.name=M;let q=Y.useMemo(()=>({name:M,labelAlign:y,labelCol:S,labelWrap:x,wrapperCol:C,layout:D,colon:te,requiredMark:B,itemRef:K.itemRef,form:G,feedbackIcons:F}),[M,y,S,C,D,te,B,G,F]),ie=Y.useRef(null);Y.useImperativeHandle(t,()=>Object.assign(Object.assign({},G),{nativeElement:ie.current?.nativeElement}));let ce=(e,t)=>{if(e){let n={block:`nearest`};typeof e==`object`&&(n=Object.assign(Object.assign({},n),e)),G.scrollToField(t,n)}};return re(Y.createElement(T.Provider,{value:I},Y.createElement(N,{disabled:g},Y.createElement(ae.Provider,{value:R},Y.createElement(d,{validateMessages:z},Y.createElement(b.Provider,{value:q},Y.createElement(oe,{status:!0},Y.createElement(w,Object.assign({id:M},L,{name:M,onFinishFailed:e=>{if(j?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(O!==void 0){ce(O,t);return}c!==void 0&&ce(c,t)}},form:G,ref:ie,style:Object.assign(Object.assign({},u),P),className:W})))))))))});function Xe(e){if(typeof e==`function`)return e;let t=D(e);return t.length<=1?t[0]:t}var Ze=()=>{let{status:e,errors:t=[],warnings:n=[]}=Y.useContext(C);return{status:e,errors:t,warnings:n}};Ze.Context=C;function Qe(e){let[t,n]=Y.useState(e),i=Y.useRef(null),a=Y.useRef([]),o=Y.useRef(!1);Y.useEffect(()=>(o.current=!1,()=>{o.current=!0,r.cancel(i.current),i.current=null}),[]);function s(e){o.current||(i.current===null&&(a.current=[],i.current=r(()=>{i.current=null,n(e=>{let t=e;return a.current.forEach(e=>{t=e(t)}),t})})),a.current.push(e))}return[t,s]}function $e
Line truncated
|
||||
Reference in new issue
Block a user