lcny-vue3-antd-admin/dist/assets/index.c55080a8.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,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.8bfb918a.js";import{T as R}from"./useForm.72366620.js";import{J as A,s as M,be as L,aC as u,bP as N,o as b,h as T,p as f,x as k,w as V,j,y as I,l as J,cu as w,g1 as K,g2 as P}from"./index.caefd1ac.js";import{_ as U,c as W,s as q}from"./LinksDrawer.16ada039.js";import{b as z}from"./index.358e7c19.js";import"./index.62749bc9.js";import"./Checkbox.96a09ef1.js";import"./index.6f4e828b.js";import"./index.1c274344.js";import"./index.b8cde84f.js";import"./index.b47a82da.js";import"./useSize.de9063a9.js";import"./eagerComputed.550b9170.js";import"./onMountedOrActivated.f55f7cb1.js";import"./useWindowSizeFn.94f84601.js";import"./useContentViewHeight.48b9e1ed.js";import"./ArrowLeftOutlined.953e7c53.js";import"./transButton.e5176e05.js";import"./index.9cb1b4a3.js";import"./index.4c660ef0.js";import"./index.11569a26.js";import"./index.e2f73f4c.js";import"./dateUtil.5b2c030b.js";import"./_baseMerge.9e5a397a.js";import"./_isIterateeCall.b2126e63.js";import"./_baseEach.c97ad90b.js";import"./get.373dfd79.js";import"./index.adc41522.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.51e4046e.js";import"./FullscreenOutlined.93df46a8.js";import"./index.9445e0f3.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.e75bff24.js";import"./scrollTo.b81ed8fd.js";import"./index.f1bb3c7b.js";import"./index.eb967d29.js";import"./index.1159119f.js";import"./_baseIteratee.3eabc135.js";import"./index.66cc952c.js";import"./useRefs.32aa9173.js";import"./download.9e6c0445.js";import"./index.f24323fa.js";import"./uniqBy.d3cafc9d.js";import"./defaultsDeep.6913164b.js";const G={components:{BasicTable:E,LinksDrawer:U,TableAction:R},setup(){const o=M({}),[t,{openModal:e}]=z(),[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:q},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})}},H={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 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",H,[f(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"])])):J("",!0)]),_:1},8,["onRegister"]),f(i,{onRegister:r.registerModal,onSuccess:r.handleSuccess},null,8,["onRegister","onSuccess"])])}var Pe=A(G,[["render",O]]);export{Pe as default};