lcny-vue3-antd-admin/dist/assets/index.ddf06d5e.js

2 lines
3.8 KiB
JavaScript

var y=Object.defineProperty,D=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var F=(o,t,e)=>t in o?y(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,p=(o,t)=>{for(var e in t||(t={}))v.call(t,e)&&F(o,e,t[e]);if(C)for(var e of C(t))x.call(t,e)&&F(o,e,t[e]);return o},_=(o,t)=>D(o,B(t));var h=(o,t,e)=>new Promise((r,a)=>{var l=n=>{try{s(e.next(n))}catch(i){a(i)}},c=n=>{try{s(e.throw(n))}catch(i){a(i)}},s=n=>n.done?r(n.value):Promise.resolve(n.value).then(l,c);s((e=e.apply(o,t)).next())});import{B as E,u as S}from"./useTable.026852a6.js";import{T as R}from"./useForm.a968f057.js";import{q as A,w as M,bf as L,aE as u,bP as N,o as f,h as T,p as b,B as k,y as V,j,D as q,l as I,cu as w,g1 as K,g2 as P}from"./index.86b2d1e9.js";import{_ as U,c as W,s as z}from"./LinksDrawer.4613050e.js";import{b as G}from"./index.c095e435.js";import"./index.23195f95.js";import"./Checkbox.6ab0d1fd.js";import"./index.5f4d6fe6.js";import"./index.6d67b5d8.js";import"./index.a2eca1e4.js";import"./index.c102fc28.js";import"./useSize.9a16d4a6.js";import"./eagerComputed.1592ed29.js";import"./onMountedOrActivated.059f2156.js";import"./useWindowSizeFn.fd2146e4.js";import"./useContentViewHeight.e8bc7717.js";import"./ArrowLeftOutlined.b8fef731.js";import"./transButton.48eb62d7.js";import"./index.f927b28d.js";import"./index.962a1c87.js";import"./index.52b14746.js";import"./index.fcd6b821.js";import"./dateUtil.2d9585bb.js";import"./_baseMerge.5bcc3c8a.js";import"./_isIterateeCall.cb763393.js";import"./_baseEach.3fb74165.js";import"./get.043901f5.js";import"./index.bc2491f6.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.f4e1dec6.js";import"./FullscreenOutlined.a3d881df.js";import"./index.cd4c46eb.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.2a7efe44.js";import"./scrollTo.3dc4d2f0.js";import"./index.cad08aa5.js";import"./index.e9fce6d7.js";import"./index.27c0f67b.js";import"./_baseIteratee.a56bccd7.js";import"./index.015371fe.js";import"./useRefs.abe2f885.js";import"./download.cca4d1ff.js";import"./index.2d9cc828.js";import"./uniqBy.f4394049.js";import"./defaultsDeep.84c0cb48.js";const H={components:{BasicTable:E,LinksDrawer:U,TableAction:R},setup(){const o=M({}),[t,{openModal:e}]=G(),[r,{reload:a}]=S({title:"\u8D26\u53F7\u5217\u8868",api:i=>h(this,null,function*(){const{data:d,meta:m}=yield P(p({},i));return{items:d,total:m==null?void 0:m.total}}),rowKey:"id",columns:W,formConfig:{labelWidth:80,schemas:z},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),l=()=>{w.success("\u64CD\u4F5C\u6210\u529F"),a()},c=()=>{e(!0,{id:!1})};return _(p({handleEdit:i=>{e(!0,_(p({},i),{isUpdate:!0}))},handleDelete:i=>h(this,null,function*(){yield K(i.id),w.success("\u5220\u9664\u6210\u529F"),a()}),registerTable:r,registerModal:t,handleSuccess:l},L(o)),{handleCreate:c})}},J={key:0,class:"flex items-center justify-center"};function O(o,t,e,r,a,l){const c=u("a-button"),s=u("TableAction"),n=u("BasicTable"),i=u("LinksDrawer"),d=N("auth");return f(),T("div",null,[b(n,{onRegister:r.registerTable},{toolbar:k(()=>[V((f(),j(c,{type:"primary",onClick:r.handleCreate},{default:k(()=>[q(" \u65B0\u589E\u94FE\u63A5 ")]),_:1},8,["onClick"])),[[d,"endpoint.friend_links.index"]])]),bodyCell:k(({column:m,record:g})=>[m.key==="action"?(f(),T("div",J,[b(s,{actions:[{label:"\u7F16\u8F91",onClick:r.handleEdit.bind(null,g),auth:"endpoint.friend_links.edit"},{label:"\u5220\u9664",auth:"endpoint.friend_links.destroy",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:r.handleDelete.bind(null,g)}}]},null,8,["actions"])])):I("",!0)]),_:1},8,["onRegister"]),b(i,{onRegister:r.registerModal,onSuccess:r.handleSuccess},null,8,["onRegister","onSuccess"])])}var Pe=A(H,[["render",O]]);export{Pe as default};