index-8b8b8160.js 3.6 KB

12345678910111213141516171819202122
  1. import{_ as K,__tla as Q}from"./Dialog-c20523c4.js";import{d as $,h as F,r as c,l as P,Q as q,o as S,c as b,f as a,w as e,g as p,n as d,a as r,t as G,x as H,P as W,O as X,F as Y,dr as Z,e1 as aa,aA as ea,C as ta,E as la,i as ra,bo as sa,_ as na,__tla as oa}from"./index-e3afde76.js";import{_ as ua,__tla as ia}from"./ContentWrap-5f2f4872.js";import{E as ca,__tla as _a}from"./index.es-adeaf211.js";import{H as g,j as ma,__tla as fa}from"./java-d1d48458.js";import{u as pa,__tla as da}from"./useMessage-0b1b25bd.js";import{__tla as ya}from"./el-card-6198c22a.js";let x,ga=Promise.all([(()=>{try{return Q}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 J(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"},x=na($({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},M=()=>{y("\u751F\u6210 JSON"),m.value=0,i.value=o.value.getRule()},k=()=>{y("\u751F\u6210 Options"),m.value=1,i.value=o.value.getOption()},w=()=>{y("\u751F\u6210\u7EC4\u4EF6"),m.value=2,i.value=D()},D=()=>{const t=o.value.getRule(),l=o.value.getOption();return`<template>
  2. <form-create
  3. v-model="fapi"
  4. :rule="rule"
  5. :option="option"
  6. @submit="onSubmit"
  7. ></form-create>
  8. </template>
  9. <script setup lang=ts>
  10. import formCreate from "@form-create/element-ui";
  11. const faps = ref(null)
  12. const rule = ref('')
  13. const option = ref('')
  14. const init = () => {
  15. rule.value = formCreate.parseJson('${Z.toJson(t).replaceAll("\\","\\\\")}')
  16. option.value = formCreate.parseJson('${JSON.stringify(l)}')
  17. }
  18. const onSubmit = (formData) => {
  19. //todo \u63D0\u4EA4\u8868\u5355
  20. }
  21. init()
  22. <\/script>`},j=t=>{let l="json";return m.value===2&&(l="xml"),ea(t)||(t=JSON.stringify(t)),g.highlight(l,t,!0).value||"&nbsp;"};return P(async()=>{g.registerLanguage("xml",ma),g.registerLanguage("json",J)}),(t,l)=>{const f=ta,N=la,z=ra,R=ua,L=sa,T=K,B=q("dompurify-html");return S(),b(Y,null,[a(R,null,{default:e(()=>[a(z,null,{default:e(()=>[a(N,null,{default:e(()=>[p("div",v,[a(f,{size:"small",type:"primary",onClick:M},{default:e(()=>[d("\u751F\u6210 JSON")]),_:1}),a(f,{size:"small",type:"success",onClick:k},{default:e(()=>[d("\u751F\u6210 Options")]),_:1}),a(f,{size:"small",type:"danger",onClick:w},{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(),b("div",h,[a(f,{style:{float:"right"},onClick:l[0]||(l[0]=E=>(async I=>{const{copy:U,copied:V,isSupported:A}=aa({source:I});A?(await U(),r(V)&&_.success(s("common.copySuccess"))):_.error(s("common.copyError"))})(r(i)))},{default:e(()=>[d(G(r(s)("common.copy")),1)]),_:1}),a(L,{height:"580"},{default:e(()=>[p("div",null,[p("pre",null,[H(p("code",O,null,512),[[B,j(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,x as default};