Files
qhmes/web-dist/js/index-D9GWo192.js
2026-06-16 18:19:57 +08:00

2 lines
6.5 KiB
Java

var se=Object.defineProperty,ne=Object.defineProperties;var ae=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var E=(e,s,t)=>s in e?se(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,y=(e,s)=>{for(var t in s||(s={}))re.call(s,t)&&E(e,t,s[t]);if(I)for(var t of I(s))le.call(s,t)&&E(e,t,s[t]);return e},P=(e,s)=>ne(e,ae(s));var Q=(e,s,t)=>new Promise((l,i)=>{var h=n=>{try{c(t.next(n))}catch(p){i(p)}},r=n=>{try{c(t.throw(n))}catch(p){i(p)}},c=n=>n.done?l(n.value):Promise.resolve(n.value).then(h,r);c((t=t.apply(e,s)).next())});import{ad as U,bo as V,au as j,as as H,c as ie,aO as ce,gC as G,aQ as pe,ah as ue,y as de}from"./index-X7Y8jykP.js";import{e as R,c as C,K as k,C as w,H as B,z as d,L as f,F as fe,y as D,A as g,E as A,G as S,B as T,T as W,J as $,Q as J,f as N,h as L,u,r as K,g as ge,n as he,X as me,I as X,O as ye,D as Ce,M as ke,N as $e}from"./vue-vendor-DNhG1Cve.js";import{b as we}from"./index-BzChaRPg.js";import{A as Be}from"./ArrowLeftOutlined-B3JgaWh-.js";import{S as De}from"./index-ByCwbQDV.js";import{D as be}from"./index-DZJwICFr.js";const{t:q}=U(),Y={confirmLoading:{type:Boolean},showCancelBtn:{type:Boolean,default:!0},cancelButtonProps:Object,cancelText:{type:String,default:q("common.cancelText")},showOkBtn:{type:Boolean,default:!0},okButtonProps:Object,okText:{type:String,default:q("common.okText")},okType:{type:String,default:"primary"},showFooter:{type:Boolean},footerHeight:{type:[String,Number],default:60}},ve=y({class:{type:[String,Object,Array]},isDetail:{type:Boolean},title:{type:String,default:""},loadingText:{type:String},showDetailBack:{type:Boolean,default:!0},visible:{type:Boolean},open:{type:Boolean},loading:{type:Boolean},maskClosable:{type:Boolean,default:!0},getContainer:{type:[Object,String,Function,Boolean],default:()=>"body"},closeFunc:{type:[Function,Object],default:null},destroyOnClose:{type:Boolean}},Y),Se=R({name:"BasicDrawerFooter",props:P(y({},Y),{height:{type:String,default:"60px"}}),emits:["ok","close"],setup(e,{emit:s}){const{prefixCls:t}=V("basic-drawer-footer"),l=C(()=>{const r=`${e.height}`;return{height:r,lineHeight:r}});function i(){s("ok")}function h(){s("close")}return{handleOk:i,prefixCls:t,handleClose:h,getStyle:l}}});function Te(e,s,t,l,i,h){const r=k("a-button");return e.showFooter||e.$slots.footer?(d(),w("div",{key:0,class:$(e.prefixCls),style:W(e.getStyle)},[e.$slots.footer?f(e.$slots,"footer",{key:1}):(d(),w(fe,{key:0},[f(e.$slots,"insertFooter"),e.showCancelBtn?(d(),D(r,T({key:0},e.cancelButtonProps,{onClick:e.handleClose,class:"mr-2"}),{default:g(()=>[A(S(e.cancelText),1)]),_:1},16,["onClick"])):B("",!0),f(e.$slots,"centerFooter"),e.showOkBtn?(d(),D(r,T({key:1,type:e.okType,onClick:e.handleOk},e.okButtonProps,{class:"mr-2",loading:e.confirmLoading}),{default:g(()=>[A(S(e.okText),1)]),_:1},16,["type","onClick","loading"])):B("",!0),f(e.$slots,"appendFooter")],64))],6)):B("",!0)}const Oe=j(Se,[["render",Te]]),Fe=R({name:"BasicDrawerHeader",components:{BasicTitle:we,ArrowLeftOutlined:Be},props:{isDetail:H.bool,showDetailBack:H.bool,title:H.string},emits:["close"],setup(e,{emit:s}){const{prefixCls:t}=V("basic-drawer-header");function l(){s("close")}return{prefixCls:t,handleClose:l}}}),Pe={key:1};function He(e,s,t,l,i,h){const r=k("BasicTitle"),c=k("ArrowLeftOutlined");return e.isDetail?(d(),w("div",{key:1,class:$([e.prefixCls,`${e.prefixCls}--detail`])},[J("span",{class:$(`${e.prefixCls}__twrap`)},[e.showDetailBack?(d(),w("span",{key:0,onClick:s[0]||(s[0]=(...n)=>e.handleClose&&e.handleClose(...n))},[N(c,{class:$(`${e.prefixCls}__back`)},null,8,["class"])])):B("",!0),e.title?(d(),w("span",Pe,S(e.title),1)):B("",!0)],2),J("span",{class:$(`${e.prefixCls}__toolbar`)},[f(e.$slots,"titleToolbar")],2)],2)):(d(),D(r,{key:0,class:$([e.prefixCls,"is-drawer"])},{default:g(()=>[f(e.$slots,"title"),A(" "+S(e.$slots.title?"":e.title),1)]),_:3},8,["class"]))}const Le=j(Fe,[["render",He]]),Ae=R({components:{Drawer:be,ScrollContainer:De,DrawerFooter:Oe,DrawerHeader:Le},inheritAttrs:!1,props:ve,emits:["visible-change","open-change","ok","close","register"],setup(e,{emit:s}){const t=K(!1),l=ce(),i=K(null),{t:h}=U(),{prefixVar:r,prefixCls:c}=V("basic-drawer"),n={setDrawerProps:ee,emitVisible:void 0},p=ge();p&&s("register",n,p.uid);const b=C(()=>y({},G(pe(e),u(i)))),m=C(()=>{const o=P(y(y({placement:"right"},u(l)),u(b)),{open:u(t)});o.title=void 0;let{isDetail:a,width:F,wrapClassName:v,getContainer:te}=o;if(a){F||(o.width="100%");const M=`${c}__detail`;v=o.class?o.class:v,o.class=v?`${v} ${M}`:M,te||(o.getContainer=`.${r}-layout-content`)}return o}),O=C(()=>y(y({},l),u(m))),z=C(()=>{const{footerHeight:o,showFooter:a}=u(m);return a&&o?ue(o)?`${o}px`:`${o.replace("px","")}px`:"0px"}),Z=C(()=>({position:"relative",height:`calc(100% - ${u(z)})`})),_=C(()=>{var o;return!!((o=u(m))!=null&&o.loading)});L(()=>e.visible,(o,a)=>{o!==a&&(t.value=o)},{deep:!0}),L(()=>e.open,(o,a)=>{o!==a&&(t.value=o)},{deep:!0}),L(()=>t.value,o=>{he(()=>{var a;s("visible-change",o),s("open-change",o),p&&((a=n.emitVisible)==null||a.call(n,o,p.uid))})});function x(o){return Q(this,null,function*(){const{closeFunc:a}=u(m);if(s("close",o),a&&ie(a)){const F=yield a();t.value=!F;return}t.value=!1})}function ee(o){i.value=G(u(i)||{},o),Reflect.has(o,"visible")&&(t.value=!!o.visible),Reflect.has(o,"open")&&(t.value=!!o.open)}function oe(){s("ok")}return{onClose:x,t:h,prefixCls:c,getMergeProps:b,getScrollContentStyle:Z,getProps:m,getLoading:_,getBindValues:O,getFooterHeight:z,handleOk:oe}}});function Ne(e,s,t,l,i,h){const r=k("DrawerHeader"),c=k("ScrollContainer"),n=k("DrawerFooter"),p=k("Drawer"),b=me("loading");return d(),D(p,T({class:e.prefixCls,onClose:e.onClose},e.getBindValues),X({default:g(()=>[ye((d(),D(c,{style:W(e.getScrollContentStyle),"loading-tip":e.loadingText||e.t("common.loadingText")},{default:g(()=>[f(e.$slots,"default")]),_:3},8,["style","loading-tip"])),[[b,e.getLoading]]),N(n,T(e.getProps,{onClose:e.onClose,onOk:e.handleOk,height:e.getFooterHeight}),X({_:2},[Ce(Object.keys(e.$slots),m=>({name:m,fn:g(O=>[f(e.$slots,m,ke($e(O||{})))])}))]),1040,["onClose","onOk","height"])]),_:2},[e.$slots.title?{name:"title",fn:g(()=>[f(e.$slots,"title")]),key:"1"}:{name:"title",fn:g(()=>[N(r,{title:e.getMergeProps.title,isDetail:e.isDetail,showDetailBack:e.showDetailBack,onClose:e.onClose},{titleToolbar:g(()=>[f(e.$slots,"titleToolbar")]),_:3},8,["title","isDetail","showDetailBack","onClose"])]),key:"0"}]),1040,["class","onClose"])}const Ve=j(Ae,[["render",Ne]]),Ge=de(Ve);export{Ge as B};