Files
yakpanel-core/YakPanel/static/vite/js/index-CUCkAE_w.js

2 lines
6.2 KiB
JavaScript
Raw Normal View History

2026-04-07 02:04:22 +05:30
import{_ as O}from"./index-BRQskX9P.js?v=1773287522785";import{_ as U}from"./index-DIKmrNCq.js?v=1773287522785";import{_ as P}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{i as C,m as z}from"./index-BTglIPU2.js?v=1773287522785";import{u as R}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{w as G,g as B,x as I,y as M,z as X,A as Z}from"./setting-DouXuJGW.js?v=1773287522785";import{k as h,R as E,a0 as a,$ as v,Z as $,S as o,a9 as _,_ as u,aa as m,e as H,r as w,F as q,n as J,j as N,N as K,X as Q}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a8 as T,_ as x,b as Y,B as V,a1 as tt}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{g as L}from"./data-BVsViUMm.js?v=1773287522785";import{u as et}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{_ as nt}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";const at=h({__name:"type",setup(S,{expose:c}){const{t:l}=E(),{table:e,columns:r,setLoading:p}=R([{key:"type",title:l("Waf.Setting.config_93")},{key:"status",title:l("Public.Table.Status"),align:"right",width:100,render:n=>a(T,{value:n.status,size:"small",onUpdateValue:async s=>{await G({method_type:n.type,check:s?1:0}),n.status=s}},null)}]),d=async()=>{try{p(!0);const{message:n}=await B();C(n)&&(e.data=n.method_type.map(s=>({type:s[0],status:s[1]})))}finally{p(!1)}};return d(),c({init:d}),(n,s)=>{const b=P,f=U;return v(),$("div",null,[a(b,{"max-height":400,loading:o(e).loading,data:o(e).data,columns:o(r)},null,8,["loading","data","columns"]),a(f,{class:"mt-16px"},{default:_(()=>[u("li",null,m(n.$t("Waf.Setting.config_91")),1),u("li",null,m(n.$t("Waf.Setting.config_92")),1)]),_:1})])}}}),ot={class:"flex mb-12px"},st={class:"flex-1 mr-12px"},lt={class:"w-100px mr-12px"},it=h({__name:"header",setup(S,{expose:c}){const{t:l}=E(),e=H({type:"",length:null}),r=async()=>{if(!e.type){z.error(l("Waf.Setting.config_98"));return}if(!e.length){z.error(l("Waf.Setting.config_99"));return}await X({header_type:e.type,header_type_len:e.length}),g(),e.type="",e.length=null},p=w(null),{table:d,columns:n,setLoading:s}=R([{key:"type",title:"Header"},{key:"len",title:l("Waf.Setting.config_95"),width:100,render:t=>a(q,null,[t.isEdit?a(x,{ref:p,value:t.editLen,min:1,size:"small",showButton:!1,placeholder:"",onUpdateValue:i=>{t.editLen=i||1}},null):t.len])},et({width:100,options:t=>t.isEdit?[{label:l("Public.Btn.Save"),onClick:()=>{f(t)}},{label:l("Public.Btn.Cancel"),onClick:()=>{y(t)}}]:[{label:l("Public.Btn.Edit"),show:!t.isEdit,onClick:()=>{b(t)}},{label:l("Public.Btn.Del"),show:!t.isEdit,onClick:()=>{k(t)}}]})]),b=t=>{t.isEdit=!0,J(()=>{var i;(i=p.value)==null||i.focus()})},f=async t=>{await I({header_type:t.type,header_type_len:t.editLen}),t.isEdit=!1,t.len=t.editLen},y=t=>{t.isEdit=!1,t.editLen=t.len},k=async t=>{await M({header_type:t.type,header_type_len:t.len}),g()},g=async()=>{try{s(!0);const{message:t}=await B();C(t)&&(d.data=t.header_len.map(i=>({type:i[0],len:L(i[1]),editLen:L(i[1]),isEdit:!1})))}finally{s(!1)}};return g(),c({init:g}),(t,i)=>{const A=Y,D=V,j=P,F=U;return v(),$("div",null,[u("div",ot,[u("div",st,[a(A,{value:o(e).type,"onUpdate:value":i[0]||(i[0]=W=>o(e).type=W),placeholder:t.$t("Waf.Setting.config_94")},null,8,["value","placeholder"])]),u("div",lt,[a(o(x),{value:o(e).length,"onUpdate:value":i[1]||(i[1]=W=>o(e).length=W),"show-button":!1,placeholder:t.$t("Waf.Setting.config_95")},null,8,["value","placeholder"])]),a(D,{type:"primary",onClick:r},{default:_(()=>[N(m(t.$t("Public.Btn.Add")),1)]),_:1})]),a(j,{"max-height":380,loading:o(d).loading,data:o(d).data,columns:o(n)},null,8,["loading","data","columns"]),a(F,{class:"mt-16px"},{default:_(()=>[u("li",null,m(t.$t("Waf.Setting.config_96")),1),u("li",null,m(t.$t("Waf.Setting.config_97")),1)]),_:1})])}}}),_t={class:"p-20px"},ut={class:"w-200p