import{u as e,r as a,b as t,ad as s,c as r,bQ as i,d as o,e as n,h as l,w as d,j as p,k as c,n as m,g as u,f,am as g,aO as b,E as h,q as j,p as v}from"./index.286e9b79.js";import{v as x}from"./loading.c49775a6.js";import{E as z}from"./pagination.22bb50f6.js";import"./input.31de1b37.js";/* empty css            */import"./select.297a82d5.js";import{E as y,a as _}from"./table-column.7b4f59a2.js";import"./checkbox.f06171a4.js";import{E as k}from"./message-box.6a8eb828.js";import"./overlay.2c1583ac.js";import{g as w}from"./http.f588794f.js";import{f as C}from"./days.686d9566.js";import"./isEqual.57d72c4a.js";import"./_initCloneObject.fb8fbaea.js";import"./event.776e7e11.js";import"./index.ed3ed02e.js";import"./index.27150c7e.js";import"./token.34cb8214.js";import"./strings.8c60bfae.js";import"./scroll.a50153b5.js";import"./_baseIteratee.9ead53a1.js";import"./debounce.caafe00b.js";import"./validator.18338d56.js";const E={class:"table-wrap"},q={class:"table-box"},B={class:"toolbar"},O={class:"tabs-content"},S=l("span",{style:{"font-size":"14px","margin-left":"5px"}},"暂无数据",-1),T={class:"page"},U=l("div",{class:"l"},null,-1),I={class:"r"},P={__name:"index",setup(P){const Q=e(),W=a([]);let A=a(!1);const D=t({current:1,size:10,total:0}),F=()=>{A.value=!0,w("addons.help/index",D).then((e=>{A.value=!1,e.code?(W.value=e.data.list,D.total=e.data.total):h.error(e.msg)})).catch((e=>{A.value=!1,h.error(e)}))};s((()=>{F()}));const G=e=>{D.size=e,D.current=1,F()},H=e=>{D.current=e,F()},J=()=>{Q.push("/addons/help/editor")};return(e,a)=>{const t=j,s=r("Warning"),P=v,K=y,L=_,M=z,N=i("auth"),R=x;return o(),n("div",null,[l("div",E,[l("div",q,[l("div",B,[d((o(),p(t,{onClick:J},{default:c((()=>[m("添加")])),_:1})),[[N,["addons.help/editor"]]])]),l("div",O,[d((o(),p(L,{data:u(W),size:"large",style:{width:"100%"}},{empty:c((()=>[f(P,{size:"18",style:{position:"relative",top:"4px"}},{default:c((()=>[f(s)])),_:1}),S])),default:c((()=>[f(K,{prop:"title",label:"名称","header-align":"center",align:"center"}),f(K,{label:"时间","header-align":"center",align:"center",width:"180"},{default:c((e=>[m(g(u(C)(e.row.create_time)),1)])),_:1}),f(K,{label:"操作","header-align":"center",align:"center",width:"110"},{default:c((e=>[d((o(),p(t,{type:"primary",size:"small",onClick:b((a=>{return t=e.row.id,void Q.push({path:"/addons/help/editor",query:{id:t}});var t}),["prevent"]),link:""},{default:c((()=>[m("编辑")])),_:2},1032,["onClick"])),[[N,["addons.help/editor"]]]),d((o(),p(t,{type:"danger",size:"small",onClick:b((a=>{return t=e.row.id,void k.confirm("您确定要删除该分类吗","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{w("addons.help/delete",{id:t}).then((e=>{e.code?(h.success("删除成功"),W.value=[],F()):h.error(e.msg)}))}));var t}),["prevent"]),link:""},{default:c((()=>[m("删除")])),_:2},1032,["onClick"])),[[N,["addons.help/editor"]]])])),_:1})])),_:1},8,["data"])),[[R,u(A)]])]),l("div",T,[U,l("div",I,[f(M,{"current-page":u(D).current,"onUpdate:currentPage":a[0]||(a[0]=e=>u(D).current=e),"page-size":u(D).size,"onUpdate:pageSize":a[1]||(a[1]=e=>u(D).size=e),small:!0,"page-sizes":[10,20,30,40,50,60,70,80,90,100],layout:"prev, pager, next, jumper, sizes, total",total:u(D).total,onSizeChange:G,onCurrentChange:H},null,8,["current-page","page-size","total"])])])])])])}}};export{P as default};
