import{d as C,f as s,u as _,U as a,a2 as g,ad as D,af as n,a4 as m,k as r,G as d}from"./vue-vendor-CxLCUzY4.js";import{a as V,M}from"./index-DmeKrdZg.js";import{P as h}from"./index-CRgSyMPH.js";import{J as B}from"./antd-vue-vendor-CahNzUUa.js";import{_ as E}from"./index-Cy4uayzW.js";import"./index-zKZnG1QC.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-Bdn0r8CG.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-XU-h1taH.js";import"./useContentViewHeight-Qm4QNm5l.js";import"./usePageContext-CXQdt-5h.js";import"./injectionKey-DPVn4AgL.js";const F=C({components:{MarkDown:M,PageWrapper:h,MarkdownViewer:V,ACard:B},setup(){const o=s(null),e=s(`
# title

# content
`);function l(){const t=_(o);if(!t)return;t.getVditor().setTheme("dark")}function i(t){e.value=t}function p(){e.value=""}return{value:e,toggleTheme:l,markDownRef:o,handleChange:i,clearValue:p}}}),A={class:"mt-2"};function b(o,e,l,i,p,t){const u=a("a-button"),c=a("MarkDown"),f=a("MarkdownViewer"),k=a("a-card"),v=a("PageWrapper");return g(),D(v,{title:"MarkDown组件示例"},{default:n(()=>[m("div",null,[r(u,{onClick:o.toggleTheme,class:"mb-2",type:"primary"},{default:n(()=>e[1]||(e[1]=[d(" 黑暗主题 ")])),_:1},8,["onClick"]),r(u,{onClick:o.clearValue,class:"mb-2",type:"default"},{default:n(()=>e[2]||(e[2]=[d(" 清空内容 ")])),_:1},8,["onClick"]),r(c,{value:o.value,"onUpdate:value":e[0]||(e[0]=w=>o.value=w),onChange:o.handleChange,ref:"markDownRef",placeholder:"这是占位文本"},null,8,["value","onChange"])]),m("div",A,[r(k,{title:"Markdown Viewer 组件演示"},{default:n(()=>[r(f,{value:o.value},null,8,["value"])]),_:1})])]),_:1})}const S=E(F,[["render",b]]);export{S as default};
