30 lines
3.5 KiB
Java
30 lines
3.5 KiB
Java
import{C}from"./index-87hd0Uxs.js";import{P as R}from"./index-Ckh_BVlA.js";import"./index-DfHu-LAS.js";import{R as s}from"./Group-DBzJABA_.js";import{aE as h,M as B,au as b}from"./index-X7Y8jykP.js";import{e as j,r as c,y,z as E,A as e,K as n,f as a,E as r}from"./vue-vendor-DNhG1Cve.js";import"./useWindowSizeFn-C-0M9_Ul.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./htmlmixed-DQsDbTFv.js";/* empty css */import"./useMenuSetting-BwQ9LkAm.js";import"./useFullContent-B3OUGaJG.js";import"./useContentHeight-vWUZcXk1.js";import"./onMountedOrActivated-DhSdLlqP.js";import"./useContentViewHeight-Cja8zrBg.js";import"./usePageContext-9jIr04Op.js";import"./injectionKey-DPVn4AgL.js";import"./ArrowLeftOutlined-B3JgaWh-.js";import"./ArrowRightOutlined-CZG1QCpB.js";import"./index-lcIOKfa7.js";import"./dropdown-jkliuVyN.js";import"./index-B4gPlWQt.js";import"./eagerComputed-BTlOruLW.js";import"./transButton-B2CWzlQO.js";import"./operationUnit-vCu2co3e.js";import"./RadioButton-DRBix2Fq.js";import"./Checkbox-Dbxs4we4.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=`
|
|
(() => {
|
|
var htmlRoot = document.getElementById('htmlRoot');
|
|
var theme = window.localStorage.getItem('__APP__DARK__MODE__');
|
|
if (htmlRoot && theme) {
|
|
htmlRoot.setAttribute('data-theme', theme);
|
|
theme = htmlRoot = null;
|
|
}
|
|
})();
|
|
`,D=`
|
|
<!DOCTYPE html>
|
|
<html lang="en" id="htmlRoot">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
<meta name="renderer" content="webkit" />
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
|
|
/>
|
|
<title><%= title %></title>
|
|
<link rel="icon" href="/favicon.ico" />
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
</div>
|
|
</body>
|
|
</html>
|
|
`,P=j({components:{CodeEditor:C,PageWrapper:R,RadioButton:s.Button,RadioGroup:s.Group,ASpace:h},setup(){const o=c("application/json"),t=c(f);function p(u){const i=u.target.value;if(i==="application/json"){t.value=f;return}if(i==="htmlmixed"){t.value=D;return}if(i==="javascript"){t.value=k;return}}function d(){B.info({title:"编辑器当前值",content:t.value})}return{value:t,modeValue:o,handleModeChange:p,showData:d}}});function A(o,t,p,d,u,i){const v=n("a-button"),m=n("RadioButton"),w=n("RadioGroup"),g=h,_=n("CodeEditor"),x=n("PageWrapper");return E(),y(x,{title:"代码编辑器组件示例",contentFullHeight:"",fixedHeight:"",contentBackground:""},{extra:e(()=>[a(g,{size:"middle"},{default:e(()=>[a(v,{onClick:o.showData,type:"primary"},{default:e(()=>[...t[2]||(t[2]=[r("获取数据",-1)])]),_:1},8,["onClick"]),a(w,{"button-style":"solid",value:o.modeValue,"onUpdate:value":t[0]||(t[0]=l=>o.modeValue=l),onChange:o.handleModeChange},{default:e(()=>[a(m,{value:"application/json"},{default:e(()=>[...t[3]||(t[3]=[r(" json数据 ",-1)])]),_:1}),a(m,{value:"htmlmixed"},{default:e(()=>[...t[4]||(t[4]=[r(" html代码 ",-1)])]),_:1}),a(m,{value:"javascript"},{default:e(()=>[...t[5]||(t[5]=[r(" javascript代码 ",-1)])]),_:1})]),_:1},8,["value","onChange"])]),_:1})]),default:e(()=>[a(_,{value:o.value,"onUpdate:value":t[1]||(t[1]=l=>o.value=l),mode:o.modeValue},null,8,["value","mode"])]),_:1})}const it=b(P,[["render",A]]);export{it as default};
|