lcny-vue3-antd-admin/dist/assets/index.38d5a03b.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.c7e44100.js";import{T as R}from"./useForm.00f4ca4b.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.203f4f59.js";import{_ as U,c as W,s as z}from"./LinksDrawer.cb706f96.js";import{b as G}from"./index.2df2f55e.js";import"./index.591fff11.js";import"./Checkbox.7e429acc.js";import"./index.110550df.js";import"./index.69680028.js";import"./index.2ae54a5f.js";import"./index.e73e6cfc.js";import"./useSize.b54d9f00.js";import"./eagerComputed.543f2a69.js";import"./onMountedOrActivated.1c54c33a.js";import"./useWindowSizeFn.c9935f53.js";import"./useContentViewHeight.7130ce69.js";import"./ArrowLeftOutlined.96202fc8.js";import"./transButton.e0e63a17.js";import"./index.41982f04.js";import"./index.7d012f39.js";import"./index.f7891775.js";import"./index.f088aa20.js";import"./dateUtil.dbb1f8a5.js";import"./_baseMerge.f81cc583.js";import"./_isIterateeCall.46a90246.js";import"./_baseEach.1e1090eb.js";import"./get.8707ab1b.js";import"./index.c64eb697.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.42264666.js";import"./FullscreenOutlined.e6752e93.js";import"./index.c7b50250.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.55559160.js";import"./scrollTo.dc8ad3b7.js";import"./index.940eaa5c.js";import"./index.3d3fb3fd.js";import"./index.71283b4e.js";import"./_baseIteratee.d4400dec.js";import"./index.07575255.js";import"./useRefs.432b35dd.js";import"./download.af366e23.js";import"./index.886f9be4.js";import"./uniqBy.e27e2980.js";import"./defaultsDeep.fe00fce6.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};