index-D5NKXI_S.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import{M as c,a as _}from"./index-Bk5v8ygk.js";import{P as h}from"./index-C0mnMlct.js";import{W as k}from"./antd-BfqWtMX3.js";import{d as w,f as s,a6 as g,Z as R,a4 as b,a5 as n,$ as u,k as o,G as i,u as r}from"./vue-DM5HGU8Z.js";import"./entry/index-CRWhxBeP.js";import"./index-CD5zFmZN.js";import"./useWindowSizeFn-CEueHQop.js";import"./onMountedOrActivated-Ckq_czNf.js";import"./useContentViewHeight-D9So7_ch.js";const C={class:"mt-2"},j=w({__name:"index",setup(D){const l=s(null),t=s(`
  2. # 标题h1
  3. ##### 标题h5
  4. **加粗**
  5. *斜体*
  6. ~~删除线~~
  7. [链接](https://github.com/vbenjs/vue-vben-admin)
  8. ↓分割线↓
  9. ---
  10. * 无序列表1
  11. * 无序列表1.1
  12. 1. 有序列表1
  13. 2. 有序列表2
  14. * [ ] 任务列表1
  15. * [x] 任务列表2
  16. > 引用示例
  17. \`\`\`js
  18. // 代码块:
  19. (() => {
  20. var htmlRoot = document.getElementById('htmlRoot');
  21. var theme = window.localStorage.getItem('__APP__DARK__MODE__');
  22. if (htmlRoot && theme) {
  23. htmlRoot.setAttribute('data-theme', theme);
  24. theme = htmlRoot = null;
  25. }
  26. })();
  27. \`\`\`
  28. | 表格 | 示例 | 🎉️ |
  29. | --- | --- | --- |
  30. | 1 | 2 | 3 |
  31. | 4 | 5 | 6 |
  32. `);function d(){const a=r(l);if(!a)return;a.getVditor().setTheme("dark","dark","dracula")}function f(a){t.value=a}function p(){t.value=""}return(a,e)=>{const m=g("a-button");return R(),b(r(h),{title:"MarkDown组件示例"},{default:n(()=>[u("div",null,[o(m,{onClick:d,class:"mb-2",type:"primary"},{default:n(()=>e[1]||(e[1]=[i(" 黑暗主题 ")])),_:1}),o(m,{onClick:p,class:"mb-2",type:"default"},{default:n(()=>e[2]||(e[2]=[i(" 清空内容 ")])),_:1}),o(r(c),{value:t.value,"onUpdate:value":e[0]||(e[0]=v=>t.value=v),onChange:f,ref_key:"markDownRef",ref:l,placeholder:"这是占位文本"},null,8,["value"])]),u("div",C,[o(r(k),{title:"Markdown Viewer 组件演示"},{default:n(()=>[o(r(_),{value:t.value},null,8,["value"])]),_:1})])]),_:1})}}});export{j as default};