lcny-vue3-antd-admin/dist/assets/index.3b7d0cdc.js

2 lines
3.7 KiB
JavaScript

var y=Object.defineProperty,w=Object.defineProperties;var x=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;var g=(o,e,t)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,p=(o,e)=>{for(var t in e||(e={}))B.call(e,t)&&g(o,t,e[t]);if(C)for(var t of C(e))D.call(e,t)&&g(o,t,e[t]);return o},b=(o,e)=>w(o,x(e));var f=(o,e,t)=>new Promise((i,s)=>{var l=a=>{try{n(t.next(a))}catch(r){s(r)}},c=a=>{try{n(t.throw(a))}catch(r){s(r)}},n=a=>a.done?i(a.value):Promise.resolve(a.value).then(l,c);n((t=t.apply(o,e)).next())});import{B as E,u as R}from"./useTable.dcd03552.js";import{T as S}from"./BasicForm.a911999f.js";import{J as A,s as v,bc as M,aA as u,o as k,h as F,p as d,x as h,y as L,l as N,cs as T,fQ as V,fR as j}from"./index.c7fa22f5.js";import{_ as I,c as J,s as K}from"./LinksDrawer.3decddd2.js";import{b as Q}from"./index.a5ad6e0e.js";import"./index.87b727fb.js";import"./Checkbox.38f29fcd.js";import"./index.3f3c3ec5.js";import"./useForm.2461bdb6.js";import"./index.413ebfa2.js";import"./index.9bb46b35.js";import"./index.d24d2de4.js";import"./useSize.94ec979b.js";import"./eagerComputed.0817a9e5.js";import"./onMountedOrActivated.c728cbd3.js";import"./useWindowSizeFn.3c4b8dd9.js";import"./useContentViewHeight.65fc8a99.js";import"./ArrowLeftOutlined.be3a4aa5.js";import"./transButton.b9586eb3.js";import"./index.af08ee4b.js";import"./index.8101b650.js";import"./index.7dfe3c6d.js";import"./index.ef9c505a.js";import"./dateUtil.003353be.js";import"./_baseMerge.b22cd379.js";import"./_isIterateeCall.1bec7ca2.js";import"./_baseEach.a43503e7.js";import"./get.06bec7bc.js";import"./index.58e21348.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.d067d0bd.js";import"./FullscreenOutlined.d8187b4e.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.d08d4637.js";import"./scrollTo.265bde4d.js";import"./index.2b798f11.js";import"./index.2a174087.js";import"./index.8390c3cc.js";import"./_baseIteratee.7c31a07d.js";import"./index.389531a3.js";import"./useRefs.cc9441e8.js";import"./download.636d17b0.js";import"./index.6a0d683f.js";import"./uniqBy.3a5e94aa.js";import"./defaultsDeep.d4cec870.js";const U={components:{BasicTable:E,LinksDrawer:I,TableAction:S},setup(){const o=v({}),[e,{openModal:t}]=Q(),[i,{reload:s}]=R({title:"\u8D26\u53F7\u5217\u8868",api:r=>f(this,null,function*(){const{data:_,meta:m}=yield j(p({},r));return{items:_,total:m==null?void 0:m.total}}),rowKey:"id",columns:J,formConfig:{labelWidth:80,schemas:K},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),l=()=>{T.success("\u64CD\u4F5C\u6210\u529F"),s()},c=()=>{t(!0,{id:!1})};return b(p({handleEdit:r=>{t(!0,b(p({},r),{isUpdate:!0}))},handleDelete:r=>f(this,null,function*(){yield V(r.id),T.success("\u5220\u9664\u6210\u529F"),s()}),registerTable:i,registerModal:e,handleSuccess:l},M(o)),{handleCreate:c})}},W={key:0,class:"flex items-center justify-center"};function q(o,e,t,i,s,l){const c=u("a-button"),n=u("TableAction"),a=u("BasicTable"),r=u("LinksDrawer");return k(),F("div",null,[d(a,{onRegister:i.registerTable},{toolbar:h(()=>[d(c,{type:"primary",onClick:i.handleCreate},{default:h(()=>[L(" \u65B0\u589E\u94FE\u63A5 ")]),_:1},8,["onClick"])]),bodyCell:h(({column:_,record:m})=>[_.key==="action"?(k(),F("div",W,[d(n,{actions:[{label:"\u7F16\u8F91",onClick:i.handleEdit.bind(null,m)},{label:"\u5220\u9664",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.handleDelete.bind(null,m)}}]},null,8,["actions"])])):N("",!0)]),_:1},8,["onRegister"]),d(r,{onRegister:i.registerModal,onSuccess:i.handleSuccess},null,8,["onRegister","onSuccess"])])}var jt=A(U,[["render",q]]);export{jt as default};