const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/form-D9I7zKQp.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785","js/vue-core-DJjvd5ZC.js?v=1773287522785","js/prismjs-BZPoR7_J.js?v=1773287522785","css/prismjs-D-3FhBe_.css?v=1773287522785","js/naive-ui--dJnpVcV.js?v=1773287522785","js/index-BTglIPU2.js?v=1773287522785","css/index-DEM1fxGq.css?v=1773287522785","js/useLoading-CZ2gSAW7.js?v=1773287522785"])))=>i.map(i=>d[i]);
import{h as k,ig as $,ih as q,i as P,v as w,x as C,P as B}from"./index-BTglIPU2.js?v=1773287522785";import{_ as L}from"./index.vue_vue_type_script_setup_true_lang-DgjjuUjT.js?v=1773287522785";import{_ as v}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{u as j}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{u as A}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{u as T}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{B as S,a2 as V}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{k as E,R as H,$ as I,a8 as N,a9 as n,a0 as i,S as e,j as O,aa as R,a3 as U}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-B7YvCBmY.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./index-DIKmrNCq.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";const it=E({__name:"index",props:{data:{}},setup(p){const u=U(()=>B(()=>import("./form-D9I7zKQp.js?v=1773287522785"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),b=p,{params:l}=b.data,{t:a}=H(),{keys:f,table:d,columns:y}=A([{key:"database",title:a("Site.PHP.add_site_16"),render:t=>t.database==="*"?"* -".concat(a("Database.Mysql.index_22")):t.database},{key:"table",title:"Table",render:t=>t.table==="*"?"* -".concat(a("Database.Mysql.index_23")):t.table},{key:"user",title:a("Database.index_21"),render:t=>"".concat(a("Database.Mysql.index_24"),": ").concat(t.access.map(s=>s.access).join(",")),ellipsis:{tooltip:!0}},j({width:80,options:t=>[{label:a("Public.Btn.Del"),onClick:async()=>{k({title:a("Public.Btn.Del"),content:a("Database.Mysql.index_25",[t.database]),onConfirm:async()=>{let s={...l,db_name:t.database,tb_name:t.table,access:t.access.map(r=>r.access).join(","),with_grant:0};await $(s),m()}})}}]})]),{loading:g,setLoading:c}=T(),m=async()=>{try{c(!0);const{message:t}=await q(l);P(t)&&(d.data=t.data)}finally{c(!1),f.value=[]}};m();const o=w(a("Database.Mysql.index_21"),{getList:m,params:l});return(t,s)=>{const r=S,x=v,h=L,D=C,M=V;return I(),N(M,{class:"p-16px"},{default:n(()=>[i(h,null,{toolsLeft:n(()=>[i(r,{type:"primary",onClick:s[0]||(s[0]=_=>e(o).show=!0)},{default:n(()=>[O(R(t.$t("Database.Mysql.index_21")),1)]),_:1})]),table:n(()=>[i(x,{loading:e(g),data:e(d).data,"max-height":500,columns:e(y)},null,8,["loading","data","columns"])]),_:1}),i(D,{show:e(o).show,"onUpdate:show":s[1]||(s[1]=_=>e(o).show=_),title:e(o).title,data:e(o).data,width:600,"min-height":250,footer:!0,component:e(u)},null,8,["show","title","data","component"])]),_:1})}}});export{it as default};
