Files
aiot-platform-ui/apps/web-antd/dist/js/right-DP2vzF8Y.js
lzh 19d36d1ffb
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 8s
chore: build and deploy web-antd
2026-03-09 13:05:46 +08:00

2 lines
1.8 KiB
JavaScript

import{ay as f,an as p,am as m,bS as k,au as B,a9 as S,ac as z}from"./bootstrap-CRjSNGHY.js";import{m as T,c$ as j,aa as b,b9 as I,w as N,ab as R,b2 as V,bJ as s,ae as a,bL as v,j as n,u as o,ai as x}from"../jse/index-index-CMeVxoEG.js";const W={class:"m-0 flex shrink-0 items-center justify-between px-7"},$={class:"relative box-border min-h-full w-full flex-grow bg-card p-2 sm:p-5"},D={class:"flex items-center justify-center"},H=T({__name:"right",props:{content:{type:String,default:""},isWriting:{type:Boolean,default:!1}},emits:["update:content","stopStream"],setup(r,{expose:y,emit:g}){const l=r,c=g,{copied:w,copy:h}=j(),u=b({get(){return l.content},set(t){c("update:content",t)}}),i=I();y({scrollToBottom(){var t,e;(e=i.value)==null||e.scrollTo(0,(t=i.value)==null?void 0:t.scrollHeight)}});const C=b(()=>l.content&&!l.isWriting);function _(){h(l.content)}return N(w,t=>{t&&S.success("复制成功")}),(t,e)=>(V(),R(o(B),{class:"flex h-full flex-col"},{title:s(()=>[a("h3",W,[e[3]||(e[3]=a("span",null,"预览",-1)),v(n(o(f),{type:"primary",onClick:_,size:"small"},{default:s(()=>[n(o(p),{icon:"lucide:copy"}),e[2]||(e[2]=x(" 复制 ",-1))]),_:1},512),[[m,C.value]])])]),default:s(()=>[a("div",{ref_key:"contentRef",ref:i,class:"hide-scroll-bar box-border h-full overflow-y-auto"},[a("div",$,[v(n(o(f),{class:"absolute bottom-1 left-1/2 z-40 flex -translate-x-1/2 sm:bottom-2",onClick:e[0]||(e[0]=d=>c("stopStream")),size:"small"},{icon:s(()=>[a("div",D,[n(o(p),{icon:"lucide:ban"})])]),default:s(()=>[e[4]||(e[4]=x(" 终止生成 ",-1))]),_:1},512),[[m,r.isWriting]]),n(o(k),{id:"inputId",value:u.value,"onUpdate:value":e[1]||(e[1]=d=>u.value=d),"auto-size":!0,bordered:!1,placeholder:"生成的内容……"},null,8,["value"])])],512)]),_:1}))}}),U=z(H,[["__scopeId","data-v-cf677a18"]]);export{U as default};