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-CEZCyHDA.js";import{P as h}from"./index-BxgvQLkr.js";import{J as B}from"./antd-vue-vendor-CDWW6V_M.js";import{_ as E}from"./index-CYriLmQo.js";import"./index-CF_FJn6P.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./useTimeout-DC8132dd.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-CxQILSKV.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-DtBiGC0g.js";import"./useContentViewHeight-D71xl1HH.js";import"./usePageContext-CCgh0KDo.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};
