12 |
- import{a as r,c as h,f as v,Y as f,o as i,g as c,F as g,G as w,y as C,l as o,x as n,j as x,T as N,k as y,u as k,D as l}from"./@vue.e84e1286.js";import{e as D}from"./bus.f1893518.js";/* empty css */import{_ as S}from"./index.c8cfbd6c.js";const V={class:"pre-code-box"},B={key:0,class:"language-html"},T=l(" "),b={class:"language-html"},q=l(`\r
- `),$={__name:"preview",props:{compName:{type:String,default:"",require:!0},demoName:{type:String,default:"",require:!0}},setup(d){const t=d,e=r(!1),s=r(""),u=h(()=>["iconfont",e.value?"icon-arrow-up-filling":"icon-arrow-down-filling"]),m=()=>{D.emit("previewChange","ok"),e.value=!e.value},p=async()=>{s.value=await fetch(`/my-baseui/components/${t.compName}/doc/${t.demoName}.vue`).then(a=>a.text())};return v(()=>{p()}),(a,j)=>{const _=f("highlight");return i(),c("div",V,[g(N,{name:"slide-fade"},{default:w(()=>[e.value?C((i(),c("pre",B,[T,o("code",b,n(s.value),1),q])),[[_]]):x("",!0)]),_:1}),o("div",{class:"showCode",onClick:m},[o("i",{class:y(k(u))},null,2),o("span",null,n(e.value?"\u9690\u85CF\u4EE3\u7801":"\u663E\u793A\u4EE3\u7801"),1)])])}}};var I=S($,[["__scopeId","data-v-478df7e9"]]);export{I as p};
|