ScopeSentry/static/assets/ImageViewer-Br-3jw0G.js

2 lines
1.9 KiB
JavaScript

import{_ as e}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CLuWlWlx.js";import{d as t,a5 as i,B as a,r as s,o,i as r,K as l,a as n,j as m,dt as p,e as d,di as u,l as c,U as h,w as b,H as g,t as w}from"./index-rxu9Faad.js";import{E as f}from"./el-image-viewer-CCnBYOdA.js";import"./el-card-C0XrHsE5.js";import"./el-tooltip-l0sNRNKZ.js";import"./el-popper-BJkW0SkV.js";import"./debounce-rCtyPgGe.js";const _=t({__name:"ImageViewer",props:{urlList:{type:Array,default:()=>[]},zIndex:i.number.def(200),initialIndex:i.number.def(0),infinite:i.bool.def(!0),hideOnClickModal:i.bool.def(!1),teleported:i.bool.def(!1),show:i.bool.def(!1)},setup(e){const t=e,i=a((()=>{const e={...t};return delete e.show,e})),p=s(t.show),d=()=>{p.value=!1};return(e,t)=>p.value?(o(),r(n(f),l({key:0},i.value,{onClose:d}),null,16)):m("",!0)}});let j=null;const x=t({__name:"ImageViewer",setup(t){const{t:i}=c(),a=()=>{!function(e){if(!p)return;const{urlList:t,initialIndex:i=0,infinite:a=!0,hideOnClickModal:s=!1,teleported:o=!1,zIndex:r=2e3,show:l=!0}=e,n={},m=document.createElement("div");n.urlList=t,n.initialIndex=i,n.infinite=a,n.hideOnClickModal=s,n.teleported=o,n.zIndex=r,n.show=l,document.body.appendChild(m),j=d(_,n),u(j,m)}({urlList:["https://images6.alphacoders.com/657/thumbbig-657194.webp","https://images3.alphacoders.com/677/thumbbig-677688.webp","https://images4.alphacoders.com/200/thumbbig-200966.webp","https://images5.alphacoders.com/657/thumbbig-657248.webp","https://images3.alphacoders.com/679/thumbbig-679917.webp","https://images3.alphacoders.com/737/thumbbig-73785.webp"]})};return(t,s)=>{const l=h("BaseButton");return o(),r(n(e),{title:n(i)("imageViewerDemo.imageViewer"),message:n(i)("imageViewerDemo.imageViewerDes")},{default:b((()=>[d(l,{type:"primary",onClick:a},{default:b((()=>[g(w(n(i)("imageViewerDemo.open")),1)])),_:1})])),_:1},8,["title","message"])}}});export{x as default};