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

2 lines
3.8 KiB
JavaScript

var y=Object.defineProperty,x=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,B=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))B.call(t,e)&&F(o,e,t[e]);return o},_=(o,t)=>x(o,D(t));var h=(o,t,e)=>new Promise((r,s)=>{var l=n=>{try{a(e.next(n))}catch(i){s(i)}},c=n=>{try{a(e.throw(n))}catch(i){s(i)}},a=n=>n.done?r(n.value):Promise.resolve(n.value).then(l,c);a((e=e.apply(o,t)).next())});import{B as E,u as S}from"./useTable.24cb9183.js";import{T as A}from"./useForm.fd42ca81.js";import{J as R,s as M,bc as N,aA as u,bN as L,o as b,h as T,p as f,x as k,w as V,j,y as I,l as J,cs as w,g0 as K,g1 as U}from"./index.18dd6a55.js";import{_ as W,c as q,s as z}from"./LinksDrawer.551ddea1.js";import{b as G}from"./index.03ffcf6d.js";import"./index.68a405b5.js";import"./Checkbox.20433ddd.js";import"./index.0e297388.js";import"./index.67181b0b.js";import"./index.e0b435e4.js";import"./index.3950b610.js";import"./useSize.42c732c4.js";import"./eagerComputed.536d5da3.js";import"./onMountedOrActivated.c5ace8de.js";import"./useWindowSizeFn.b84f1217.js";import"./useContentViewHeight.11d3c07a.js";import"./ArrowLeftOutlined.4b489620.js";import"./transButton.0ab023b8.js";import"./index.eeb861b0.js";import"./index.eba48b6c.js";import"./index.1a56c111.js";import"./index.36a351ad.js";import"./dateUtil.8d2cf563.js";import"./_baseMerge.d5785cd7.js";import"./_isIterateeCall.882b433e.js";import"./_baseEach.f0ef2221.js";import"./get.278b3244.js";import"./index.fff71b29.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.41090729.js";import"./FullscreenOutlined.ea545dd6.js";import"./index.95c5c1b3.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.f9651012.js";import"./scrollTo.bf68fc12.js";import"./index.992e662c.js";import"./index.372419bd.js";import"./index.690dbd65.js";import"./_baseIteratee.938280dc.js";import"./index.700d4d3e.js";import"./useRefs.76472546.js";import"./download.84663072.js";import"./index.85fbcf65.js";import"./uniqBy.a393ed7d.js";import"./defaultsDeep.8f0d037e.js";const H={components:{BasicTable:E,LinksDrawer:W,TableAction:A},setup(){const o=M({}),[t,{openModal:e}]=G(),[r,{reload:s}]=S({title:"\u8D26\u53F7\u5217\u8868",api:i=>h(this,null,function*(){const{data:d,meta:m}=yield U(p({},i));return{items:d,total:m==null?void 0:m.total}}),rowKey:"id",columns:q,formConfig:{labelWidth:80,schemas:z},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),l=()=>{w.success("\u64CD\u4F5C\u6210\u529F"),s()},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"),s()}),registerTable:r,registerModal:t,handleSuccess:l},N(o)),{handleCreate:c})}},O={key:0,class:"flex items-center justify-center"};function P(o,t,e,r,s,l){const c=u("a-button"),a=u("TableAction"),n=u("BasicTable"),i=u("LinksDrawer"),d=L("auth");return b(),T("div",null,[f(n,{onRegister:r.registerTable},{toolbar:k(()=>[V((b(),j(c,{type:"primary",onClick:r.handleCreate},{default:k(()=>[I(" \u65B0\u589E\u94FE\u63A5 ")]),_:1},8,["onClick"])),[[d,"endpoint.friend_links.index"]])]),bodyCell:k(({column:m,record:g})=>[m.key==="action"?(b(),T("div",O,[f(a,{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"])])):J("",!0)]),_:1},8,["onRegister"]),f(i,{onRegister:r.registerModal,onSuccess:r.handleSuccess},null,8,["onRegister","onSuccess"])])}var Ue=R(H,[["render",P]]);export{Ue as default};