← Back
Editing: index116.js
import{n as e,L as t,e as l}from"./utils-lib.js?v=VERSION_NUMBER";import{c as o,r as s,w as a,p as n,q as r,v as c,y as u,B as i,C as p,z as f,H as m,I as d,x,e as y,A as _,n as h,D as S}from"./base-lib.js?v=VERSION_NUMBER";const b=["innerHTML"],g={key:1,class:"flex-1 w-full p-0 bg-none whitespace-pre-line text-i text-[#ececec]"},v=l(o({__name:"index",props:{content:{default:""},isHtml:{type:Boolean,default:!1},autoScroll:{type:Boolean,default:!0},fullScreen:{type:[Object,Boolean],default:!1}},setup(l,{expose:o}){const v=l,w=s(null),H=s(!1),B=()=>{h((()=>{const e=w.value,{scrollHeight:t}=e;e.scrollTop=t}))};a((()=>v.content),(()=>{v.autoScroll&&B()}),{immediate:!0});const j=e=>{v.fullScreen&&(H.value=e)},k=()=>v.content,C=()=>{e({title:v.fullScreen.title,area:"100%",showFooter:!1,closeBtn:2,customClass:"full-screen-dialog",component:()=>t((()=>import("./full-screen.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url),compData:{isHtml:v.isHtml,autoScroll:v.autoScroll,onRefresh:v.fullScreen.onRefresh,getContent:k}})};return n((()=>{v.autoScroll&&B()})),o({setScrollBottom:B}),(e,t)=>{const l=S;return r(),c("div",{class:"w-full h-full relative",onMouseover:t[0]||(t[0]=e=>j(!0)),onMouseleave:t[1]||(t[1]=e=>j(!1))},[u("pre",{ref_key:"preRef",ref:w,style:{height:"100%"},class:"w-full flex items-start py-[1rem] px-4 overflow-y-auto bg-[#333] log-box !rounded-[1.2rem]"},[t[2]||(t[2]=i("\t\t\t")),e.isHtml?(r(),c("code",{key:0,class:"flex-1 w-full p-0 bg-none whitespace-pre-line text-i text-[#ececec]",innerHTML:e.content||"暂无日志"},null,8,b)):p("",!0),t[3]||(t[3]=i("\n \t")),e.isHtml?p("",!0):(r(),c("code",g,f(e.content||"暂无日志"),1)),t[4]||(t[4]=i("\n\t\t"))],512),m(y(l,{type:"primary",class:"absolute",style:{top:"1rem",right:"1.5rem"},onClick:C},{default:_((()=>t[5]||(t[5]=[i(" 全屏展示 ")]))),_:1},512),[[d,x(H)]])],32)}}}),[["__scopeId","data-v-d97df8a6"]]);export{v as _}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }
Save File
Cancel