lcny-vue3-antd-admin/dist/assets/index.65716c28.js

2 lines
2.9 KiB
JavaScript

var c=(f,n,o)=>new Promise((p,r)=>{var u=e=>{try{i(o.next(e))}catch(t){r(t)}},l=e=>{try{i(o.throw(e))}catch(t){r(t)}},i=e=>e.done?p(e.value):Promise.resolve(e.value).then(u,l);i((o=o.apply(f,n)).next())});import{u as w,B as x}from"./useTable.6f4090ff.js";import{T as F}from"./useForm.a4b1480a.js";import{a as k,aA as D,o as h,h as b,p as a,x as d,y as R,k as m,l as T,cs as C,fp as B,fq as S}from"./index.e54b994d.js";import{u as E}from"./index.15113e81.js";import{_ as v,c as A,s as N}from"./RoleDrawer.72f87960.js";import"./index.abf6684e.js";import"./Checkbox.367efe6e.js";import"./index.4311aac3.js";import"./index.43ce4109.js";import"./index.8cc4ce93.js";import"./index.452c5b7b.js";import"./useSize.0ecb3b14.js";import"./eagerComputed.42d8292f.js";import"./onMountedOrActivated.c73322af.js";import"./useWindowSizeFn.f31a5775.js";import"./useContentViewHeight.03a2d928.js";import"./ArrowLeftOutlined.aa06c1a5.js";import"./transButton.b1d7c4ac.js";import"./index.543e9c26.js";import"./index.f3ca2857.js";import"./index.9eab9035.js";import"./index.898fd68c.js";import"./dateUtil.63ac287a.js";import"./_baseMerge.82d3842f.js";import"./_isIterateeCall.0dce9df7.js";import"./_baseEach.a8a4d7d7.js";import"./get.a4c56e98.js";import"./index.66c9fd6d.js";import"./FullscreenOutlined.c7945389.js";import"./index.92a0d67a.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.cbcfdba4.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.3c984bdf.js";import"./scrollTo.fc988661.js";import"./index.d4eea350.js";import"./index.50c11b84.js";import"./index.d099d643.js";import"./_baseIteratee.62e5560d.js";import"./index.41d96d83.js";import"./useRefs.bf310fab.js";import"./download.d261d324.js";import"./index.24035d71.js";import"./uniqBy.b6a1a617.js";import"./index.4397be50.js";const V={key:0,class:"flex items-center justify-center"},Tt=k({__name:"index",setup(f){const[n,{openDrawer:o}]=E(),[p,{reload:r}]=w({title:"\u89D2\u8272\u5217\u8868",api:()=>c(this,null,function*(){const{data:t,meta:s}=yield S({});return{items:t,total:s==null?void 0:s.total}}),columns:A,formConfig:{labelWidth:120,schemas:N},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),u=()=>{C.success("\u64CD\u4F5C\u6210\u529F"),r()},l=()=>{o(!0,{isUpdate:!1})},i=t=>{o(!0,{id:t.id,isUpdate:!0})},e=t=>c(this,null,function*(){yield B(t.id),C.success("\u5220\u9664\u6210\u529F"),r()});return(t,s)=>{const g=D("a-button");return h(),b("div",null,[a(m(x),{onRegister:m(p)},{toolbar:d(()=>[a(g,{type:"primary",onClick:l},{default:d(()=>[R(" \u65B0\u589E\u89D2\u8272 ")]),_:1})]),bodyCell:d(({column:y,record:_})=>[y.key==="action"?(h(),b("div",V,[a(m(F),{actions:[{label:"\u7F16\u8F91",onClick:i.bind(null,_)},{label:"\u5220\u9664",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:e.bind(null,_)}}]},null,8,["actions"])])):T("",!0)]),_:1},8,["onRegister"]),a(v,{onRegister:m(n),onSuccess:u},null,8,["onRegister"])])}}});export{Tt as default};