ScopeSentry/static/assets/rad-CFjde5w_.js

2 lines
1.3 KiB
JavaScript

import{d as a,r as e,V as s,o as t,i as o,w as n,e as l,a as d,f as i,t as u,M as r,y as c,l as m,_ as f}from"./index-vMt5tOuI.js";import{E as p,a as v}from"./el-col-CK66atlO.js";import{E as y}from"./el-card-CiG9T01-.js";import{j as _,o as h,T as w}from"./index-C-2TW2bY.js";import{c as x,d as j}from"./index-pmTCoTaL.js";import"./index-znw49gEj.js";const g=f(a({__name:"rad",setup(a){const{t:f}=m(),g=e(""),V=[_(),h];s((async()=>{try{const a=await x();200===a.code&&(g.value=a.data.content)}catch(a){}}));const b=async()=>{window.confirm("Do you want to save the data?")&&await E()},E=async()=>{L.value=!0;200==(await j(g.value)).code&&(L.value=!1)},L=e(!1);return(a,e)=>(t(),o(d(y),{shadow:"never",class:"mb-20px"},{header:n((()=>[l(d(v),null,{default:n((()=>[l(d(p),{span:3,style:{height:"100%"}},{default:n((()=>[i("span",null,u(d(f)("configuration.rad")),1)])),_:1}),l(d(p),{span:2,offset:19},{default:n((()=>[l(d(r),{type:"primary",onClick:b,onLoading:L.value},{default:n((()=>[c(u(d(f)("common.save")),1)])),_:1},8,["onLoading"])])),_:1})])),_:1})])),default:n((()=>[l(d(w),{modelValue:g.value,"onUpdate:modelValue":e[0]||(e[0]=a=>g.value=a),style:{height:"800px"},autofocus:!0,"indent-with-tab":!0,"tab-size":2,extensions:V},null,8,["modelValue"])])),_:1}))}}),[["__scopeId","data-v-cb5c34f0"]]);export{g as default};