12345678910111213141516171819202122 |
- import{_ as Q,__tla as $}from"./Dialog-71bebaff.js";import{d as A,i as F,r as c,l as G,R as P,o as S,c as M,g as a,w as e,h as p,n as d,a as r,t as H,y as q,Q as W,P as X,F as Y,dt as Z,e1 as aa,aC as ea,D as ta,E as la,j as ra,b7 as sa,_ as na,__tla as oa}from"./index-b362e1d5.js";import{_ as ua,__tla as ia}from"./ContentWrap-a3bb871b.js";import{E as ca,__tla as _a}from"./index.es-fdf5447b.js";import{H as g,j as ma,__tla as fa}from"./java-9b5c2e68.js";import{u as pa,__tla as da}from"./useMessage-7c1dd10e.js";import{__tla as ya}from"./el-card-732e29b8.js";let b,ga=Promise.all([(()=>{try{return $}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ya}catch{}})()]).then(async()=>{function x(n){const s=["true","false","null"],_={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",keywords:{literal:s},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},n.QUOTE_STRING_MODE,_,n.C_NUMBER_MODE,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}let v,h,O;v={class:"float-right mb-2"},h={key:0,ref:"editor"},O={class:"hljs"},b=na(A({name:"InfraBuild",__name:"index",setup(n){const{t:s}=F(),_=pa(),o=c(),u=c(!1),C=c(""),m=c(-1),i=c(""),y=t=>{u.value=!0,C.value=t},J=()=>{y("\u751F\u6210 JSON"),m.value=0,i.value=o.value.getRule()},D=()=>{y("\u751F\u6210 Options"),m.value=1,i.value=o.value.getOption()},k=()=>{y("\u751F\u6210\u7EC4\u4EF6"),m.value=2,i.value=j()},j=()=>{const t=o.value.getRule(),l=o.value.getOption();return`<template>
- <form-create
- v-model="fapi"
- :rule="rule"
- :option="option"
- @submit="onSubmit"
- ></form-create>
- </template>
- <script setup lang=ts>
- import formCreate from "@form-create/element-ui";
- const faps = ref(null)
- const rule = ref('')
- const option = ref('')
- const init = () => {
- rule.value = formCreate.parseJson('${Z.toJson(t).replaceAll("\\","\\\\")}')
- option.value = formCreate.parseJson('${JSON.stringify(l)}')
- }
- const onSubmit = (formData) => {
- //todo \u63D0\u4EA4\u8868\u5355
- }
- init()
- <\/script>`},w=t=>{let l="json";return m.value===2&&(l="xml"),ea(t)||(t=JSON.stringify(t)),g.highlight(l,t,!0).value||" "};return G(async()=>{g.registerLanguage("xml",ma),g.registerLanguage("json",x)}),(t,l)=>{const f=ta,N=la,z=ra,L=ua,R=sa,T=Q,B=P("dompurify-html");return S(),M(Y,null,[a(L,null,{default:e(()=>[a(z,null,{default:e(()=>[a(N,null,{default:e(()=>[p("div",v,[a(f,{size:"small",type:"primary",onClick:J},{default:e(()=>[d("\u751F\u6210 JSON")]),_:1}),a(f,{size:"small",type:"success",onClick:D},{default:e(()=>[d("\u751F\u6210 Options")]),_:1}),a(f,{size:"small",type:"danger",onClick:k},{default:e(()=>[d("\u751F\u6210\u7EC4\u4EF6")]),_:1})])]),_:1}),a(N,null,{default:e(()=>[a(r(ca),{ref_key:"designer",ref:o,height:"780px"},null,512)]),_:1})]),_:1})]),_:1}),a(T,{modelValue:r(u),"onUpdate:modelValue":l[1]||(l[1]=E=>X(u)?u.value=E:null),title:r(C),"max-height":"600"},{default:e(()=>[r(u)?(S(),M("div",h,[a(f,{style:{float:"right"},onClick:l[0]||(l[0]=E=>(async I=>{const{copy:U,copied:V,isSupported:K}=aa({source:I});K?(await U(),r(V)&&_.success(s("common.copySuccess"))):_.error(s("common.copyError"))})(r(i)))},{default:e(()=>[d(H(r(s)("common.copy")),1)]),_:1}),a(R,{height:"580"},{default:e(()=>[p("div",null,[p("pre",null,[q(p("code",O,null,512),[[B,w(r(i))]])])])]),_:1})],512)):W("",!0)]),_:1},8,["modelValue","title"])],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/infra/build/index.vue"]])});export{ga as __tla,b as default};
|