lcny-vue3-antd-admin/dist/assets/index.26f6943c.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.f522329f.js";import{T as S}from"./BasicForm.a08176e9.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.77232945.js";import{_ as I,c as J,s as K}from"./LinksDrawer.a4bad8d2.js";import{b as Q}from"./index.3f40b2eb.js";import"./index.9e7e92f3.js";import"./Checkbox.ccb1cf83.js";import"./index.ba89e8b1.js";import"./useForm.66a975ce.js";import"./index.7c984100.js";import"./index.db45d405.js";import"./index.a74e1933.js";import"./useSize.425e3d8f.js";import"./eagerComputed.a1e5e3c1.js";import"./onMountedOrActivated.f5e3ecf4.js";import"./useWindowSizeFn.e0d027ce.js";import"./useContentViewHeight.8a086a20.js";import"./ArrowLeftOutlined.9e2ffa71.js";import"./transButton.3f1d9401.js";import"./index.de7c03cd.js";import"./index.4489f444.js";import"./index.262719bd.js";import"./index.9afdceeb.js";import"./dateUtil.5d7bc960.js";import"./_baseMerge.998dbe54.js";import"./_isIterateeCall.84166c87.js";import"./_baseEach.c1b9526f.js";import"./get.b66bb2fe.js";import"./index.cdbd692e.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.ea81f023.js";import"./FullscreenOutlined.c50d1010.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.5947a2bf.js";import"./scrollTo.2da64f7b.js";import"./index.3d42118d.js";import"./index.8d9971eb.js";import"./index.086365df.js";import"./_baseIteratee.b0866b0b.js";import"./index.674bd747.js";import"./useRefs.4fb28289.js";import"./download.fb2e30a2.js";import"./index.5994995e.js";import"./uniqBy.ad308d2e.js";import"./defaultsDeep.5662d628.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};