index-f63de0a8.js 2.0 KB

123456
  1. import{ak as x,cf as k,cH as y,bj as h,d as v,aC as R,f as S,n as s,bm as r,a5 as j,aQ as p,ba as d,o as I,Z as c,a1 as w,T as l,$ as f,bp as B,bX as C,aB as O}from"./index-a8341fa1.js";import"./dayjs-919e6097.js";import{u as N}from"./system-16e5b9dc.js";/*!
  2. * pinia v2.0.36
  3. * (c) 2023 Eduardo San Martin Morote
  4. * @license MIT
  5. */var m;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(m||(m={}));function V(t){{t=x(t);const e={};for(const a in t){const i=t[a];(k(i)||y(i))&&(e[a]=h(t,a))}return e}}function g(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!O(t)}const z=v({__name:"index",setup(t){const{t:e}=R(),a=N(),{plugins:i}=V(a),_=S(()=>[{title:e("routes.plugin.名称"),dataIndex:"name",width:"120px"},{title:e("routes.plugin.状态"),dataIndex:"disabled",width:"80px",customRender:({record:n})=>s(r,{color:n.disabled?"red":"green"},{default:()=>[n.disabled?e("routes.plugin.禁用"):e("routes.plugin.启用")]})},{title:e("routes.plugin.描述"),dataIndex:"description",customRender:({record:n})=>{const o=[];if(n.description)for(const[u,b]of Object.entries(n.description))o.push(s(r,{color:"blue",class:"mb-4px"},{default:()=>[u,j(": "),b]}));return s("div",{class:"flex flex-wrap gap-4px"},[o])}},{title:e("routes.plugin.操作"),dataIndex:"action",width:"140px",align:"center",customRender:({record:n})=>{let o,u;return s("div",null,[s(p,{type:"link",onClick:()=>{d.confirm({title:e("routes.plugin.确定重启",{name:n.name}),content:e("routes.plugin.开发中")})}},g(o=e("routes.plugin.重启"))?o:{default:()=>[o]}),s(p,{type:"link",onClick:()=>{d.confirm({title:`${e("routes.plugin.配置")} ${n.name}`,content:e("routes.plugin.开发中")})}},g(u=e("routes.plugin.配置"))?u:{default:()=>[u]})])}}]);return I(()=>{a.loadSysInfo()}),(n,o)=>(c(),w("div",null,[l(i).length?(c(),f(l(B),{key:0,dataSource:l(i),columns:_.value,size:"small",pagination:!1,bordered:!0},null,8,["dataSource","columns"])):(c(),f(l(C),{key:1}))]))}});export{z as default};
  6. //# sourceMappingURL=index-f63de0a8.js.map