lcny-vue3-antd-admin/dist/assets/index.540c0270.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 S,u as E}from"./useTable.5fe93552.js";import{T as R}from"./BasicForm.eeccf3e7.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,fR as V,fS as j}from"./index.916ae53a.js";import{_ as I,c as J,s as K}from"./LinksDrawer.26d5fe71.js";import{b as U}from"./index.dbfdf6f1.js";import"./index.9e33335f.js";import"./Checkbox.e0270c6e.js";import"./index.4669a304.js";import"./useForm.5d408ff4.js";import"./index.367b3214.js";import"./index.8d19875c.js";import"./index.42f560d8.js";import"./useSize.01b36fb0.js";import"./eagerComputed.b7e4baee.js";import"./onMountedOrActivated.0172048a.js";import"./useWindowSizeFn.9fa13286.js";import"./useContentViewHeight.23f18735.js";import"./ArrowLeftOutlined.ea679a74.js";import"./transButton.476999bd.js";import"./index.f4b985d4.js";import"./index.6d816731.js";import"./index.d2c18922.js";import"./index.837a9a49.js";import"./dateUtil.706cbc6b.js";import"./_baseMerge.a3fa0cce.js";import"./_isIterateeCall.8d6bd600.js";import"./_baseEach.7a722173.js";import"./get.38fa2a60.js";import"./index.dd500f42.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.d3292d1f.js";import"./FullscreenOutlined.a0ffbedb.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.c87751e8.js";import"./scrollTo.6517ec87.js";import"./index.92d9a174.js";import"./index.59eadc28.js";import"./index.d76a4364.js";import"./_baseIteratee.b32145cd.js";import"./index.61f22807.js";import"./useRefs.a4de49af.js";import"./download.84b07676.js";import"./index.2ef42bea.js";import"./uniqBy.3b1170b2.js";import"./defaultsDeep.c17d00ba.js";const W={components:{BasicTable:S,LinksDrawer:I,TableAction:R},setup(){const o=v({}),[e,{openModal:t}]=U(),[i,{reload:s}]=E({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})}},q={key:0,class:"flex items-center justify-center"};function z(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",q,[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(W,[["render",z]]);export{jt as default};