@rft-rc/recycle-ui 0.0.2-rc.7 → 0.0.2-rc.8
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.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),tt={key:0,class:"rc-icon__unicode"},nt=e.defineComponent({name:"rc-icon",__name:"index",props:{name:{},size:{default:16},color:{default:""},spin:{type:Boolean,default:!1},code:{default:""}},setup(t){const r=t,f=e.inject(Ie,{}),l=e.computed(()=>(f==null?void 0:f.iconClass)||"iconfont"),y=e.computed(()=>r.name||""),B=e.computed(()=>typeof r.size=="number"?`${r.size}px`:r.size||"16px"),v=e.computed(()=>({fontSize:B.value,color:r.color||void 0,lineHeight:1,fontFamily:(f==null?void 0:f.iconClass)||"iconfont"})),m=e.computed(()=>{const i=r.code;if(i==null||i===""||i===0)return"";if(typeof i=="number")return String.fromCharCode(i);const g=String(i).replace(/^0x/i,""),w=parseInt(g,16);return Number.isNaN(w)?"":String.fromCharCode(w)});return e.onMounted(()=>{if(typeof window>"u")return;const i=f&&f.iconCssUrl||We.iconCssUrl;if(!i)return;const g=`link[rel="stylesheet"][data-rcui-icon="true"][href="${i}"]`;if(!document.head.querySelector(g)){const b=document.createElement("link");b.rel="stylesheet",b.href=i,b.setAttribute("data-rcui-icon","true"),document.head.appendChild(b)}}),(i,g)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["rc-icon",[l.value,y.value,{"rc-icon--spin":t.spin}]]),style:e.normalizeStyle(v.value),"aria-hidden":"true"},[m.value?(e.openBlock(),e.createElementBlock("span",tt,e.toDisplayString(m.value),1)):e.createCommentVNode("",!0)],6))}}),Q=(t,r)=>{const f=t.__vccOpts||t;for(const[l,y]of r)f[l]=y;return f},A=Q(nt,[["__scopeId","data-v-3857a892"]]),at=["disabled"],lt={key:0,class:"rc-button__spinner"},ot={key:0,class:"rc-button__icon rc-button__icon--prefix"},rt={key:2,class:"rc-button__icon rc-button__icon--suffix"},ct=e.defineComponent({__name:"index",props:{type:{default:"default"},size:{default:"medium"},mode:{default:void 0},block:{type:Boolean,default:!1},label:{default:""},round:{type:[Number,String,Boolean],default:6},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},preIcon:{default:""},suffixIcon:{default:""}},emits:["click"],setup(t,{emit:r}){const f=t,l=r,y=v=>{!f.disabled&&!f.loading&&l("click",v)},B=e.computed(()=>{const v=f.round;return typeof v=="boolean"?v?"999px":"6px":typeof v=="number"?`${v}px`:String(v)});return(v,m)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["rc-button",[`rc-button--${t.type}`,`rc-button--${t.size}`,t.mode?`rc-button--${t.mode}`:"",{"is-block":t.block,"is-disabled":t.disabled,"is-loading":t.loading}]]),style:e.normalizeStyle({borderRadius:B.value}),disabled:t.disabled||t.loading,onClick:y},[t.loading?(e.openBlock(),e.createElementBlock("span",lt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.preIcon||v.$slots.preIcon?(e.openBlock(),e.createElementBlock("span",ot,[e.renderSlot(v.$slots,"preIcon",{},()=>[t.preIcon?(e.openBlock(),e.createBlock(A,{key:0,name:t.preIcon},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],64)),e.renderSlot(v.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0),!t.loading&&(t.suffixIcon||v.$slots.suffixIcon)?(e.openBlock(),e.createElementBlock("span",rt,[e.renderSlot(v.$slots,"suffixIcon",{},()=>[t.suffixIcon?(e.openBlock(),e.createBlock(A,{key:0,name:t.suffixIcon},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],14,at))}}),J=Q(ct,[["__scopeId","data-v-3ed3109f"]]);J.name="rc-button";function Re(t){return t.component(J.name,J),t}const st={class:"rc-desc-item__value"},ut=e.defineComponent({name:"rc-descriptions-item",__name:"item",props:{label:{default:""},value:{default:""},labelWidth:{default:""},span:{default:1}},setup(t){const r=t;e.inject("rcDescItemWidth",void 0),e.inject("rcDescSingleWidth",""),e.inject("rcDescGap","0px");const f=e.inject("rcDescGapPx",0),l=e.inject("rcDescColCount",1),y=e.inject("rcDescLabelWidth",""),B=e.computed(()=>{const i=typeof r.span=="string"?parseInt(r.span,10):r.span,g=typeof(l==null?void 0:l.value)=="number"?l.value:l,w=!Number.isNaN(i)&&i>0?i:1;return Math.min(w,g||1)}),v=e.computed(()=>{const i=typeof(l==null?void 0:l.value)=="number"?l.value:l,g=typeof(f==null?void 0:f.value)=="number"?f.value:f,w=B.value;if(!i||i<=1||w>=i)return"100%";const b=(i-1)*g,_=(w-1)*g;return`calc((100% - ${b}px) * ${w} / ${i} + ${_}px)`}),m=e.computed(()=>{const i=typeof(y==null?void 0:y.value)=="string"?y.value:y,g=r.labelWidth!==""?r.labelWidth:i||"";return g?{width:typeof g=="number"?`${g}px`:String(g),flex:"0 0 auto"}:{}});return(i,g)=>(e.openBlock(),e.createElementBlock("div",{class:"rc-desc-item",style:e.normalizeStyle({width:v.value,flex:`0 0 ${v.value}`})},[e.createElementVNode("div",{class:"rc-desc-item__label",style:e.normalizeStyle(m.value)},[e.renderSlot(i.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],4),e.createElementVNode("div",st,[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.value),1)],!0)])],4))}}),fe=Q(ut,[["__scopeId","data-v-970d0b99"]]),it={class:"rc-descriptions"},dt={key:0,class:"rc-descriptions__title"},ft=e.defineComponent({name:"rc-descriptions",__name:"index",props:{title:{},column:{default:2},gap:{default:4},labelWidth:{default:""},data:{default:()=>[]},keyMap:{}},setup(t){const r=t,f=e.ref(null),l=e.computed(()=>typeof r.gap=="number"?`${r.gap}px`:String(r.gap)),y=e.computed(()=>{const g=typeof r.column=="string"?Number.parseInt(r.column,10):r.column??1;return!Number.isNaN(g)&&g>0?g:1}),B=e.ref("100%"),v=e.ref("100%");e.watchEffect(()=>{const g=y.value;if(g<=1)B.value="100%",v.value="100%";else{const w=typeof r.gap=="number"?r.gap:parseFloat(String(r.gap))||0,_=`calc((100% - ${(g-1)*w}px) / ${g})`;v.value=_,B.value=_}}),e.provide("rcDescItemWidth",B),e.provide("rcDescSingleWidth",v),e.provide("rcDescColCount",y),e.provide("rcDescGapPx",e.computed(()=>typeof r.gap=="number"?r.gap:parseFloat(String(r.gap))||0));const m=e.computed(()=>r.labelWidth===""||r.labelWidth===void 0?"":typeof r.labelWidth=="number"?`${r.labelWidth}px`:String(r.labelWidth));e.provide("rcDescLabelWidth",m),e.provide("rcDescGap",e.computed(()=>typeof r.gap=="number"?`${r.gap}px`:String(r.gap)));const i=e.computed(()=>{var b,_,D;const g=((b=r.keyMap)==null?void 0:b.key)??"label",w=((_=r.keyMap)==null?void 0:_.value)??"value";return(D=r.data)!=null&&D.length?r.data.map(S=>({label:S==null?void 0:S[g],value:S==null?void 0:S[w]})):[]});return(g,w)=>(e.openBlock(),e.createElementBlock("div",it,[g.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(g.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-descriptions__body",style:e.normalizeStyle({gap:l.value}),ref_key:"wrapEl",ref:f},[i.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value,(b,_)=>(e.openBlock(),e.createBlock(fe,{key:_,label:b.label,value:b.value,"label-width":t.labelWidth},null,8,["label","value","label-width"]))),128)):e.renderSlot(g.$slots,"default",{key:1},void 0,!0)],4)]))}}),_e=Q(ft,[["__scopeId","data-v-5fcaa235"]]);_e.name="rc-descriptions";fe.name="rc-descriptions-item";function Te(t){return t.component(_e.name,_e),t.component("RcDescriptions",_e),t.component(fe.name,fe),t.component("RcDescriptionsItem",fe),t}const Je=_e,Qe=fe,mt={class:"rc-card__title"},vt={class:"rc-card__title-text"},pt={key:0,class:"rc-card__status"},yt={key:1,class:"rc-card__divider"},gt={key:2,class:"rc-card__action"},ht=e.defineComponent({name:"rc-card",__name:"index",props:{color:{default:"var(--rc-white)"},topBgColor:{default:"rgba(29, 133, 252, 0.05)"},title:{default:""},status:{default:""},statusColor:{default:"var(--rc-primary)"},round:{default:8},bordered:{type:Boolean,default:!1},elevation:{default:2},padding:{default:"16px"},gap:{default:12},width:{default:"100%"},height:{default:""}},setup(t){const r=t,f=e.computed(()=>{const m=typeof r.round=="boolean"?r.round?"12px":"0":typeof r.round=="number"?`${r.round}px`:String(r.round);return{backgroundColor:r.color||"var(--rc-white)",borderRadius:m,boxShadow:v(r.elevation),width:B(r.width),height:B(r.height)}}),l=e.computed(()=>r.padding||"16px"),y=e.computed(()=>typeof r.gap=="number"?`${r.gap}px`:String(r.gap));function B(m){return m==null||m===""?"":typeof m=="number"?`${m}px`:String(m)}function v(m){if(!m||m<=0)return"none";const i=4*m;return`0 ${Math.round(i/2)}px ${i}px rgba(0,0,0,0.06), 0 ${Math.round(i/4)}px ${Math.round(i/2)}px rgba(0,0,0,0.04)`}return(m,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-card",[{"rc-card--bordered":t.bordered}]]),style:e.normalizeStyle(f.value)},[m.$slots.title||t.title||m.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-card__top",style:e.normalizeStyle({backgroundColor:t.topBgColor||"rgba(29, 133, 252, 0.05)"})},[e.createElementVNode("div",mt,[e.renderSlot(m.$slots,"title",{},()=>[e.createElementVNode("span",vt,e.toDisplayString(t.title),1)],!0)]),m.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",pt,[e.renderSlot(m.$slots,"status",{},()=>[e.createElementVNode("span",{class:"rc-card__status-text",style:e.normalizeStyle({color:t.statusColor||"var(--rc-primary)"})},e.toDisplayString(t.status),5)],!0)])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-card__body",style:e.normalizeStyle({padding:l.value,gap:y.value})},[e.renderSlot(m.$slots,"content",{},()=>[e.renderSlot(m.$slots,"default",{},void 0,!0)],!0)],4),m.$slots.action?(e.openBlock(),e.createElementBlock("div",yt)):e.createCommentVNode("",!0),m.$slots.action?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(m.$slots,"action",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),Ce=Q(ht,[["__scopeId","data-v-a7b95214"]]);Ce.name="rc-card";const kt="RcCard";function Fe(t){return t.component(Ce.name,Ce),t.component(kt,Ce),t}const _t={key:0,class:"rc-toast__mask"},Ct={class:"rc-toast__content"},Bt={key:0,class:"rc-toast__spinner"},bt={key:1,class:"rc-toast__icon rc-toast__icon--success"},Dt={key:2,class:"rc-toast__icon rc-toast__icon--fail"},Vt={class:"rc-toast__text"},St=e.defineComponent({__name:"index",props:{message:{default:""},type:{default:"text"},duration:{default:2e3},mask:{type:Boolean,default:!1},onAfterLeave:{}},setup(t,{expose:r}){const f=t,l=e.ref(!0);let y;function B(){y&&(clearTimeout(y),y=null)}function v(){B(),l.value=!1}return r({close:v}),e.onMounted(()=>{f.duration&&f.duration>0&&(y=setTimeout(()=>{v()},f.duration))}),e.onUnmounted(()=>{B()}),(m,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-toast-fade",onAfterLeave:t.onAfterLeave},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-toast",[`rc-toast--${t.type}`]])},[t.mask?(e.openBlock(),e.createElementBlock("div",_t)):e.createCommentVNode("",!0),e.createElementVNode("div",Ct,[t.type==="loading"?(e.openBlock(),e.createElementBlock("div",Bt)):t.type==="success"?(e.openBlock(),e.createElementBlock("div",bt)):t.type==="fail"?(e.openBlock(),e.createElementBlock("div",Dt)):e.createCommentVNode("",!0),e.createElementVNode("div",Vt,e.toDisplayString(t.message),1)])],2)):e.createCommentVNode("",!0)]),_:1},8,["onAfterLeave"])])),e.renderSlot(m.$slots,"default",{},void 0,!0)],64))}}),Be=Q(St,[["__scopeId","data-v-d234c9c5"]]);let se=null,me=null;function Ke(){se&&(se.unmount(),se=null),me&&(document.body.removeChild(me),me=null)}function Et(t){const r=typeof t=="string"?{message:t}:t||{};Ke(),me=document.createElement("div"),document.body.appendChild(me);const f={message:r.message,type:r.type??"text",duration:r.duration??2e3,mask:r.mask??!1,onAfterLeave:()=>{var l;Ke(),(l=r.onClose)==null||l.call(r)}};return se=e.createApp(Be,f),se.mount(me),{close:Xe}}function Xe(){var t,r,f;se&&((f=(r=(t=se._instance)==null?void 0:t.exposed)==null?void 0:r.close)==null||f.call(r))}Be.name="rc-toast";function He(t){return t.component(Be.name,Be),t}const $t={class:"rc-message",role:"alert","aria-live":"polite"},xt={class:"rc-message__content"},wt=e.defineComponent({__name:"index",setup(t,{expose:r}){const f=e.reactive([]);let l=1;function y(v){const m=f.findIndex(i=>i.id===v);m>=0&&f.splice(m,1)}function B(v,m,i){const g=l++;return f.push({id:g,type:v,content:m,duration:i}),i>0&&window.setTimeout(()=>y(g),i),g}return r({add:B,remove:y}),(v,m)=>(e.openBlock(),e.createElementBlock("div",$t,[e.createVNode(e.TransitionGroup,{name:"rc-message-fade",tag:"div"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:e.normalizeClass(["rc-message__item",`rc-message--${i.type}`])},[e.createElementVNode("span",xt,e.toDisplayString(i.content),1)],2))),128))]),_:1})]))}}),Nt=Q(wt,[["__scopeId","data-v-87811df0"]]);let le=null,ae=null;function It(){var r;if(le&&ae)return;le=document.createElement("div"),document.body.appendChild(le);const t=e.createVNode(Nt,{});e.render(t,le),ae=(r=t.component)==null?void 0:r.exposed}function de(t,r,f){var y;It();const l=typeof f=="number"?f:t==="loading"?0:2e3;return(y=ae==null?void 0:ae.add)==null?void 0:y.call(ae,t,r,l)}const Ze={open(t){return de(t.type||"info",t.content,t.duration)},info(t,r){return de("info",t,r)},success(t,r){return de("success",t,r)},warning(t,r){return de("warning",t,r)},error(t,r){return de("error",t,r)},loading(t,r){return de("loading",t,r)},destroy(){le&&(e.render(null,le),le.remove(),le=null,ae=null)}};function ze(t){return t.config.globalProperties.$message=Ze,t}A.name="rc-icon";function Ae(t){return t.component(A.name,A),t.component("RcIcon",A),t}const Mt={class:"rc-popup__content"},Rt=e.defineComponent({name:"rc-popup",__name:"index",props:{modelValue:{type:Boolean,default:!1},position:{default:"center"},overlay:{type:Boolean,default:!0},overlayClass:{default:""},overlayStyle:{default:void 0},closeable:{type:Boolean,default:!1},closeIconPosition:{default:"top-right"},closeIcon:{default:"icon_close"},round:{type:Boolean,default:!1},popupStyle:{default:void 0},closeOnClickOverlay:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0}},emits:["update:modelValue","open","close","click-overlay"],setup(t,{expose:r,emit:f}){const l=t,y=f,B=e.ref(),v=e.ref(l.modelValue);e.watch(()=>l.modelValue,u=>{v.value=u,u?(y("open"),l.lockScroll&&w()):(y("close"),l.lockScroll&&b())},{immediate:!0}),e.watch(v,u=>{u!==l.modelValue&&y("update:modelValue",u)});const m=e.computed(()=>`rc-popup-slide-${l.position}`),i=e.computed(()=>({...l.popupStyle||{}}));let g=!1;function w(){g||(g=!0,document.body.style.overflow="hidden")}function b(){g&&(g=!1,document.body.style.overflow="")}function _(){y("click-overlay"),l.closeOnClickOverlay&&S()}function D(){S()}function S(){v.value=!1}function C(){v.value=!0}return e.onUnmounted(()=>{b()}),r({open:C,close:S,visible:v}),(u,te)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-popup-fade"},{default:e.withCtx(()=>[v.value&&l.overlay?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-popup__overlay",{"rc-popup__overlay--transparent":l.overlayClass==="transparent"}]),style:e.normalizeStyle(l.overlayStyle),onClick:_},null,6)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:m.value},{default:e.withCtx(()=>[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popupRef",ref:B,class:e.normalizeClass(["rc-popup",[`rc-popup--${t.position}`,{"rc-popup--round":t.round}]]),style:e.normalizeStyle(i.value),onClick:te[0]||(te[0]=e.withModifiers(()=>{},["stop"]))},[t.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-popup__close",`rc-popup__close--${t.closeIconPosition}`]),onClick:D},[e.createVNode(A,{name:t.closeIcon,class:"rc-popup__close-icon"},null,8,["name"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",Mt,[e.renderSlot(u.$slots,"default",{},void 0,!0)])],6)):e.createCommentVNode("",!0)]),_:3},8,["name"])]))}}),ve=Q(Rt,[["__scopeId","data-v-f1696784"]]);ve.name="rc-popup";const Tt="RcPopup";function Ye(t){return t.component(ve.name,ve),t.component(Tt,ve),t}const Ft={key:0,class:"rc-calendar__header"},zt={class:"rc-calendar__header-title"},At={key:1,class:"rc-calendar__shortcuts"},Yt={class:"rc-calendar__shortcuts-scroll"},Lt=["onClick"],Pt={class:"rc-calendar__month-title"},Ot={class:"rc-calendar__weekdays"},Wt={class:"rc-calendar__days"},Ut=["onClick"],jt={class:"rc-calendar__day-content"},Gt={class:"rc-calendar__day-text"},Kt={key:0,class:"rc-calendar__day-bottom"},Ht={key:2,class:"rc-calendar__footer"},qt={key:0,class:"rc-calendar__month-picker-overlay"},Jt={class:"rc-calendar__month-picker"},Qt={class:"rc-calendar__month-picker-header"},Xt={class:"rc-calendar__month-picker-title"},Zt={key:0},en={key:0,class:"rc-calendar__year-picker-content"},tn={class:"rc-calendar__year-picker-grid"},nn=["onClick"],an={key:1,class:"rc-calendar__month-picker-content"},ln=["onClick"],Ne=48,j=3,Me=7,on=e.defineComponent({__name:"panel-content",props:{showTitle:{type:Boolean},title:{},range:{type:Boolean},selectedDate:{},rangeStart:{},rangeEnd:{},minDate:{},maxDate:{},disabledDate:{type:Function},formatter:{type:Function},showFooter:{type:Boolean},maxRangeDays:{}},emits:["select-day","clear","confirm","shortcut-select"],setup(t,{expose:r,emit:f}){const l=t,y=f,B=["日","一","二","三","四","五","六"];function v(n){if(!n)return null;const c=new Date(n);return isNaN(c.getTime())?null:c}function m(n){const c=n.getFullYear(),d=String(n.getMonth()+1).padStart(2,"0"),V=String(n.getDate()).padStart(2,"0");return`${c}-${d}-${V}`}const i=e.ref(new Date);e.watch(()=>[l.selectedDate,l.rangeStart],()=>{if(l.range&&l.rangeStart){const n=v(l.rangeStart);n&&(i.value=n)}else if(!l.range&&l.selectedDate){const n=v(l.selectedDate);n&&(i.value=n)}},{immediate:!0});function g(n){const c=new Date;return n.getFullYear()===c.getFullYear()&&n.getMonth()===c.getMonth()&&n.getDate()===c.getDate()}function w(n){if(!l.rangeStart||!l.rangeEnd)return!1;const c=m(n),d=l.rangeStart,V=l.rangeEnd;return c>d&&c<V}function b(n){if(l.disabledDate&&l.disabledDate(n))return!0;const c=m(n);return!!(l.minDate&&c<l.minDate||l.maxDate&&c>l.maxDate)}function _(n,c){const d=new Date(n,c,1),V=new Date(n,c+1,0),E=d.getDay(),H=V.getDate(),q=[],je=new Date(n,c,0).getDate();for(let O=E-1;O>=0;O--){const W={date:new Date(n,c-1,je-O),type:"prev-month",text:String(je-O)};if(l.formatter){const U=l.formatter(W);U.text&&(W.text=U.text),U.bottomInfo&&(W.bottomInfo=U.bottomInfo)}q.push(W)}for(let O=1;O<=H;O++){const W={date:new Date(n,c,O),type:"current-month",text:String(O)};if(l.formatter){const U=l.formatter(W);U.text&&(W.text=U.text),U.bottomInfo&&(W.bottomInfo=U.bottomInfo)}q.push(W)}const et=42-q.length;for(let O=1;O<=et;O++){const W={date:new Date(n,c+1,O),type:"next-month",text:String(O)};if(l.formatter){const U=l.formatter(W);U.text&&(W.text=U.text),U.bottomInfo&&(W.bottomInfo=U.bottomInfo)}q.push(W)}return q}const D=e.computed(()=>{const n=i.value.getFullYear(),c=i.value.getMonth();return _(n,c)}),S=e.computed(()=>{const n=i.value.getFullYear(),c=i.value.getMonth()+1;return`${n}年${c}月`});function C(n){const c=[];if(n.type!=="current-month"&&c.push("is-other-month"),g(n.date)&&c.push("is-today"),b(n.date))return c.push("is-disabled"),c;const d=m(n.date);return l.range?(l.rangeStart===d&&c.push("is-start"),l.rangeEnd===d&&c.push("is-end"),w(n.date)&&c.push("is-in-range")):l.selectedDate===d&&c.push("is-selected"),c}const u=e.computed(()=>!!(l.rangeStart&&l.rangeEnd)),te=e.computed(()=>l.rangeStart&&l.rangeEnd?2:l.rangeStart||l.rangeEnd?1:0);function oe(n){if(!l.minDate&&!l.maxDate)return!1;const c=l.minDate?v(l.minDate):null,d=l.maxDate?v(l.maxDate):null;return!!(c&&n<c.getFullYear()||d&&n>d.getFullYear())}function re(n,c){const d=l.minDate?v(l.minDate):null,V=l.maxDate?v(l.maxDate):null;if(d){const E=d.getFullYear(),H=d.getMonth()+1;if(n<E||n===E&&c<H)return!0}if(V){const E=V.getFullYear(),H=V.getMonth()+1;if(n>E||n===E&&c>H)return!0}return!1}const F=e.ref(!1),I=e.ref("year"),R=e.ref(i.value.getFullYear()),Y=e.ref(i.value.getMonth()+1),L=e.ref(),P=e.ref(1900),T=e.ref(1920),M=e.ref(1900),G=e.ref(2100),ue=e.computed(()=>{const n=[],d=Math.floor((P.value-M.value)/j)-3,V=Math.ceil((T.value-M.value)/j)+3,E=M.value+Math.max(0,d)*j,H=M.value+V*j-1;for(let q=E;q<=H;q++)n.push(q);return n});e.watch(()=>i.value,n=>{R.value=n.getFullYear(),Y.value=n.getMonth()+1},{immediate:!0});function ye(){if(!L.value)return;const n=L.value.scrollTop,d=Math.max(0,Math.floor(n/Ne)),V=M.value+d*j,E=V+Me*j-1;V<M.value?M.value=V-100:E>G.value&&(G.value=E+100),(V!==P.value||E!==T.value)&&(P.value=V,T.value=E)}function ge(){R.value=i.value.getFullYear(),Y.value=i.value.getMonth()+1,I.value="year",F.value=!0;const n=R.value;n<M.value?M.value=Math.floor(n/100)*100:n>G.value&&(G.value=Math.ceil(n/100)*100+99),e.nextTick(()=>{if(L.value){const c=Math.floor((n-M.value)/j),d=Math.max(0,c-2);P.value=M.value+d*j,T.value=P.value+Me*j-1,ie(n)}})}function ie(n){if(!L.value)return;n<M.value?M.value=Math.floor(n/100)*100:n>G.value&&(G.value=Math.ceil(n/100)*100+99);const c=Math.floor((n-M.value)/j),d=c*Ne;L.value.scrollTop=d;const V=Math.max(0,c-2);P.value=M.value+V*j,T.value=P.value+Me*j-1}function p(){const n=new Date(i.value);n.setMonth(n.getMonth()-1),i.value=n}function h(){const n=new Date(i.value);n.setMonth(n.getMonth()+1),i.value=n}function $(n){oe(n)||(R.value=n,I.value="month")}function z(n){re(R.value,n)||(Y.value=n,X())}function X(){const n=new Date(i.value);n.setFullYear(R.value),n.setMonth(Y.value-1),i.value=n,F.value=!1,I.value="year"}function Z(n){y("select-day",n)}function ce(){y("clear")}function a(){K.value&&ce()}function o(){y("confirm")}function s(){F.value=!1}function k(n){I.value=n}function N(){const c=new Date().getFullYear();oe(c)||(R.value=c,I.value="month")}function x(){const c=new Date().getMonth()+1;re(R.value,c)||(Y.value=c,X())}const K=e.computed(()=>l.range?!!(l.rangeStart||l.rangeEnd):!!l.selectedDate);function ne(n,c){const d=v(n),V=v(c);if(!d||!V)return 0;const E=Math.abs(V.getTime()-d.getTime());return Math.ceil(E/(1e3*60*60*24))+1}function ee(){return m(new Date)}function he(){const n=new Date,c=n.getDay(),d=n.getDate()-c+(c===0?-6:1);return new Date(n.getFullYear(),n.getMonth(),d)}function be(){const n=he(),c=new Date(n);return c.setDate(n.getDate()+6),c}function De(){const n=new Date;return new Date(n.getFullYear(),n.getMonth(),1)}function ke(){const n=new Date;return new Date(n.getFullYear(),n.getMonth()+1,0)}function Ve(){const n=new Date;return new Date(n.getFullYear(),n.getMonth()-2,1)}function Se(){const n=new Date;return new Date(n.getFullYear(),0,1)}function Ee(){const n=new Date;return new Date(n.getFullYear(),11,31)}const $e=[{key:"today",label:"本日",days:1,getRange:()=>{const n=ee();return[n,n]}},{key:"week",label:"本周",days:7,getRange:()=>{const n=m(he()),c=m(be());return[n,c]}},{key:"month",label:"本月",getRange:()=>{const n=m(De()),c=m(ke());return[n,c]}},{key:"threeMonths",label:"近三月",getRange:()=>{const n=m(Ve()),c=m(ke());return[n,c]}},{key:"year",label:"本年",getRange:()=>{const n=m(Se()),c=m(Ee());return[n,c]}},{key:"last7Days",label:"近7天",days:7,getRange:()=>{const n=new Date,c=new Date(n);return c.setDate(n.getDate()-6),[m(c),ee()]}},{key:"last30Days",label:"近30天",days:30,getRange:()=>{const n=new Date,c=new Date(n);return c.setDate(n.getDate()-29),[m(c),ee()]}}],xe=e.computed(()=>$e.filter(n=>{if(l.maxRangeDays!==void 0){if(n.days!==void 0)return n.days<=l.maxRangeDays;{const c=n.getRange();if(c)return ne(c[0],c[1])<=l.maxRangeDays}}return!0}));function we(n){const c=n.getRange();if(c){if(l.minDate&&c[0]<l.minDate||l.maxDate&&c[1]>l.maxDate)return;y("shortcut-select",c)}}return r({yearScrollRef:L}),(n,c)=>(e.openBlock(),e.createElementBlock("div",null,[t.showTitle?(e.openBlock(),e.createElementBlock("div",Ft,[e.createElementVNode("div",zt,e.toDisplayString(t.title),1),e.createElementVNode("span",{class:e.normalizeClass(["rc-calendar__header-clear",{"is-disabled":!K.value}]),onClick:a}," 清空 ",2)])):e.createCommentVNode("",!0),t.range?(e.openBlock(),e.createElementBlock("div",At,[e.createElementVNode("div",Yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.key,class:"rc-calendar__shortcut-item",onClick:V=>we(d)},e.toDisplayString(d.label),9,Lt))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Pt,[e.createElementVNode("div",{class:"rc-calendar__nav-button",onClick:p},[e.createVNode(e.unref(A),{name:"icon_caret-left",class:"rc-calendar__nav-icon"})]),e.createElementVNode("div",{class:"rc-calendar__month-text",onClick:ge},e.toDisplayString(S.value),1),e.createElementVNode("div",{class:"rc-calendar__nav-button",onClick:h},[e.createVNode(e.unref(A),{name:"icon_caret-right",class:"rc-calendar__nav-icon"})])]),e.createElementVNode("div",Ot,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(B,d=>e.createElementVNode("div",{key:d,class:"rc-calendar__weekday"},e.toDisplayString(d),1)),64))]),e.createElementVNode("div",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(d,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:e.normalizeClass(["rc-calendar__day",C(d)]),onClick:E=>Z(d)},[e.createElementVNode("div",jt,[e.createElementVNode("span",Gt,e.toDisplayString(d.text),1),d.bottomInfo?(e.openBlock(),e.createElementBlock("span",Kt,e.toDisplayString(d.bottomInfo),1)):e.createCommentVNode("",!0)])],10,Ut))),128))]),t.range&&t.showFooter?(e.openBlock(),e.createElementBlock("div",Ht,[e.createVNode(e.unref(J),{type:"default",class:"rc-calendar__footer-reset",onClick:ce},{default:e.withCtx(()=>[...c[2]||(c[2]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(J),{type:"primary",class:"rc-calendar__footer-confirm",disabled:!u.value,onClick:o},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value?`确定(${te.value}项)`:"确定"),1)]),_:1},8,["disabled"])])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"rc-calendar-fade"},{default:e.withCtx(()=>[F.value?(e.openBlock(),e.createElementBlock("div",qt,[e.createElementVNode("div",Jt,[e.createElementVNode("div",Qt,[e.createVNode(e.unref(J),{type:"default",mode:"text",size:"small",onClick:s},{default:e.withCtx(()=>[...c[3]||(c[3]=[e.createTextVNode("取消",-1)])]),_:1}),e.createElementVNode("div",Xt,[e.createElementVNode("span",{onClick:c[0]||(c[0]=d=>k("year"))},e.toDisplayString(R.value)+"年",1),I.value==="month"?(e.openBlock(),e.createElementBlock("span",Zt," - ")):e.createCommentVNode("",!0),I.value==="month"?(e.openBlock(),e.createElementBlock("span",{key:1,onClick:c[1]||(c[1]=d=>k("month"))},e.toDisplayString(Y.value)+"月",1)):e.createCommentVNode("",!0)]),I.value==="year"?(e.openBlock(),e.createBlock(e.unref(J),{key:0,type:"primary",mode:"text",size:"small",onClick:N},{default:e.withCtx(()=>[...c[4]||(c[4]=[e.createTextVNode(" 本年 ",-1)])]),_:1})):e.createCommentVNode("",!0),I.value==="month"?(e.openBlock(),e.createBlock(e.unref(J),{key:1,type:"primary",mode:"text",size:"small",onClick:x},{default:e.withCtx(()=>[...c[5]||(c[5]=[e.createTextVNode(" 本月 ",-1)])]),_:1})):e.createCommentVNode("",!0)]),I.value==="year"?(e.openBlock(),e.createElementBlock("div",en,[e.createElementVNode("div",{class:"rc-calendar__year-picker-scroll",ref_key:"yearScrollRef",ref:L,onScroll:ye},[e.createElementVNode("div",{class:"rc-calendar__year-picker-spacer",style:e.normalizeStyle({height:`${Math.floor((P.value-M.value)/j)*Ne}px`})},null,4),e.createElementVNode("div",tn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d,class:e.normalizeClass(["rc-calendar__year-picker-item",{"is-selected":R.value===d,"is-disabled":oe(d)}]),onClick:V=>$(d)},e.toDisplayString(d),11,nn))),128))]),e.createElementVNode("div",{class:"rc-calendar__year-picker-spacer",style:e.normalizeStyle({height:`${Math.ceil((G.value-T.value)/j)*Ne}px`})},null,4)],544)])):e.createCommentVNode("",!0),I.value==="month"?(e.openBlock(),e.createElementBlock("div",an,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(12,d=>e.createElementVNode("div",{key:d,class:e.normalizeClass(["rc-calendar__month-picker-item",{"is-selected":Y.value===d,"is-disabled":re(R.value,d)}]),onClick:V=>z(d)},e.toDisplayString(d)+"月 ",11,ln)),64))])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1})]))}}),qe=Q(on,[["__scopeId","data-v-0bf1834b"]]),rn={class:"rc-calendar"},cn=["placeholder"],sn={class:"rc-calendar__input-actions"},un={key:1,class:"rc-calendar__panel"},dn=e.defineComponent({name:"rc-calendar",__name:"index",props:{modelValue:{default:null},range:{type:[Boolean,Number],default:!1},mode:{default:"default"},placeholder:{default:"请选择日期"},showTitle:{type:Boolean,default:!0},title:{default:"选择日期"},minDate:{default:void 0},maxDate:{default:void 0},disabledDate:{type:Function,default:void 0},formatter:{type:Function,default:void 0},showFooter:{type:Boolean,default:!0},endDateOffset:{type:Boolean,default:!1}},emits:["update:modelValue","change","confirm"],setup(t,{emit:r}){const f=t,l=r,y=e.ref(),B=e.ref(),v=e.ref(!1),m=e.ref(""),i=e.computed(()=>f.range===!0||typeof f.range=="number"),g=e.computed(()=>typeof f.range=="number"?f.range:void 0),w=e.computed(()=>p=>{if(f.disabledDate&&f.disabledDate(p))return!0;if(g.value!==void 0&&_.value&&!D.value){const h=u(p);if(C(_.value)&&te(_.value,h)>g.value)return!0}return!1}),b=e.ref(null),_=e.ref(null),D=e.ref(null);e.watch(()=>f.modelValue,p=>{i.value?Array.isArray(p)&&p.length===2?(_.value=p[0],D.value=I(p[1])):(_.value=null,D.value=null):b.value=typeof p=="string"?p:null,S()},{immediate:!0});function S(){f.mode==="popup"&&(i.value?_.value&&D.value?m.value=`${_.value} ~ ${D.value}`:_.value?m.value=`${_.value} ~ `:m.value="":m.value=b.value||"")}function C(p){if(!p)return null;const h=new Date(p);return isNaN(h.getTime())?null:h}function u(p){const h=p.getFullYear(),$=String(p.getMonth()+1).padStart(2,"0"),z=String(p.getDate()).padStart(2,"0");return`${h}-${$}-${z}`}function te(p,h){const $=C(p),z=C(h);if(!$||!z)return 0;const X=Math.abs(z.getTime()-$.getTime());return Math.ceil(X/(1e3*60*60*24))}function oe(p){const h=C(p);return h?(h.setDate(h.getDate()+1),u(h)):p}function re(p){const h=C(p);return h?(h.setDate(h.getDate()-1),u(h)):p}function F(p){return f.endDateOffset&&i.value?oe(p):p}function I(p){return f.endDateOffset&&i.value?re(p):p}function R(p){if(p.type!=="current-month"||f.disabledDate&&f.disabledDate(p.date))return;const h=u(p.date);if(!(f.minDate&&h<f.minDate)&&!(f.maxDate&&h>f.maxDate)){if(i.value)if(!_.value||_.value&&D.value)_.value=h,D.value=null;else{let $=_.value,z=h;if(h<_.value&&(z=_.value,$=h),_.value=$,D.value=z,_.value&&D.value){const X=F(D.value),Z=[_.value,X];l("update:modelValue",Z),l("change",Z),f.showFooter||Y()}}else{b.value=h;const $=h;l("update:modelValue",$),l("change",$),f.mode&&M()}S()}}function Y(){if(_.value&&D.value){const p=F(D.value),h=[_.value,p];l("update:modelValue",h),l("change",h),l("confirm",h),M()}}function L(){i.value?(_.value=null,D.value=null):b.value=null;const p=null;l("update:modelValue",p),l("change",p),S()}function P(p){_.value=p[0],D.value=p[1];const h=F(p[1]),$=[p[0],h];l("update:modelValue",$),l("change",$),f.showFooter?S():Y()}function T(){v.value=!0}function M(){v.value=!1}function G(p){v.value=p}function ue(){T()}function ye(){f.mode==="popup"&&ie()}function ge(){v.value||T()}function ie(){const p=m.value.trim();if(i.value){const h=p.split("~").map($=>$.trim());if(h.length===2&&h[0]&&h[1]){const $=C(h[0]),z=C(h[1]);if($&&z&&!isNaN($.getTime())&&!isNaN(z.getTime())){_.value=u($);const X=u(z);D.value=I(X);const Z=F(D.value),ce=[_.value,Z];l("update:modelValue",ce),l("change",ce);return}}}else{const h=C(p);if(h&&!isNaN(h.getTime())){b.value=u(h),l("update:modelValue",b.value),l("change",b.value);return}}S()}return(p,h)=>(e.openBlock(),e.createElementBlock("div",rn,[t.mode==="popup"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-calendar__input",onClick:T},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:y,"onUpdate:modelValue":h[0]||(h[0]=$=>m.value=$),type:"text",class:"rc-calendar__input-field",placeholder:t.placeholder,readonly:"",onFocus:ue,onBlur:ye,onInput:ge},null,40,cn),[[e.vModelText,m.value]]),e.createElementVNode("div",sn,[e.createVNode(e.unref(A),{name:"icon_a-rili",class:"rc-calendar__input-icon"})])])):e.createCommentVNode("",!0),t.mode==="default"?(e.openBlock(),e.createElementBlock("div",un,[e.createVNode(qe,{"show-title":t.showTitle,title:t.title,range:i.value,"selected-date":b.value,"range-start":_.value,"range-end":D.value,"min-date":t.minDate,"max-date":t.maxDate,"disabled-date":w.value,formatter:t.formatter,"show-footer":!1,"max-range-days":g.value,onSelectDay:R,onClear:L,onConfirm:Y,onShortcutSelect:P},null,8,["show-title","title","range","selected-date","range-start","range-end","min-date","max-date","disabled-date","formatter","max-range-days"])])):e.createCommentVNode("",!0),t.mode==="popup"?(e.openBlock(),e.createBlock(e.unref(ve),{key:2,modelValue:v.value,"onUpdate:modelValue":[h[1]||(h[1]=$=>v.value=$),G],position:"bottom",overlay:!0,round:!0,"close-on-click-overlay":!0,"lock-scroll":!0},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"popupPanelRef",ref:B,class:"rc-calendar__panel"},[e.createVNode(qe,{"show-title":t.showTitle,title:t.title,range:i.value,"selected-date":b.value,"range-start":_.value,"range-end":D.value,"min-date":t.minDate,"max-date":t.maxDate,"disabled-date":w.value,formatter:t.formatter,"show-footer":t.showFooter,"max-range-days":g.value,onSelectDay:R,onClear:L,onConfirm:Y,onShortcutSelect:P},null,8,["show-title","title","range","selected-date","range-start","range-end","min-date","max-date","disabled-date","formatter","show-footer","max-range-days"])],512)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]))}}),pe=Q(dn,[["__scopeId","data-v-96b29c22"]]);pe.name="rc-calendar";const fn="RcCalendar";function Le(t){return t.component(pe.name,pe),t.component(fn,pe),t}const mn={class:"rc-search-area"},vn={class:"rc-search-area__bar"},pn=["onClick"],yn={class:"rc-search-area__item-label"},gn={class:"rc-search-area__panel-content"},hn={key:1,class:"rc-search-area__input-wrapper"},kn=["placeholder"],_n={key:2,class:"rc-search-area__calendar-wrapper"},Cn={key:3,class:"rc-search-area__tree-container"},Bn={class:"rc-search-area__tree-group-title"},bn={class:"rc-search-area__tree-group-options"},Dn=["onClick"],Vn={class:"rc-search-area__option-label"},Sn={key:4,class:"rc-search-area__tree-container"},En={class:"rc-search-area__tree-group-title"},$n={class:"rc-search-area__tree-group-options"},xn=["onClick"],wn={class:"rc-search-area__option-label"},Nn={key:5,class:"rc-search-area__options-grid"},In=["onClick"],Mn={class:"rc-search-area__option-label"},Rn={key:6,class:"rc-search-area__options-grid"},Tn=["onClick"],Fn={class:"rc-search-area__option-label"},zn={key:7,class:"rc-search-area__empty"},An={key:0,class:"rc-search-area__panel-footer"},Yn=e.defineComponent({name:"rc-search-area",__name:"index",props:{items:{default:()=>[]},modelValue:{default:()=>({})},showMask:{type:Boolean,default:!0},autoConfirm:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{expose:r,emit:f}){const l=t,y=f,B=e.ref(null),v=e.ref(null),m=e.ref(null),i=e.ref({top:"0px"}),g=async()=>{if(B.value===null||!v.value)return;await e.nextTick();const o=v.value.getBoundingClientRect().top;i.value={top:`${o}px`}},w=a=>{if(B.value===null||!v.value)return;const o=a.target;if(v.value.contains(o))return;const s=v.value.closest(".rc-search-area");if(s){const k=s.querySelector(".rc-search-area__bar");if(k&&k.contains(o))return}F()};e.watch(B,async a=>{a!==null?(await e.nextTick(),g(),window.addEventListener("resize",g),window.addEventListener("scroll",g,!0),document.addEventListener("click",w,!0)):(window.removeEventListener("resize",g),window.removeEventListener("scroll",g,!0),document.removeEventListener("click",w,!0))}),e.onUnmounted(()=>{window.removeEventListener("resize",g),window.removeEventListener("scroll",g,!0),document.removeEventListener("click",w,!0)});const b=e.ref({}),_=e.ref(""),D=e.ref(null),S=e.ref({}),C=e.ref({...l.modelValue});e.watch(()=>l.modelValue,a=>{C.value={...a||{}}},{deep:!0,immediate:!0});const u=e.computed(()=>B.value===null?null:l.items[B.value]),te=e.computed(()=>{if(!u.value)return"";const a=ce(u.value);return a>0?`(${a}项)`:""}),oe=a=>{const o=C.value[a.key];if(o==null||o===""||a.slot)return a.label;if(a.type==="input"){if(o&&String(o).trim())return`${a.label}: ${o}`}else if(a.type==="calendar"){if(o){if(Array.isArray(o)&&o.length===2)return`${a.label}: ${o[0]} ~ ${o[1]}`;if(typeof o=="string")return`${a.label}: ${o}`}}else if(a.type==="single"||a.type==="tree-single"){const s=L(a,o);if(s)return`${a.label}: ${Y(s,a)}`}else{const s=Array.isArray(o)?o:[o];if(s.length>0){const k=s.map(N=>{const x=L(a,N);return x?Y(x,a):null}).filter(N=>N!==null);if(k.length>0)return`${a.label}: ${k.join("、")}`}}return a.label},re=a=>{const o=l.items[a];if(!o)return;if(B.value===a){B.value=null;return}const s=C.value[o.key];o.slot?s!=null?Array.isArray(s)?S.value[o.key]=[...s]:typeof s=="object"?S.value[o.key]={...s}:S.value[o.key]=s:S.value[o.key]=void 0:o.type==="input"?_.value=s!=null?String(s):"":o.type==="calendar"?D.value=s??null:o.type==="single"||o.type==="tree-single"?b.value[o.key]=s!==void 0?s:null:b.value[o.key]=s!==void 0?Array.isArray(s)?[...s]:[s]:[],B.value=a},F=()=>{B.value=null},I=(a,o)=>{if(!o)return typeof a=="string"?a:a.label||String(a.value);const s=a;if(o.renderItem){if(typeof o.renderItem=="string")return String(typeof s=="object"&&s!==null?s[o.renderItem]??"":s);{const k=o.renderItem(s);return k!=null?String(k):""}}return typeof a=="string"?a:a.label||String(a.value)},R=(a,o)=>{if(!o)return typeof a=="string"?a:a.value!==void 0?a.value:a;const s=a;return o.format?typeof o.format=="string"?typeof s=="object"&&s!==null?s[o.format]:s:o.format(s):typeof a=="string"?a:a.value!==void 0?a.value:a},Y=(a,o)=>{const s=a,k=o.renderResult||o.renderItem;if(k){if(typeof k=="string")return String(typeof s=="object"&&s!==null?s[k]??"":s);{const N=k(s);return N!=null?String(N):""}}return I(a,o)},L=(a,o,s)=>{const k=s||a.options;if(!k)return null;const N=a.childrenKey||"children";for(const x of k){const K=R(x,a);if(K===o||String(K)===String(o))return x;if(typeof x=="object"&&x!==null){const ne=x[N];if(Array.isArray(ne)&&ne.length>0){const ee=L(a,o,ne);if(ee)return ee}}}return null},P=(a,o)=>{const s=o||a.options;if(!s)return[];const k=a.childrenKey||"children",N=[];for(const x of s)if(N.push(x),typeof x=="object"&&x!==null){const K=x[k];Array.isArray(K)&&K.length>0&&N.push(...P(a,K))}return N},T=a=>{if(!u.value)return!1;const o=u.value.key,s=b.value[o],k=R(a,u.value);return u.value.type==="single"||u.value.type==="tree-single"?s!=null&&s===k:(Array.isArray(s)?s:[]).some(x=>x===k||String(x)===String(k))},M=a=>a?a.childrenKey?P(a):a.options||[]:[],G=a=>{if(!a)return[];const o=a.childrenKey||"children";return(a.options||[]).filter(s=>{if(typeof s=="string")return!1;const k=s[o];return Array.isArray(k)&&k.length>0})},ue=(a,o)=>{if(!o||typeof a=="string")return[];const s=o.childrenKey||"children",k=a[s];return Array.isArray(k)?k:[]},ye=a=>{if(a)return S.value[a.key]!==void 0?S.value[a.key]:C.value[a.key]},ge=(a,o)=>{if(a&&(S.value[a.key]=o,l.autoConfirm)){const s=a.key;C.value[s]=o,y("update:modelValue",{...C.value}),y("change",{...C.value},a),F()}},ie=a=>{if(!u.value)return;const o=u.value.key,s=R(a,u.value);C.value[o];let k;b.value[o]===s?k=void 0:k=s,C.value[o]=k,y("update:modelValue",{...C.value}),y("change",{...C.value},u.value),F()},p=a=>{if(!u.value)return;const o=u.value.key,s=R(a,u.value),k=Array.isArray(b.value[o])?[...b.value[o]]:[],N=k.findIndex(x=>x===s||String(x)===String(s));if(N>=0?k.splice(N,1):k.push(s),b.value[o]=k,l.autoConfirm){const x=k.length>0?k:void 0;C.value[o]=x,y("update:modelValue",{...C.value}),y("change",{...C.value},u.value),F()}},h=()=>{if(!u.value)return;const a=u.value.key;u.value.slot?S.value[a]=void 0:u.value.type==="input"?_.value="":u.value.type==="calendar"?D.value=null:u.value.type==="single"||u.value.type==="tree-single"?b.value[a]=null:b.value[a]=[]},$=()=>{if(l.autoConfirm&&u.value){const a=u.value.key,o=_.value.trim()||void 0;C.value[a]=o,y("update:modelValue",{...C.value}),y("change",{...C.value},u.value),F()}},z=a=>{if(D.value=a,l.autoConfirm&&u.value){const o=u.value.key,s=a??void 0;C.value[o]=s,y("update:modelValue",{...C.value}),y("change",{...C.value},u.value),F()}},X=()=>{if(!u.value)return;const a=u.value.key;C.value[a];let o;if(u.value.slot)o=S.value[a],C.value[a]=o;else if(u.value.type==="input")o=_.value.trim()||void 0,C.value[a]=o;else if(u.value.type==="calendar")o=D.value!==null&&D.value!==void 0?D.value:void 0,C.value[a]=o;else if(u.value.type==="single"||u.value.type==="tree-single"){const s=b.value[a];o=s??void 0,C.value[a]=o}else{const s=b.value[a];o=Array.isArray(s)&&s.length>0?s:void 0,C.value[a]=o}y("update:modelValue",{...C.value}),y("change",{...C.value},u.value),F()},Z=a=>{const o=C.value[a.key];return o==null||o===""?0:a.slot?1:a.type==="input"?String(o).trim()?1:0:a.type==="single"||a.type==="tree-single"?1:Array.isArray(o)?o.length:o?1:0},ce=a=>{if(a.slot){const s=S.value[a.key];return s!=null&&s!==""?1:0}else{if(a.type==="input")return _.value.trim()?1:0;if(a.type==="calendar")return D.value!==null&&D.value!==void 0?1:0}const o=b.value[a.key];return o==null||o===""?0:a.type==="single"||a.type==="tree-single"?1:Array.isArray(o)?o.length:0};return r({getValues:()=>({...C.value}),reset:()=>{C.value={},b.value={},S.value={},y("update:modelValue",{})}}),(a,o)=>(e.openBlock(),e.createElementBlock("div",mn,[e.createElementVNode("div",vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,(s,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:e.normalizeClass(["rc-search-area__item",{"is-active":B.value===k,"has-value":Z(s)>0}]),onClick:N=>re(k)},[e.createElementVNode("span",yn,e.toDisplayString(oe(s)),1),e.createVNode(e.unref(A),{name:"icon_a-xiala2",color:B.value!==k&&Z(s)>0?"#1677ff":"#969799",class:e.normalizeClass(["rc-search-area__item-arrow",{"is-up":B.value===k}])},null,8,["color","class"])],10,pn))),128))]),e.createVNode(e.Transition,{name:"rc-search-area-fade"},{default:e.withCtx(()=>[B.value!==null&&l.showMask?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"maskRef",ref:m,class:"rc-search-area__mask",style:e.normalizeStyle(i.value),onClick:F},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"rc-search-area-slide"},{default:e.withCtx(()=>{var s,k,N,x,K,ne,ee,he,be,De,ke,Ve,Se,Ee,$e,xe,we,n,c;return[B.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"panelRef",ref:v,class:"rc-search-area__panel"},[e.createElementVNode("div",gn,[(s=u.value)!=null&&s.slot&&a.$slots[u.value.key]?e.renderSlot(a.$slots,u.value.key,{key:0,value:ye(u.value),"update:value":d=>ge(u.value,d)},void 0,!0):((k=u.value)==null?void 0:k.type)==="input"?(e.openBlock(),e.createElementBlock("div",hn,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=d=>_.value=d),type:"text",class:"rc-search-area__input",placeholder:u.value.placeholder||"请输入",onInput:$},null,40,kn),[[e.vModelText,_.value]])])):((N=u.value)==null?void 0:N.type)==="calendar"?(e.openBlock(),e.createElementBlock("div",_n,[e.createVNode(e.unref(pe),{modelValue:D.value,"onUpdate:modelValue":o[1]||(o[1]=d=>D.value=d),range:((x=u.value.calendarConfig)==null?void 0:x.range)||!1,mode:"default","min-date":(K=u.value.calendarConfig)==null?void 0:K.minDate,"max-date":(ne=u.value.calendarConfig)==null?void 0:ne.maxDate,"disabled-date":(ee=u.value.calendarConfig)==null?void 0:ee.disabledDate,formatter:(he=u.value.calendarConfig)==null?void 0:he.formatter,"end-date-offset":((be=u.value.calendarConfig)==null?void 0:be.endDateOffset)||!1,onChange:z},null,8,["modelValue","range","min-date","max-date","disabled-date","formatter","end-date-offset"])])):((De=u.value)==null?void 0:De.type)==="tree-single"?(e.openBlock(),e.createElementBlock("div",Cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G(u.value),(d,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:"rc-search-area__tree-group"},[e.createElementVNode("div",Bn,e.toDisplayString(I(d,u.value||void 0)),1),e.createElementVNode("div",bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue(d,u.value),(E,H)=>(e.openBlock(),e.createElementBlock("div",{key:H,class:e.normalizeClass(["rc-search-area__option",{"is-selected":T(E)}]),onClick:q=>ie(E)},[e.createElementVNode("span",Vn,e.toDisplayString(I(E,u.value||void 0)),1),T(E)?(e.openBlock(),e.createBlock(e.unref(A),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Dn))),128))])]))),128))])):((ke=u.value)==null?void 0:ke.type)==="tree-multiple"?(e.openBlock(),e.createElementBlock("div",Sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G(u.value),(d,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:"rc-search-area__tree-group"},[e.createElementVNode("div",En,e.toDisplayString(I(d,u.value||void 0)),1),e.createElementVNode("div",$n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue(d,u.value),(E,H)=>(e.openBlock(),e.createElementBlock("div",{key:H,class:e.normalizeClass(["rc-search-area__option",{"is-selected":T(E)}]),onClick:q=>p(E)},[e.createElementVNode("span",wn,e.toDisplayString(I(E,u.value||void 0)),1),T(E)?(e.openBlock(),e.createBlock(e.unref(A),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,xn))),128))])]))),128))])):((Ve=u.value)==null?void 0:Ve.type)==="single"?(e.openBlock(),e.createElementBlock("div",Nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M(u.value),(d,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:e.normalizeClass(["rc-search-area__option",{"is-selected":T(d)}]),onClick:E=>ie(d)},[e.createElementVNode("span",Mn,e.toDisplayString(I(d,u.value||void 0)),1),T(d)?(e.openBlock(),e.createBlock(e.unref(A),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,In))),128))])):(e.openBlock(),e.createElementBlock("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M(u.value),(d,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:e.normalizeClass(["rc-search-area__option",{"is-selected":T(d)}]),onClick:E=>p(d)},[e.createElementVNode("span",Fn,e.toDisplayString(I(d,u.value||void 0)),1),T(d)?(e.openBlock(),e.createBlock(e.unref(A),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Tn))),128))])),((Se=u.value)==null?void 0:Se.type)!=="input"&&((Ee=u.value)==null?void 0:Ee.type)!=="calendar"&&!(($e=u.value)!=null&&$e.slot)&&((we=(xe=u.value)==null?void 0:xe.options)==null?void 0:we.length)===0?(e.openBlock(),e.createElementBlock("div",zn,[...o[2]||(o[2]=[e.createElementVNode("p",null,"暂无选项",-1)])])):e.createCommentVNode("",!0)]),!l.autoConfirm&&((n=u.value)==null?void 0:n.type)!=="single"&&((c=u.value)==null?void 0:c.type)!=="tree-single"?(e.openBlock(),e.createElementBlock("div",An,[e.createVNode(e.unref(J),{block:"",onClick:h},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode(" 重置 ",-1)])]),_:1}),e.createVNode(e.unref(J),{type:"primary",block:"",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(" 确定"+e.toDisplayString(te.value),1)]),_:1})])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)]}),_:3})]))}}),Pe=Q(Yn,[["__scopeId","data-v-dd3a69e1"]]),Oe=t=>{t.component("RcSearchArea",Pe),t.component("rc-search-area",Pe)},Ie=Symbol("RECYCLE_UI_CONFIG"),We={prefix:"rc",autoRegister:!0,provideKey:Ie,theme:{},iconCssUrl:"//at.alicdn.com/t/c/font_4252799_o59odx6bqil.css",iconClass:"iconfont"};function Ln(t,r){r.autoRegister!==!1&&(typeof Re=="function"&&Re(t),typeof Te=="function"&&Te(t),typeof Fe=="function"&&Fe(t),typeof He=="function"&&He(t),typeof Ae=="function"&&Ae(t),typeof ze=="function"&&ze(t),typeof Oe=="function"&&Oe(t),typeof Le=="function"&&Le(t),typeof Ye=="function"&&Ye(t))}const Ue=(t,r)=>{const f={...We,...r||{}};if(t.provide(f.provideKey??Ie,f),t.config.globalProperties.$recycleUI=f,typeof window<"u"&&f.iconCssUrl){const l=`link[rel="stylesheet"][data-rcui-icon="true"][href="${f.iconCssUrl}"]`;if(!document.head.querySelector(l)){const B=document.createElement("link");B.rel="stylesheet",B.href=f.iconCssUrl,B.setAttribute("data-rcui-icon","true"),document.head.appendChild(B)}}return Ln(t,f),t},Pn={install:Ue};function On(t){return{install(r){Ue(r,t)}}}exports.RECYCLE_UI_SYMBOL=Ie;exports.RcButton=J;exports.RcCalendar=pe;exports.RcCard=Ce;exports.RcDescriptions=Je;exports.RcDescriptionsItem=Qe;exports.RcIcon=A;exports.RcPopup=ve;exports.RcSearchArea=Pe;exports.RcToast=Be;exports.createRecycleUI=On;exports.default=Pn;exports.defaultRecycleUIConfig=We;exports.hideToast=Xe;exports.install=Ue;exports.installButton=Re;exports.installCalendar=Le;exports.installCard=Fe;exports.installDescriptions=Te;exports.installIcon=Ae;exports.installMessage=ze;exports.installPopup=Ye;exports.installSearchArea=Oe;exports.message=Ze;exports.rcDescriptions=Je;exports.rcDescriptionsItem=Qe;exports.showToast=Et;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),tt={key:0,class:"rc-icon__unicode"},nt=e.defineComponent({name:"rc-icon",__name:"index",props:{name:{},size:{default:16},color:{default:""},spin:{type:Boolean,default:!1},code:{default:""}},setup(t){const r=t,f=e.inject(Ie,{}),l=e.computed(()=>(f==null?void 0:f.iconClass)||"iconfont"),y=e.computed(()=>r.name||""),B=e.computed(()=>typeof r.size=="number"?`${r.size}px`:r.size||"16px"),v=e.computed(()=>({fontSize:B.value,color:r.color||void 0,lineHeight:1,fontFamily:(f==null?void 0:f.iconClass)||"iconfont"})),m=e.computed(()=>{const i=r.code;if(i==null||i===""||i===0)return"";if(typeof i=="number")return String.fromCharCode(i);const g=String(i).replace(/^0x/i,""),w=parseInt(g,16);return Number.isNaN(w)?"":String.fromCharCode(w)});return e.onMounted(()=>{if(typeof window>"u")return;const i=f&&f.iconCssUrl||We.iconCssUrl;if(!i)return;const g=`link[rel="stylesheet"][data-rcui-icon="true"][href="${i}"]`;if(!document.head.querySelector(g)){const b=document.createElement("link");b.rel="stylesheet",b.href=i,b.setAttribute("data-rcui-icon","true"),document.head.appendChild(b)}}),(i,g)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["rc-icon",[l.value,y.value,{"rc-icon--spin":t.spin}]]),style:e.normalizeStyle(v.value),"aria-hidden":"true"},[m.value?(e.openBlock(),e.createElementBlock("span",tt,e.toDisplayString(m.value),1)):e.createCommentVNode("",!0)],6))}}),Q=(t,r)=>{const f=t.__vccOpts||t;for(const[l,y]of r)f[l]=y;return f},A=Q(nt,[["__scopeId","data-v-3857a892"]]),at=["disabled"],lt={key:0,class:"rc-button__spinner"},ot={key:0,class:"rc-button__icon rc-button__icon--prefix"},rt={key:2,class:"rc-button__icon rc-button__icon--suffix"},ct=e.defineComponent({__name:"index",props:{type:{default:"default"},size:{default:"medium"},mode:{default:void 0},block:{type:Boolean,default:!1},label:{default:""},round:{type:[Number,String,Boolean],default:6},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},preIcon:{default:""},suffixIcon:{default:""}},emits:["click"],setup(t,{emit:r}){const f=t,l=r,y=v=>{!f.disabled&&!f.loading&&l("click",v)},B=e.computed(()=>{const v=f.round;return typeof v=="boolean"?v?"999px":"6px":typeof v=="number"?`${v}px`:String(v)});return(v,m)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["rc-button",[`rc-button--${t.type}`,`rc-button--${t.size}`,t.mode?`rc-button--${t.mode}`:"",{"is-block":t.block,"is-disabled":t.disabled,"is-loading":t.loading}]]),style:e.normalizeStyle({borderRadius:B.value}),disabled:t.disabled||t.loading,onClick:y},[t.loading?(e.openBlock(),e.createElementBlock("span",lt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.preIcon||v.$slots.preIcon?(e.openBlock(),e.createElementBlock("span",ot,[e.renderSlot(v.$slots,"preIcon",{},()=>[t.preIcon?(e.openBlock(),e.createBlock(A,{key:0,name:t.preIcon},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],64)),e.renderSlot(v.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0),!t.loading&&(t.suffixIcon||v.$slots.suffixIcon)?(e.openBlock(),e.createElementBlock("span",rt,[e.renderSlot(v.$slots,"suffixIcon",{},()=>[t.suffixIcon?(e.openBlock(),e.createBlock(A,{key:0,name:t.suffixIcon},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],14,at))}}),J=Q(ct,[["__scopeId","data-v-4c6a5e4f"]]);J.name="rc-button";function Re(t){return t.component(J.name,J),t}const st={class:"rc-desc-item__value"},ut=e.defineComponent({name:"rc-descriptions-item",__name:"item",props:{label:{default:""},value:{default:""},labelWidth:{default:""},span:{default:1}},setup(t){const r=t;e.inject("rcDescItemWidth",void 0),e.inject("rcDescSingleWidth",""),e.inject("rcDescGap","0px");const f=e.inject("rcDescGapPx",0),l=e.inject("rcDescColCount",1),y=e.inject("rcDescLabelWidth",""),B=e.computed(()=>{const i=typeof r.span=="string"?parseInt(r.span,10):r.span,g=typeof(l==null?void 0:l.value)=="number"?l.value:l,w=!Number.isNaN(i)&&i>0?i:1;return Math.min(w,g||1)}),v=e.computed(()=>{const i=typeof(l==null?void 0:l.value)=="number"?l.value:l,g=typeof(f==null?void 0:f.value)=="number"?f.value:f,w=B.value;if(!i||i<=1||w>=i)return"100%";const b=(i-1)*g,_=(w-1)*g;return`calc((100% - ${b}px) * ${w} / ${i} + ${_}px)`}),m=e.computed(()=>{const i=typeof(y==null?void 0:y.value)=="string"?y.value:y,g=r.labelWidth!==""?r.labelWidth:i||"";return g?{width:typeof g=="number"?`${g}px`:String(g),flex:"0 0 auto"}:{}});return(i,g)=>(e.openBlock(),e.createElementBlock("div",{class:"rc-desc-item",style:e.normalizeStyle({width:v.value,flex:`0 0 ${v.value}`})},[e.createElementVNode("div",{class:"rc-desc-item__label",style:e.normalizeStyle(m.value)},[e.renderSlot(i.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],4),e.createElementVNode("div",st,[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.value),1)],!0)])],4))}}),fe=Q(ut,[["__scopeId","data-v-970d0b99"]]),it={class:"rc-descriptions"},dt={key:0,class:"rc-descriptions__title"},ft=e.defineComponent({name:"rc-descriptions",__name:"index",props:{title:{},column:{default:2},gap:{default:4},labelWidth:{default:""},data:{default:()=>[]},keyMap:{}},setup(t){const r=t,f=e.ref(null),l=e.computed(()=>typeof r.gap=="number"?`${r.gap}px`:String(r.gap)),y=e.computed(()=>{const g=typeof r.column=="string"?Number.parseInt(r.column,10):r.column??1;return!Number.isNaN(g)&&g>0?g:1}),B=e.ref("100%"),v=e.ref("100%");e.watchEffect(()=>{const g=y.value;if(g<=1)B.value="100%",v.value="100%";else{const w=typeof r.gap=="number"?r.gap:parseFloat(String(r.gap))||0,_=`calc((100% - ${(g-1)*w}px) / ${g})`;v.value=_,B.value=_}}),e.provide("rcDescItemWidth",B),e.provide("rcDescSingleWidth",v),e.provide("rcDescColCount",y),e.provide("rcDescGapPx",e.computed(()=>typeof r.gap=="number"?r.gap:parseFloat(String(r.gap))||0));const m=e.computed(()=>r.labelWidth===""||r.labelWidth===void 0?"":typeof r.labelWidth=="number"?`${r.labelWidth}px`:String(r.labelWidth));e.provide("rcDescLabelWidth",m),e.provide("rcDescGap",e.computed(()=>typeof r.gap=="number"?`${r.gap}px`:String(r.gap)));const i=e.computed(()=>{var b,_,D;const g=((b=r.keyMap)==null?void 0:b.key)??"label",w=((_=r.keyMap)==null?void 0:_.value)??"value";return(D=r.data)!=null&&D.length?r.data.map(S=>({label:S==null?void 0:S[g],value:S==null?void 0:S[w]})):[]});return(g,w)=>(e.openBlock(),e.createElementBlock("div",it,[g.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(g.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-descriptions__body",style:e.normalizeStyle({gap:l.value}),ref_key:"wrapEl",ref:f},[i.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value,(b,_)=>(e.openBlock(),e.createBlock(fe,{key:_,label:b.label,value:b.value,"label-width":t.labelWidth},null,8,["label","value","label-width"]))),128)):e.renderSlot(g.$slots,"default",{key:1},void 0,!0)],4)]))}}),_e=Q(ft,[["__scopeId","data-v-5fcaa235"]]);_e.name="rc-descriptions";fe.name="rc-descriptions-item";function Te(t){return t.component(_e.name,_e),t.component("RcDescriptions",_e),t.component(fe.name,fe),t.component("RcDescriptionsItem",fe),t}const Je=_e,Qe=fe,mt={class:"rc-card__title"},vt={class:"rc-card__title-text"},pt={key:0,class:"rc-card__status"},yt={key:1,class:"rc-card__divider"},gt={key:2,class:"rc-card__action"},ht=e.defineComponent({name:"rc-card",__name:"index",props:{color:{default:"var(--rc-white)"},topBgColor:{default:"rgba(29, 133, 252, 0.05)"},title:{default:""},status:{default:""},statusColor:{default:"var(--rc-primary)"},round:{default:8},bordered:{type:Boolean,default:!1},elevation:{default:2},padding:{default:"16px"},gap:{default:12},width:{default:"100%"},height:{default:""}},setup(t){const r=t,f=e.computed(()=>{const m=typeof r.round=="boolean"?r.round?"12px":"0":typeof r.round=="number"?`${r.round}px`:String(r.round);return{backgroundColor:r.color||"var(--rc-white)",borderRadius:m,boxShadow:v(r.elevation),width:B(r.width),height:B(r.height)}}),l=e.computed(()=>r.padding||"16px"),y=e.computed(()=>typeof r.gap=="number"?`${r.gap}px`:String(r.gap));function B(m){return m==null||m===""?"":typeof m=="number"?`${m}px`:String(m)}function v(m){if(!m||m<=0)return"none";const i=4*m;return`0 ${Math.round(i/2)}px ${i}px rgba(0,0,0,0.06), 0 ${Math.round(i/4)}px ${Math.round(i/2)}px rgba(0,0,0,0.04)`}return(m,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-card",[{"rc-card--bordered":t.bordered}]]),style:e.normalizeStyle(f.value)},[m.$slots.title||t.title||m.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-card__top",style:e.normalizeStyle({backgroundColor:t.topBgColor||"rgba(29, 133, 252, 0.05)"})},[e.createElementVNode("div",mt,[e.renderSlot(m.$slots,"title",{},()=>[e.createElementVNode("span",vt,e.toDisplayString(t.title),1)],!0)]),m.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",pt,[e.renderSlot(m.$slots,"status",{},()=>[e.createElementVNode("span",{class:"rc-card__status-text",style:e.normalizeStyle({color:t.statusColor||"var(--rc-primary)"})},e.toDisplayString(t.status),5)],!0)])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-card__body",style:e.normalizeStyle({padding:l.value,gap:y.value})},[e.renderSlot(m.$slots,"content",{},()=>[e.renderSlot(m.$slots,"default",{},void 0,!0)],!0)],4),m.$slots.action?(e.openBlock(),e.createElementBlock("div",yt)):e.createCommentVNode("",!0),m.$slots.action?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(m.$slots,"action",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),Ce=Q(ht,[["__scopeId","data-v-a7b95214"]]);Ce.name="rc-card";const kt="RcCard";function Fe(t){return t.component(Ce.name,Ce),t.component(kt,Ce),t}const _t={key:0,class:"rc-toast__mask"},Ct={class:"rc-toast__content"},Bt={key:0,class:"rc-toast__spinner"},bt={key:1,class:"rc-toast__icon rc-toast__icon--success"},Dt={key:2,class:"rc-toast__icon rc-toast__icon--fail"},Vt={class:"rc-toast__text"},St=e.defineComponent({__name:"index",props:{message:{default:""},type:{default:"text"},duration:{default:2e3},mask:{type:Boolean,default:!1},onAfterLeave:{}},setup(t,{expose:r}){const f=t,l=e.ref(!0);let y;function B(){y&&(clearTimeout(y),y=null)}function v(){B(),l.value=!1}return r({close:v}),e.onMounted(()=>{f.duration&&f.duration>0&&(y=setTimeout(()=>{v()},f.duration))}),e.onUnmounted(()=>{B()}),(m,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-toast-fade",onAfterLeave:t.onAfterLeave},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-toast",[`rc-toast--${t.type}`]])},[t.mask?(e.openBlock(),e.createElementBlock("div",_t)):e.createCommentVNode("",!0),e.createElementVNode("div",Ct,[t.type==="loading"?(e.openBlock(),e.createElementBlock("div",Bt)):t.type==="success"?(e.openBlock(),e.createElementBlock("div",bt)):t.type==="fail"?(e.openBlock(),e.createElementBlock("div",Dt)):e.createCommentVNode("",!0),e.createElementVNode("div",Vt,e.toDisplayString(t.message),1)])],2)):e.createCommentVNode("",!0)]),_:1},8,["onAfterLeave"])])),e.renderSlot(m.$slots,"default",{},void 0,!0)],64))}}),Be=Q(St,[["__scopeId","data-v-d234c9c5"]]);let se=null,me=null;function Ke(){se&&(se.unmount(),se=null),me&&(document.body.removeChild(me),me=null)}function Et(t){const r=typeof t=="string"?{message:t}:t||{};Ke(),me=document.createElement("div"),document.body.appendChild(me);const f={message:r.message,type:r.type??"text",duration:r.duration??2e3,mask:r.mask??!1,onAfterLeave:()=>{var l;Ke(),(l=r.onClose)==null||l.call(r)}};return se=e.createApp(Be,f),se.mount(me),{close:Xe}}function Xe(){var t,r,f;se&&((f=(r=(t=se._instance)==null?void 0:t.exposed)==null?void 0:r.close)==null||f.call(r))}Be.name="rc-toast";function He(t){return t.component(Be.name,Be),t}const $t={class:"rc-message",role:"alert","aria-live":"polite"},xt={class:"rc-message__content"},wt=e.defineComponent({__name:"index",setup(t,{expose:r}){const f=e.reactive([]);let l=1;function y(v){const m=f.findIndex(i=>i.id===v);m>=0&&f.splice(m,1)}function B(v,m,i){const g=l++;return f.push({id:g,type:v,content:m,duration:i}),i>0&&window.setTimeout(()=>y(g),i),g}return r({add:B,remove:y}),(v,m)=>(e.openBlock(),e.createElementBlock("div",$t,[e.createVNode(e.TransitionGroup,{name:"rc-message-fade",tag:"div"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:e.normalizeClass(["rc-message__item",`rc-message--${i.type}`])},[e.createElementVNode("span",xt,e.toDisplayString(i.content),1)],2))),128))]),_:1})]))}}),Nt=Q(wt,[["__scopeId","data-v-87811df0"]]);let le=null,ae=null;function It(){var r;if(le&&ae)return;le=document.createElement("div"),document.body.appendChild(le);const t=e.createVNode(Nt,{});e.render(t,le),ae=(r=t.component)==null?void 0:r.exposed}function de(t,r,f){var y;It();const l=typeof f=="number"?f:t==="loading"?0:2e3;return(y=ae==null?void 0:ae.add)==null?void 0:y.call(ae,t,r,l)}const Ze={open(t){return de(t.type||"info",t.content,t.duration)},info(t,r){return de("info",t,r)},success(t,r){return de("success",t,r)},warning(t,r){return de("warning",t,r)},error(t,r){return de("error",t,r)},loading(t,r){return de("loading",t,r)},destroy(){le&&(e.render(null,le),le.remove(),le=null,ae=null)}};function ze(t){return t.config.globalProperties.$message=Ze,t}A.name="rc-icon";function Ae(t){return t.component(A.name,A),t.component("RcIcon",A),t}const Mt={class:"rc-popup__content"},Rt=e.defineComponent({name:"rc-popup",__name:"index",props:{modelValue:{type:Boolean,default:!1},position:{default:"center"},overlay:{type:Boolean,default:!0},overlayClass:{default:""},overlayStyle:{default:void 0},closeable:{type:Boolean,default:!1},closeIconPosition:{default:"top-right"},closeIcon:{default:"icon_close"},round:{type:Boolean,default:!1},popupStyle:{default:void 0},closeOnClickOverlay:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0}},emits:["update:modelValue","open","close","click-overlay"],setup(t,{expose:r,emit:f}){const l=t,y=f,B=e.ref(),v=e.ref(l.modelValue);e.watch(()=>l.modelValue,u=>{v.value=u,u?(y("open"),l.lockScroll&&w()):(y("close"),l.lockScroll&&b())},{immediate:!0}),e.watch(v,u=>{u!==l.modelValue&&y("update:modelValue",u)});const m=e.computed(()=>`rc-popup-slide-${l.position}`),i=e.computed(()=>({...l.popupStyle||{}}));let g=!1;function w(){g||(g=!0,document.body.style.overflow="hidden")}function b(){g&&(g=!1,document.body.style.overflow="")}function _(){y("click-overlay"),l.closeOnClickOverlay&&S()}function D(){S()}function S(){v.value=!1}function C(){v.value=!0}return e.onUnmounted(()=>{b()}),r({open:C,close:S,visible:v}),(u,te)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-popup-fade"},{default:e.withCtx(()=>[v.value&&l.overlay?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-popup__overlay",{"rc-popup__overlay--transparent":l.overlayClass==="transparent"}]),style:e.normalizeStyle(l.overlayStyle),onClick:_},null,6)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:m.value},{default:e.withCtx(()=>[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popupRef",ref:B,class:e.normalizeClass(["rc-popup",[`rc-popup--${t.position}`,{"rc-popup--round":t.round}]]),style:e.normalizeStyle(i.value),onClick:te[0]||(te[0]=e.withModifiers(()=>{},["stop"]))},[t.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-popup__close",`rc-popup__close--${t.closeIconPosition}`]),onClick:D},[e.createVNode(A,{name:t.closeIcon,class:"rc-popup__close-icon"},null,8,["name"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",Mt,[e.renderSlot(u.$slots,"default",{},void 0,!0)])],6)):e.createCommentVNode("",!0)]),_:3},8,["name"])]))}}),ve=Q(Rt,[["__scopeId","data-v-f1696784"]]);ve.name="rc-popup";const Tt="RcPopup";function Ye(t){return t.component(ve.name,ve),t.component(Tt,ve),t}const Ft={key:0,class:"rc-calendar__header"},zt={class:"rc-calendar__header-title"},At={key:1,class:"rc-calendar__shortcuts"},Yt={class:"rc-calendar__shortcuts-scroll"},Lt=["onClick"],Pt={class:"rc-calendar__month-title"},Ot={class:"rc-calendar__weekdays"},Wt={class:"rc-calendar__days"},Ut=["onClick"],jt={class:"rc-calendar__day-content"},Gt={class:"rc-calendar__day-text"},Kt={key:0,class:"rc-calendar__day-bottom"},Ht={key:2,class:"rc-calendar__footer"},qt={key:0,class:"rc-calendar__month-picker-overlay"},Jt={class:"rc-calendar__month-picker"},Qt={class:"rc-calendar__month-picker-header"},Xt={class:"rc-calendar__month-picker-title"},Zt={key:0},en={key:0,class:"rc-calendar__year-picker-content"},tn={class:"rc-calendar__year-picker-grid"},nn=["onClick"],an={key:1,class:"rc-calendar__month-picker-content"},ln=["onClick"],Ne=48,j=3,Me=7,on=e.defineComponent({__name:"panel-content",props:{showTitle:{type:Boolean},title:{},range:{type:Boolean},selectedDate:{},rangeStart:{},rangeEnd:{},minDate:{},maxDate:{},disabledDate:{type:Function},formatter:{type:Function},showFooter:{type:Boolean},maxRangeDays:{}},emits:["select-day","clear","confirm","shortcut-select"],setup(t,{expose:r,emit:f}){const l=t,y=f,B=["日","一","二","三","四","五","六"];function v(n){if(!n)return null;const c=new Date(n);return isNaN(c.getTime())?null:c}function m(n){const c=n.getFullYear(),d=String(n.getMonth()+1).padStart(2,"0"),V=String(n.getDate()).padStart(2,"0");return`${c}-${d}-${V}`}const i=e.ref(new Date);e.watch(()=>[l.selectedDate,l.rangeStart],()=>{if(l.range&&l.rangeStart){const n=v(l.rangeStart);n&&(i.value=n)}else if(!l.range&&l.selectedDate){const n=v(l.selectedDate);n&&(i.value=n)}},{immediate:!0});function g(n){const c=new Date;return n.getFullYear()===c.getFullYear()&&n.getMonth()===c.getMonth()&&n.getDate()===c.getDate()}function w(n){if(!l.rangeStart||!l.rangeEnd)return!1;const c=m(n),d=l.rangeStart,V=l.rangeEnd;return c>d&&c<V}function b(n){if(l.disabledDate&&l.disabledDate(n))return!0;const c=m(n);return!!(l.minDate&&c<l.minDate||l.maxDate&&c>l.maxDate)}function _(n,c){const d=new Date(n,c,1),V=new Date(n,c+1,0),E=d.getDay(),H=V.getDate(),q=[],je=new Date(n,c,0).getDate();for(let O=E-1;O>=0;O--){const W={date:new Date(n,c-1,je-O),type:"prev-month",text:String(je-O)};if(l.formatter){const U=l.formatter(W);U.text&&(W.text=U.text),U.bottomInfo&&(W.bottomInfo=U.bottomInfo)}q.push(W)}for(let O=1;O<=H;O++){const W={date:new Date(n,c,O),type:"current-month",text:String(O)};if(l.formatter){const U=l.formatter(W);U.text&&(W.text=U.text),U.bottomInfo&&(W.bottomInfo=U.bottomInfo)}q.push(W)}const et=42-q.length;for(let O=1;O<=et;O++){const W={date:new Date(n,c+1,O),type:"next-month",text:String(O)};if(l.formatter){const U=l.formatter(W);U.text&&(W.text=U.text),U.bottomInfo&&(W.bottomInfo=U.bottomInfo)}q.push(W)}return q}const D=e.computed(()=>{const n=i.value.getFullYear(),c=i.value.getMonth();return _(n,c)}),S=e.computed(()=>{const n=i.value.getFullYear(),c=i.value.getMonth()+1;return`${n}年${c}月`});function C(n){const c=[];if(n.type!=="current-month"&&c.push("is-other-month"),g(n.date)&&c.push("is-today"),b(n.date))return c.push("is-disabled"),c;const d=m(n.date);return l.range?(l.rangeStart===d&&c.push("is-start"),l.rangeEnd===d&&c.push("is-end"),w(n.date)&&c.push("is-in-range")):l.selectedDate===d&&c.push("is-selected"),c}const u=e.computed(()=>!!(l.rangeStart&&l.rangeEnd)),te=e.computed(()=>l.rangeStart&&l.rangeEnd?2:l.rangeStart||l.rangeEnd?1:0);function oe(n){if(!l.minDate&&!l.maxDate)return!1;const c=l.minDate?v(l.minDate):null,d=l.maxDate?v(l.maxDate):null;return!!(c&&n<c.getFullYear()||d&&n>d.getFullYear())}function re(n,c){const d=l.minDate?v(l.minDate):null,V=l.maxDate?v(l.maxDate):null;if(d){const E=d.getFullYear(),H=d.getMonth()+1;if(n<E||n===E&&c<H)return!0}if(V){const E=V.getFullYear(),H=V.getMonth()+1;if(n>E||n===E&&c>H)return!0}return!1}const F=e.ref(!1),I=e.ref("year"),R=e.ref(i.value.getFullYear()),Y=e.ref(i.value.getMonth()+1),L=e.ref(),P=e.ref(1900),T=e.ref(1920),M=e.ref(1900),G=e.ref(2100),ue=e.computed(()=>{const n=[],d=Math.floor((P.value-M.value)/j)-3,V=Math.ceil((T.value-M.value)/j)+3,E=M.value+Math.max(0,d)*j,H=M.value+V*j-1;for(let q=E;q<=H;q++)n.push(q);return n});e.watch(()=>i.value,n=>{R.value=n.getFullYear(),Y.value=n.getMonth()+1},{immediate:!0});function ye(){if(!L.value)return;const n=L.value.scrollTop,d=Math.max(0,Math.floor(n/Ne)),V=M.value+d*j,E=V+Me*j-1;V<M.value?M.value=V-100:E>G.value&&(G.value=E+100),(V!==P.value||E!==T.value)&&(P.value=V,T.value=E)}function ge(){R.value=i.value.getFullYear(),Y.value=i.value.getMonth()+1,I.value="year",F.value=!0;const n=R.value;n<M.value?M.value=Math.floor(n/100)*100:n>G.value&&(G.value=Math.ceil(n/100)*100+99),e.nextTick(()=>{if(L.value){const c=Math.floor((n-M.value)/j),d=Math.max(0,c-2);P.value=M.value+d*j,T.value=P.value+Me*j-1,ie(n)}})}function ie(n){if(!L.value)return;n<M.value?M.value=Math.floor(n/100)*100:n>G.value&&(G.value=Math.ceil(n/100)*100+99);const c=Math.floor((n-M.value)/j),d=c*Ne;L.value.scrollTop=d;const V=Math.max(0,c-2);P.value=M.value+V*j,T.value=P.value+Me*j-1}function p(){const n=new Date(i.value);n.setMonth(n.getMonth()-1),i.value=n}function h(){const n=new Date(i.value);n.setMonth(n.getMonth()+1),i.value=n}function $(n){oe(n)||(R.value=n,I.value="month")}function z(n){re(R.value,n)||(Y.value=n,X())}function X(){const n=new Date(i.value);n.setFullYear(R.value),n.setMonth(Y.value-1),i.value=n,F.value=!1,I.value="year"}function Z(n){y("select-day",n)}function ce(){y("clear")}function a(){K.value&&ce()}function o(){y("confirm")}function s(){F.value=!1}function k(n){I.value=n}function N(){const c=new Date().getFullYear();oe(c)||(R.value=c,I.value="month")}function x(){const c=new Date().getMonth()+1;re(R.value,c)||(Y.value=c,X())}const K=e.computed(()=>l.range?!!(l.rangeStart||l.rangeEnd):!!l.selectedDate);function ne(n,c){const d=v(n),V=v(c);if(!d||!V)return 0;const E=Math.abs(V.getTime()-d.getTime());return Math.ceil(E/(1e3*60*60*24))+1}function ee(){return m(new Date)}function he(){const n=new Date,c=n.getDay(),d=n.getDate()-c+(c===0?-6:1);return new Date(n.getFullYear(),n.getMonth(),d)}function be(){const n=he(),c=new Date(n);return c.setDate(n.getDate()+6),c}function De(){const n=new Date;return new Date(n.getFullYear(),n.getMonth(),1)}function ke(){const n=new Date;return new Date(n.getFullYear(),n.getMonth()+1,0)}function Ve(){const n=new Date;return new Date(n.getFullYear(),n.getMonth()-2,1)}function Se(){const n=new Date;return new Date(n.getFullYear(),0,1)}function Ee(){const n=new Date;return new Date(n.getFullYear(),11,31)}const $e=[{key:"today",label:"本日",days:1,getRange:()=>{const n=ee();return[n,n]}},{key:"week",label:"本周",days:7,getRange:()=>{const n=m(he()),c=m(be());return[n,c]}},{key:"month",label:"本月",getRange:()=>{const n=m(De()),c=m(ke());return[n,c]}},{key:"threeMonths",label:"近三月",getRange:()=>{const n=m(Ve()),c=m(ke());return[n,c]}},{key:"year",label:"本年",getRange:()=>{const n=m(Se()),c=m(Ee());return[n,c]}},{key:"last7Days",label:"近7天",days:7,getRange:()=>{const n=new Date,c=new Date(n);return c.setDate(n.getDate()-6),[m(c),ee()]}},{key:"last30Days",label:"近30天",days:30,getRange:()=>{const n=new Date,c=new Date(n);return c.setDate(n.getDate()-29),[m(c),ee()]}}],xe=e.computed(()=>$e.filter(n=>{if(l.maxRangeDays!==void 0){if(n.days!==void 0)return n.days<=l.maxRangeDays;{const c=n.getRange();if(c)return ne(c[0],c[1])<=l.maxRangeDays}}return!0}));function we(n){const c=n.getRange();if(c){if(l.minDate&&c[0]<l.minDate||l.maxDate&&c[1]>l.maxDate)return;y("shortcut-select",c)}}return r({yearScrollRef:L}),(n,c)=>(e.openBlock(),e.createElementBlock("div",null,[t.showTitle?(e.openBlock(),e.createElementBlock("div",Ft,[e.createElementVNode("div",zt,e.toDisplayString(t.title),1),e.createElementVNode("span",{class:e.normalizeClass(["rc-calendar__header-clear",{"is-disabled":!K.value}]),onClick:a}," 清空 ",2)])):e.createCommentVNode("",!0),t.range?(e.openBlock(),e.createElementBlock("div",At,[e.createElementVNode("div",Yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.key,class:"rc-calendar__shortcut-item",onClick:V=>we(d)},e.toDisplayString(d.label),9,Lt))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Pt,[e.createElementVNode("div",{class:"rc-calendar__nav-button",onClick:p},[e.createVNode(e.unref(A),{name:"icon_caret-left",class:"rc-calendar__nav-icon"})]),e.createElementVNode("div",{class:"rc-calendar__month-text",onClick:ge},e.toDisplayString(S.value),1),e.createElementVNode("div",{class:"rc-calendar__nav-button",onClick:h},[e.createVNode(e.unref(A),{name:"icon_caret-right",class:"rc-calendar__nav-icon"})])]),e.createElementVNode("div",Ot,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(B,d=>e.createElementVNode("div",{key:d,class:"rc-calendar__weekday"},e.toDisplayString(d),1)),64))]),e.createElementVNode("div",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(d,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:e.normalizeClass(["rc-calendar__day",C(d)]),onClick:E=>Z(d)},[e.createElementVNode("div",jt,[e.createElementVNode("span",Gt,e.toDisplayString(d.text),1),d.bottomInfo?(e.openBlock(),e.createElementBlock("span",Kt,e.toDisplayString(d.bottomInfo),1)):e.createCommentVNode("",!0)])],10,Ut))),128))]),t.range&&t.showFooter?(e.openBlock(),e.createElementBlock("div",Ht,[e.createVNode(e.unref(J),{type:"default",class:"rc-calendar__footer-reset",onClick:ce},{default:e.withCtx(()=>[...c[2]||(c[2]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(J),{type:"primary",class:"rc-calendar__footer-confirm",disabled:!u.value,onClick:o},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value?`确定(${te.value}项)`:"确定"),1)]),_:1},8,["disabled"])])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"rc-calendar-fade"},{default:e.withCtx(()=>[F.value?(e.openBlock(),e.createElementBlock("div",qt,[e.createElementVNode("div",Jt,[e.createElementVNode("div",Qt,[e.createVNode(e.unref(J),{type:"default",mode:"text",size:"small",onClick:s},{default:e.withCtx(()=>[...c[3]||(c[3]=[e.createTextVNode("取消",-1)])]),_:1}),e.createElementVNode("div",Xt,[e.createElementVNode("span",{onClick:c[0]||(c[0]=d=>k("year"))},e.toDisplayString(R.value)+"年",1),I.value==="month"?(e.openBlock(),e.createElementBlock("span",Zt," - ")):e.createCommentVNode("",!0),I.value==="month"?(e.openBlock(),e.createElementBlock("span",{key:1,onClick:c[1]||(c[1]=d=>k("month"))},e.toDisplayString(Y.value)+"月",1)):e.createCommentVNode("",!0)]),I.value==="year"?(e.openBlock(),e.createBlock(e.unref(J),{key:0,type:"primary",mode:"text",size:"small",onClick:N},{default:e.withCtx(()=>[...c[4]||(c[4]=[e.createTextVNode(" 本年 ",-1)])]),_:1})):e.createCommentVNode("",!0),I.value==="month"?(e.openBlock(),e.createBlock(e.unref(J),{key:1,type:"primary",mode:"text",size:"small",onClick:x},{default:e.withCtx(()=>[...c[5]||(c[5]=[e.createTextVNode(" 本月 ",-1)])]),_:1})):e.createCommentVNode("",!0)]),I.value==="year"?(e.openBlock(),e.createElementBlock("div",en,[e.createElementVNode("div",{class:"rc-calendar__year-picker-scroll",ref_key:"yearScrollRef",ref:L,onScroll:ye},[e.createElementVNode("div",{class:"rc-calendar__year-picker-spacer",style:e.normalizeStyle({height:`${Math.floor((P.value-M.value)/j)*Ne}px`})},null,4),e.createElementVNode("div",tn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d,class:e.normalizeClass(["rc-calendar__year-picker-item",{"is-selected":R.value===d,"is-disabled":oe(d)}]),onClick:V=>$(d)},e.toDisplayString(d),11,nn))),128))]),e.createElementVNode("div",{class:"rc-calendar__year-picker-spacer",style:e.normalizeStyle({height:`${Math.ceil((G.value-T.value)/j)*Ne}px`})},null,4)],544)])):e.createCommentVNode("",!0),I.value==="month"?(e.openBlock(),e.createElementBlock("div",an,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(12,d=>e.createElementVNode("div",{key:d,class:e.normalizeClass(["rc-calendar__month-picker-item",{"is-selected":Y.value===d,"is-disabled":re(R.value,d)}]),onClick:V=>z(d)},e.toDisplayString(d)+"月 ",11,ln)),64))])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1})]))}}),qe=Q(on,[["__scopeId","data-v-0bf1834b"]]),rn={class:"rc-calendar"},cn=["placeholder"],sn={class:"rc-calendar__input-actions"},un={key:1,class:"rc-calendar__panel"},dn=e.defineComponent({name:"rc-calendar",__name:"index",props:{modelValue:{default:null},range:{type:[Boolean,Number],default:!1},mode:{default:"default"},placeholder:{default:"请选择日期"},showTitle:{type:Boolean,default:!0},title:{default:"选择日期"},minDate:{default:void 0},maxDate:{default:void 0},disabledDate:{type:Function,default:void 0},formatter:{type:Function,default:void 0},showFooter:{type:Boolean,default:!0},endDateOffset:{type:Boolean,default:!1}},emits:["update:modelValue","change","confirm"],setup(t,{emit:r}){const f=t,l=r,y=e.ref(),B=e.ref(),v=e.ref(!1),m=e.ref(""),i=e.computed(()=>f.range===!0||typeof f.range=="number"),g=e.computed(()=>typeof f.range=="number"?f.range:void 0),w=e.computed(()=>p=>{if(f.disabledDate&&f.disabledDate(p))return!0;if(g.value!==void 0&&_.value&&!D.value){const h=u(p);if(C(_.value)&&te(_.value,h)>g.value)return!0}return!1}),b=e.ref(null),_=e.ref(null),D=e.ref(null);e.watch(()=>f.modelValue,p=>{i.value?Array.isArray(p)&&p.length===2?(_.value=p[0],D.value=I(p[1])):(_.value=null,D.value=null):b.value=typeof p=="string"?p:null,S()},{immediate:!0});function S(){f.mode==="popup"&&(i.value?_.value&&D.value?m.value=`${_.value} ~ ${D.value}`:_.value?m.value=`${_.value} ~ `:m.value="":m.value=b.value||"")}function C(p){if(!p)return null;const h=new Date(p);return isNaN(h.getTime())?null:h}function u(p){const h=p.getFullYear(),$=String(p.getMonth()+1).padStart(2,"0"),z=String(p.getDate()).padStart(2,"0");return`${h}-${$}-${z}`}function te(p,h){const $=C(p),z=C(h);if(!$||!z)return 0;const X=Math.abs(z.getTime()-$.getTime());return Math.ceil(X/(1e3*60*60*24))}function oe(p){const h=C(p);return h?(h.setDate(h.getDate()+1),u(h)):p}function re(p){const h=C(p);return h?(h.setDate(h.getDate()-1),u(h)):p}function F(p){return f.endDateOffset&&i.value?oe(p):p}function I(p){return f.endDateOffset&&i.value?re(p):p}function R(p){if(p.type!=="current-month"||f.disabledDate&&f.disabledDate(p.date))return;const h=u(p.date);if(!(f.minDate&&h<f.minDate)&&!(f.maxDate&&h>f.maxDate)){if(i.value)if(!_.value||_.value&&D.value)_.value=h,D.value=null;else{let $=_.value,z=h;if(h<_.value&&(z=_.value,$=h),_.value=$,D.value=z,_.value&&D.value){const X=F(D.value),Z=[_.value,X];l("update:modelValue",Z),l("change",Z),f.showFooter||Y()}}else{b.value=h;const $=h;l("update:modelValue",$),l("change",$),f.mode&&M()}S()}}function Y(){if(_.value&&D.value){const p=F(D.value),h=[_.value,p];l("update:modelValue",h),l("change",h),l("confirm",h),M()}}function L(){i.value?(_.value=null,D.value=null):b.value=null;const p=null;l("update:modelValue",p),l("change",p),S()}function P(p){_.value=p[0],D.value=p[1];const h=F(p[1]),$=[p[0],h];l("update:modelValue",$),l("change",$),f.showFooter?S():Y()}function T(){v.value=!0}function M(){v.value=!1}function G(p){v.value=p}function ue(){T()}function ye(){f.mode==="popup"&&ie()}function ge(){v.value||T()}function ie(){const p=m.value.trim();if(i.value){const h=p.split("~").map($=>$.trim());if(h.length===2&&h[0]&&h[1]){const $=C(h[0]),z=C(h[1]);if($&&z&&!isNaN($.getTime())&&!isNaN(z.getTime())){_.value=u($);const X=u(z);D.value=I(X);const Z=F(D.value),ce=[_.value,Z];l("update:modelValue",ce),l("change",ce);return}}}else{const h=C(p);if(h&&!isNaN(h.getTime())){b.value=u(h),l("update:modelValue",b.value),l("change",b.value);return}}S()}return(p,h)=>(e.openBlock(),e.createElementBlock("div",rn,[t.mode==="popup"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-calendar__input",onClick:T},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:y,"onUpdate:modelValue":h[0]||(h[0]=$=>m.value=$),type:"text",class:"rc-calendar__input-field",placeholder:t.placeholder,readonly:"",onFocus:ue,onBlur:ye,onInput:ge},null,40,cn),[[e.vModelText,m.value]]),e.createElementVNode("div",sn,[e.createVNode(e.unref(A),{name:"icon_a-rili",class:"rc-calendar__input-icon"})])])):e.createCommentVNode("",!0),t.mode==="default"?(e.openBlock(),e.createElementBlock("div",un,[e.createVNode(qe,{"show-title":t.showTitle,title:t.title,range:i.value,"selected-date":b.value,"range-start":_.value,"range-end":D.value,"min-date":t.minDate,"max-date":t.maxDate,"disabled-date":w.value,formatter:t.formatter,"show-footer":!1,"max-range-days":g.value,onSelectDay:R,onClear:L,onConfirm:Y,onShortcutSelect:P},null,8,["show-title","title","range","selected-date","range-start","range-end","min-date","max-date","disabled-date","formatter","max-range-days"])])):e.createCommentVNode("",!0),t.mode==="popup"?(e.openBlock(),e.createBlock(e.unref(ve),{key:2,modelValue:v.value,"onUpdate:modelValue":[h[1]||(h[1]=$=>v.value=$),G],position:"bottom",overlay:!0,round:!0,"close-on-click-overlay":!0,"lock-scroll":!0},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"popupPanelRef",ref:B,class:"rc-calendar__panel"},[e.createVNode(qe,{"show-title":t.showTitle,title:t.title,range:i.value,"selected-date":b.value,"range-start":_.value,"range-end":D.value,"min-date":t.minDate,"max-date":t.maxDate,"disabled-date":w.value,formatter:t.formatter,"show-footer":t.showFooter,"max-range-days":g.value,onSelectDay:R,onClear:L,onConfirm:Y,onShortcutSelect:P},null,8,["show-title","title","range","selected-date","range-start","range-end","min-date","max-date","disabled-date","formatter","show-footer","max-range-days"])],512)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]))}}),pe=Q(dn,[["__scopeId","data-v-96b29c22"]]);pe.name="rc-calendar";const fn="RcCalendar";function Le(t){return t.component(pe.name,pe),t.component(fn,pe),t}const mn={class:"rc-search-area"},vn={class:"rc-search-area__bar"},pn=["onClick"],yn={class:"rc-search-area__item-label"},gn={class:"rc-search-area__panel-content"},hn={key:1,class:"rc-search-area__input-wrapper"},kn=["placeholder"],_n={key:2,class:"rc-search-area__calendar-wrapper"},Cn={key:3,class:"rc-search-area__tree-container"},Bn={class:"rc-search-area__tree-group-title"},bn={class:"rc-search-area__tree-group-options"},Dn=["onClick"],Vn={class:"rc-search-area__option-label"},Sn={key:4,class:"rc-search-area__tree-container"},En={class:"rc-search-area__tree-group-title"},$n={class:"rc-search-area__tree-group-options"},xn=["onClick"],wn={class:"rc-search-area__option-label"},Nn={key:5,class:"rc-search-area__options-grid"},In=["onClick"],Mn={class:"rc-search-area__option-label"},Rn={key:6,class:"rc-search-area__options-grid"},Tn=["onClick"],Fn={class:"rc-search-area__option-label"},zn={key:7,class:"rc-search-area__empty"},An={key:0,class:"rc-search-area__panel-footer"},Yn=e.defineComponent({name:"rc-search-area",__name:"index",props:{items:{default:()=>[]},modelValue:{default:()=>({})},showMask:{type:Boolean,default:!0},autoConfirm:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{expose:r,emit:f}){const l=t,y=f,B=e.ref(null),v=e.ref(null),m=e.ref(null),i=e.ref({top:"0px"}),g=async()=>{if(B.value===null||!v.value)return;await e.nextTick();const o=v.value.getBoundingClientRect().top;i.value={top:`${o}px`}},w=a=>{if(B.value===null||!v.value)return;const o=a.target;if(v.value.contains(o))return;const s=v.value.closest(".rc-search-area");if(s){const k=s.querySelector(".rc-search-area__bar");if(k&&k.contains(o))return}F()};e.watch(B,async a=>{a!==null?(await e.nextTick(),g(),window.addEventListener("resize",g),window.addEventListener("scroll",g,!0),document.addEventListener("click",w,!0)):(window.removeEventListener("resize",g),window.removeEventListener("scroll",g,!0),document.removeEventListener("click",w,!0))}),e.onUnmounted(()=>{window.removeEventListener("resize",g),window.removeEventListener("scroll",g,!0),document.removeEventListener("click",w,!0)});const b=e.ref({}),_=e.ref(""),D=e.ref(null),S=e.ref({}),C=e.ref({...l.modelValue});e.watch(()=>l.modelValue,a=>{C.value={...a||{}}},{deep:!0,immediate:!0});const u=e.computed(()=>B.value===null?null:l.items[B.value]),te=e.computed(()=>{if(!u.value)return"";const a=ce(u.value);return a>0?`(${a}项)`:""}),oe=a=>{const o=C.value[a.key];if(o==null||o===""||a.slot)return a.label;if(a.type==="input"){if(o&&String(o).trim())return`${a.label}: ${o}`}else if(a.type==="calendar"){if(o){if(Array.isArray(o)&&o.length===2)return`${a.label}: ${o[0]} ~ ${o[1]}`;if(typeof o=="string")return`${a.label}: ${o}`}}else if(a.type==="single"||a.type==="tree-single"){const s=L(a,o);if(s)return`${a.label}: ${Y(s,a)}`}else{const s=Array.isArray(o)?o:[o];if(s.length>0){const k=s.map(N=>{const x=L(a,N);return x?Y(x,a):null}).filter(N=>N!==null);if(k.length>0)return`${a.label}: ${k.join("、")}`}}return a.label},re=a=>{const o=l.items[a];if(!o)return;if(B.value===a){B.value=null;return}const s=C.value[o.key];o.slot?s!=null?Array.isArray(s)?S.value[o.key]=[...s]:typeof s=="object"?S.value[o.key]={...s}:S.value[o.key]=s:S.value[o.key]=void 0:o.type==="input"?_.value=s!=null?String(s):"":o.type==="calendar"?D.value=s??null:o.type==="single"||o.type==="tree-single"?b.value[o.key]=s!==void 0?s:null:b.value[o.key]=s!==void 0?Array.isArray(s)?[...s]:[s]:[],B.value=a},F=()=>{B.value=null},I=(a,o)=>{if(!o)return typeof a=="string"?a:a.label||String(a.value);const s=a;if(o.renderItem){if(typeof o.renderItem=="string")return String(typeof s=="object"&&s!==null?s[o.renderItem]??"":s);{const k=o.renderItem(s);return k!=null?String(k):""}}return typeof a=="string"?a:a.label||String(a.value)},R=(a,o)=>{if(!o)return typeof a=="string"?a:a.value!==void 0?a.value:a;const s=a;return o.format?typeof o.format=="string"?typeof s=="object"&&s!==null?s[o.format]:s:o.format(s):typeof a=="string"?a:a.value!==void 0?a.value:a},Y=(a,o)=>{const s=a,k=o.renderResult||o.renderItem;if(k){if(typeof k=="string")return String(typeof s=="object"&&s!==null?s[k]??"":s);{const N=k(s);return N!=null?String(N):""}}return I(a,o)},L=(a,o,s)=>{const k=s||a.options;if(!k)return null;const N=a.childrenKey||"children";for(const x of k){const K=R(x,a);if(K===o||String(K)===String(o))return x;if(typeof x=="object"&&x!==null){const ne=x[N];if(Array.isArray(ne)&&ne.length>0){const ee=L(a,o,ne);if(ee)return ee}}}return null},P=(a,o)=>{const s=o||a.options;if(!s)return[];const k=a.childrenKey||"children",N=[];for(const x of s)if(N.push(x),typeof x=="object"&&x!==null){const K=x[k];Array.isArray(K)&&K.length>0&&N.push(...P(a,K))}return N},T=a=>{if(!u.value)return!1;const o=u.value.key,s=b.value[o],k=R(a,u.value);return u.value.type==="single"||u.value.type==="tree-single"?s!=null&&s===k:(Array.isArray(s)?s:[]).some(x=>x===k||String(x)===String(k))},M=a=>a?a.childrenKey?P(a):a.options||[]:[],G=a=>{if(!a)return[];const o=a.childrenKey||"children";return(a.options||[]).filter(s=>{if(typeof s=="string")return!1;const k=s[o];return Array.isArray(k)&&k.length>0})},ue=(a,o)=>{if(!o||typeof a=="string")return[];const s=o.childrenKey||"children",k=a[s];return Array.isArray(k)?k:[]},ye=a=>{if(a)return S.value[a.key]!==void 0?S.value[a.key]:C.value[a.key]},ge=(a,o)=>{if(a&&(S.value[a.key]=o,l.autoConfirm)){const s=a.key;C.value[s]=o,y("update:modelValue",{...C.value}),y("change",{...C.value},a),F()}},ie=a=>{if(!u.value)return;const o=u.value.key,s=R(a,u.value);C.value[o];let k;b.value[o]===s?k=void 0:k=s,C.value[o]=k,y("update:modelValue",{...C.value}),y("change",{...C.value},u.value),F()},p=a=>{if(!u.value)return;const o=u.value.key,s=R(a,u.value),k=Array.isArray(b.value[o])?[...b.value[o]]:[],N=k.findIndex(x=>x===s||String(x)===String(s));if(N>=0?k.splice(N,1):k.push(s),b.value[o]=k,l.autoConfirm){const x=k.length>0?k:void 0;C.value[o]=x,y("update:modelValue",{...C.value}),y("change",{...C.value},u.value),F()}},h=()=>{if(!u.value)return;const a=u.value.key;u.value.slot?S.value[a]=void 0:u.value.type==="input"?_.value="":u.value.type==="calendar"?D.value=null:u.value.type==="single"||u.value.type==="tree-single"?b.value[a]=null:b.value[a]=[]},$=()=>{if(l.autoConfirm&&u.value){const a=u.value.key,o=_.value.trim()||void 0;C.value[a]=o,y("update:modelValue",{...C.value}),y("change",{...C.value},u.value),F()}},z=a=>{if(D.value=a,l.autoConfirm&&u.value){const o=u.value.key,s=a??void 0;C.value[o]=s,y("update:modelValue",{...C.value}),y("change",{...C.value},u.value),F()}},X=()=>{if(!u.value)return;const a=u.value.key;C.value[a];let o;if(u.value.slot)o=S.value[a],C.value[a]=o;else if(u.value.type==="input")o=_.value.trim()||void 0,C.value[a]=o;else if(u.value.type==="calendar")o=D.value!==null&&D.value!==void 0?D.value:void 0,C.value[a]=o;else if(u.value.type==="single"||u.value.type==="tree-single"){const s=b.value[a];o=s??void 0,C.value[a]=o}else{const s=b.value[a];o=Array.isArray(s)&&s.length>0?s:void 0,C.value[a]=o}y("update:modelValue",{...C.value}),y("change",{...C.value},u.value),F()},Z=a=>{const o=C.value[a.key];return o==null||o===""?0:a.slot?1:a.type==="input"?String(o).trim()?1:0:a.type==="single"||a.type==="tree-single"?1:Array.isArray(o)?o.length:o?1:0},ce=a=>{if(a.slot){const s=S.value[a.key];return s!=null&&s!==""?1:0}else{if(a.type==="input")return _.value.trim()?1:0;if(a.type==="calendar")return D.value!==null&&D.value!==void 0?1:0}const o=b.value[a.key];return o==null||o===""?0:a.type==="single"||a.type==="tree-single"?1:Array.isArray(o)?o.length:0};return r({getValues:()=>({...C.value}),reset:()=>{C.value={},b.value={},S.value={},y("update:modelValue",{})}}),(a,o)=>(e.openBlock(),e.createElementBlock("div",mn,[e.createElementVNode("div",vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,(s,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:e.normalizeClass(["rc-search-area__item",{"is-active":B.value===k,"has-value":Z(s)>0}]),onClick:N=>re(k)},[e.createElementVNode("span",yn,e.toDisplayString(oe(s)),1),e.createVNode(e.unref(A),{name:"icon_a-xiala2",color:B.value!==k&&Z(s)>0?"#1677ff":"#969799",class:e.normalizeClass(["rc-search-area__item-arrow",{"is-up":B.value===k}])},null,8,["color","class"])],10,pn))),128))]),e.createVNode(e.Transition,{name:"rc-search-area-fade"},{default:e.withCtx(()=>[B.value!==null&&l.showMask?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"maskRef",ref:m,class:"rc-search-area__mask",style:e.normalizeStyle(i.value),onClick:F},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"rc-search-area-slide"},{default:e.withCtx(()=>{var s,k,N,x,K,ne,ee,he,be,De,ke,Ve,Se,Ee,$e,xe,we,n,c;return[B.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"panelRef",ref:v,class:"rc-search-area__panel"},[e.createElementVNode("div",gn,[(s=u.value)!=null&&s.slot&&a.$slots[u.value.key]?e.renderSlot(a.$slots,u.value.key,{key:0,value:ye(u.value),"update:value":d=>ge(u.value,d)},void 0,!0):((k=u.value)==null?void 0:k.type)==="input"?(e.openBlock(),e.createElementBlock("div",hn,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=d=>_.value=d),type:"text",class:"rc-search-area__input",placeholder:u.value.placeholder||"请输入",onInput:$},null,40,kn),[[e.vModelText,_.value]])])):((N=u.value)==null?void 0:N.type)==="calendar"?(e.openBlock(),e.createElementBlock("div",_n,[e.createVNode(e.unref(pe),{modelValue:D.value,"onUpdate:modelValue":o[1]||(o[1]=d=>D.value=d),range:((x=u.value.calendarConfig)==null?void 0:x.range)||!1,mode:"default","min-date":(K=u.value.calendarConfig)==null?void 0:K.minDate,"max-date":(ne=u.value.calendarConfig)==null?void 0:ne.maxDate,"disabled-date":(ee=u.value.calendarConfig)==null?void 0:ee.disabledDate,formatter:(he=u.value.calendarConfig)==null?void 0:he.formatter,"end-date-offset":((be=u.value.calendarConfig)==null?void 0:be.endDateOffset)||!1,onChange:z},null,8,["modelValue","range","min-date","max-date","disabled-date","formatter","end-date-offset"])])):((De=u.value)==null?void 0:De.type)==="tree-single"?(e.openBlock(),e.createElementBlock("div",Cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G(u.value),(d,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:"rc-search-area__tree-group"},[e.createElementVNode("div",Bn,e.toDisplayString(I(d,u.value||void 0)),1),e.createElementVNode("div",bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue(d,u.value),(E,H)=>(e.openBlock(),e.createElementBlock("div",{key:H,class:e.normalizeClass(["rc-search-area__option",{"is-selected":T(E)}]),onClick:q=>ie(E)},[e.createElementVNode("span",Vn,e.toDisplayString(I(E,u.value||void 0)),1),T(E)?(e.openBlock(),e.createBlock(e.unref(A),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Dn))),128))])]))),128))])):((ke=u.value)==null?void 0:ke.type)==="tree-multiple"?(e.openBlock(),e.createElementBlock("div",Sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G(u.value),(d,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:"rc-search-area__tree-group"},[e.createElementVNode("div",En,e.toDisplayString(I(d,u.value||void 0)),1),e.createElementVNode("div",$n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue(d,u.value),(E,H)=>(e.openBlock(),e.createElementBlock("div",{key:H,class:e.normalizeClass(["rc-search-area__option",{"is-selected":T(E)}]),onClick:q=>p(E)},[e.createElementVNode("span",wn,e.toDisplayString(I(E,u.value||void 0)),1),T(E)?(e.openBlock(),e.createBlock(e.unref(A),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,xn))),128))])]))),128))])):((Ve=u.value)==null?void 0:Ve.type)==="single"?(e.openBlock(),e.createElementBlock("div",Nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M(u.value),(d,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:e.normalizeClass(["rc-search-area__option",{"is-selected":T(d)}]),onClick:E=>ie(d)},[e.createElementVNode("span",Mn,e.toDisplayString(I(d,u.value||void 0)),1),T(d)?(e.openBlock(),e.createBlock(e.unref(A),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,In))),128))])):(e.openBlock(),e.createElementBlock("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M(u.value),(d,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:e.normalizeClass(["rc-search-area__option",{"is-selected":T(d)}]),onClick:E=>p(d)},[e.createElementVNode("span",Fn,e.toDisplayString(I(d,u.value||void 0)),1),T(d)?(e.openBlock(),e.createBlock(e.unref(A),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Tn))),128))])),((Se=u.value)==null?void 0:Se.type)!=="input"&&((Ee=u.value)==null?void 0:Ee.type)!=="calendar"&&!(($e=u.value)!=null&&$e.slot)&&((we=(xe=u.value)==null?void 0:xe.options)==null?void 0:we.length)===0?(e.openBlock(),e.createElementBlock("div",zn,[...o[2]||(o[2]=[e.createElementVNode("p",null,"暂无选项",-1)])])):e.createCommentVNode("",!0)]),!l.autoConfirm&&((n=u.value)==null?void 0:n.type)!=="single"&&((c=u.value)==null?void 0:c.type)!=="tree-single"?(e.openBlock(),e.createElementBlock("div",An,[e.createVNode(e.unref(J),{block:"",onClick:h},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode(" 重置 ",-1)])]),_:1}),e.createVNode(e.unref(J),{type:"primary",block:"",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(" 确定"+e.toDisplayString(te.value),1)]),_:1})])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)]}),_:3})]))}}),Pe=Q(Yn,[["__scopeId","data-v-dd3a69e1"]]),Oe=t=>{t.component("RcSearchArea",Pe),t.component("rc-search-area",Pe)},Ie=Symbol("RECYCLE_UI_CONFIG"),We={prefix:"rc",autoRegister:!0,provideKey:Ie,theme:{},iconCssUrl:"//at.alicdn.com/t/c/font_4252799_o59odx6bqil.css",iconClass:"iconfont"};function Ln(t,r){r.autoRegister!==!1&&(typeof Re=="function"&&Re(t),typeof Te=="function"&&Te(t),typeof Fe=="function"&&Fe(t),typeof He=="function"&&He(t),typeof Ae=="function"&&Ae(t),typeof ze=="function"&&ze(t),typeof Oe=="function"&&Oe(t),typeof Le=="function"&&Le(t),typeof Ye=="function"&&Ye(t))}const Ue=(t,r)=>{const f={...We,...r||{}};if(t.provide(f.provideKey??Ie,f),t.config.globalProperties.$recycleUI=f,typeof window<"u"&&f.iconCssUrl){const l=`link[rel="stylesheet"][data-rcui-icon="true"][href="${f.iconCssUrl}"]`;if(!document.head.querySelector(l)){const B=document.createElement("link");B.rel="stylesheet",B.href=f.iconCssUrl,B.setAttribute("data-rcui-icon","true"),document.head.appendChild(B)}}return Ln(t,f),t},Pn={install:Ue};function On(t){return{install(r){Ue(r,t)}}}exports.RECYCLE_UI_SYMBOL=Ie;exports.RcButton=J;exports.RcCalendar=pe;exports.RcCard=Ce;exports.RcDescriptions=Je;exports.RcDescriptionsItem=Qe;exports.RcIcon=A;exports.RcPopup=ve;exports.RcSearchArea=Pe;exports.RcToast=Be;exports.createRecycleUI=On;exports.default=Pn;exports.defaultRecycleUIConfig=We;exports.hideToast=Xe;exports.install=Ue;exports.installButton=Re;exports.installCalendar=Le;exports.installCard=Fe;exports.installDescriptions=Te;exports.installIcon=Ae;exports.installMessage=ze;exports.installPopup=Ye;exports.installSearchArea=Oe;exports.message=Ze;exports.rcDescriptions=Je;exports.rcDescriptionsItem=Qe;exports.showToast=Et;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|