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-Dug0Hu36.js";import{P as h}from"./index-DaObvZxT.js";import{J as B}from"./antd-vue-vendor-CDWW6V_M.js";import{_ as E}from"./index-B_2CoVdl.js";import"./index-D2AmS0aU.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-DAURrYyA.js";import"./useWindowSizeFn-C3WExEpc.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-BWLGvKEC.js";import"./useContentViewHeight-DlpfApuB.js";import"./usePageContext-HMYqek-Q.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};
