You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
1.5 KiB
2 lines
1.5 KiB
import{d as _,bL as F,bC as k,m as O,f as b,e as g,aT as h,aU as o,o as t,g as m,F as y,a as p,w as u,b as s,i as $,x as v}from"./index-f4658ae7.js";import{F as B,a as S}from"./FullscreenOutlined-71d2eabf.js";const E=_({name:"ModalClose",components:{Tooltip:F,FullscreenExitOutlined:B,FullscreenOutlined:S,CloseOutlined:k},props:{canFullscreen:{type:Boolean,default:!0},fullScreen:{type:Boolean}},emits:["cancel","fullscreen"],setup(l,{emit:a}){const{prefixCls:n}=O("basic-modal-close"),{t:r}=g(),i=b(()=>[n,`${n}--custom`,{[`${n}--can-full`]:l.canFullscreen}]);function d(e){a("cancel",e)}function c(e){e==null||e.stopPropagation(),e==null||e.preventDefault(),a("fullscreen")}return{t:r,getClass:i,prefixCls:n,handleCancel:d,handleFullScreen:c}}});function T(l,a,n,r,i,d){const c=o("FullscreenExitOutlined"),e=o("Tooltip"),f=o("FullscreenOutlined"),C=o("CloseOutlined");return t(),m("div",{class:v(l.getClass)},[l.canFullscreen?(t(),m(y,{key:0},[l.fullScreen?(t(),p(e,{key:0,title:l.t("component.modal.restore"),placement:"bottom"},{default:u(()=>[s(c,{role:"full",onClick:l.handleFullScreen},null,8,["onClick"])]),_:1},8,["title"])):(t(),p(e,{key:1,title:l.t("component.modal.maximize"),placement:"bottom"},{default:u(()=>[s(f,{role:"close",onClick:l.handleFullScreen},null,8,["onClick"])]),_:1},8,["title"]))],64)):$("",!0),s(e,{title:l.t("component.modal.close"),placement:"bottom"},{default:u(()=>[s(C,{onClick:l.handleCancel},null,8,["onClick"])]),_:1},8,["title"])],2)}const x=h(E,[["render",T]]);export{x as default};
|