index-ByBYEsh-.js 3.0 KB

1234567891011121314151617181920212223242526272829
  1. import{d as E,f as s,ag as n,aB as x,ar as C,aD as o,k as a,G as l}from"./vue-vendor-Be68asQ6.js";import{C as R}from"./index-ZQhF-z5r.js";import{P as B}from"./index-X83NmVMq.js";import{a8 as D,R as c,M as b}from"./antd-vue-vendor-DcqS7Wvq.js";import{a as j}from"./index-BFfnEkVs.js";import"./useWindowSizeFn-BTSGGcie.js";import"./vxe-table-vendor-DHF2TRpV.js";import"./htmlmixed-DNSd26j0.js";/* empty css */import"./useContentHeight-DnE6GxS2.js";import"./useContentViewHeight-BVCc9jQl.js";import"./usePageContext-WlOC5VNa.js";import"./injectionKey-DPVn4AgL.js";const f='{"name":"BeJson","url":"http://www.xxx.com","page":88,"isNonProfit":true,"address":{"street":"科技园路.","city":"江苏苏州","country":"中国"},"links":[{"name":"Google","url":"http://www.xxx.com"},{"name":"Baidu","url":"http://www.xxx.com"},{"name":"SoSo","url":"http://www.xxx.com"}]}',k=`
  2. (() => {
  3. var htmlRoot = document.getElementById('htmlRoot');
  4. var theme = window.localStorage.getItem('__APP__DARK__MODE__');
  5. if (htmlRoot && theme) {
  6. htmlRoot.setAttribute('data-theme', theme);
  7. theme = htmlRoot = null;
  8. }
  9. })();
  10. `,y=`
  11. <!DOCTYPE html>
  12. <html lang="en" id="htmlRoot">
  13. <head>
  14. <meta charset="UTF-8" />
  15. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  16. <meta name="renderer" content="webkit" />
  17. <meta
  18. name="viewport"
  19. content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
  20. />
  21. <title><%= title %></title>
  22. <link rel="icon" href="/favicon.ico" />
  23. </head>
  24. <body>
  25. <div id="app">
  26. </div>
  27. </body>
  28. </html>
  29. `,P=E({components:{CodeEditor:R,PageWrapper:B,RadioButton:c.Button,RadioGroup:c.Group,ASpace:D},setup(){const e=s("application/json"),t=s(f);function m(p){const i=p.target.value;if(i==="application/json"){t.value=f;return}if(i==="htmlmixed"){t.value=y;return}if(i==="javascript"){t.value=k;return}}function d(){b.info({title:"编辑器当前值",content:t.value})}return{value:t,modeValue:e,handleModeChange:m,showData:d}}});function A(e,t,m,d,p,i){const h=n("a-button"),u=n("RadioButton"),v=n("RadioGroup"),w=n("a-space"),g=n("CodeEditor"),_=n("PageWrapper");return C(),x(_,{title:"代码编辑器组件示例",contentFullHeight:"",fixedHeight:"",contentBackground:""},{extra:o(()=>[a(w,{size:"middle"},{default:o(()=>[a(h,{onClick:e.showData,type:"primary"},{default:o(()=>t[2]||(t[2]=[l("获取数据")])),_:1},8,["onClick"]),a(v,{"button-style":"solid",value:e.modeValue,"onUpdate:value":t[0]||(t[0]=r=>e.modeValue=r),onChange:e.handleModeChange},{default:o(()=>[a(u,{value:"application/json"},{default:o(()=>t[3]||(t[3]=[l(" json数据 ")])),_:1}),a(u,{value:"htmlmixed"},{default:o(()=>t[4]||(t[4]=[l(" html代码 ")])),_:1}),a(u,{value:"javascript"},{default:o(()=>t[5]||(t[5]=[l(" javascript代码 ")])),_:1})]),_:1},8,["value","onChange"])]),_:1})]),default:o(()=>[a(g,{value:e.value,"onUpdate:value":t[1]||(t[1]=r=>e.value=r),mode:e.modeValue},null,8,["value","mode"])]),_:1})}const q=j(P,[["render",A]]);export{q as default};