lcny-vue3-antd-admin/dist/assets/index.69ade704.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.77d73289.js";import{T as A}from"./useForm.96558754.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.6c80cc19.js";import{_ as W,c as q,s as z}from"./LinksDrawer.6dc227f2.js";import{b as G}from"./index.8f2d4da0.js";import"./index.a8170106.js";import"./Checkbox.d4965003.js";import"./index.00c7c5e2.js";import"./index.9b71d7cd.js";import"./index.4b1b22ef.js";import"./index.04eb1479.js";import"./useSize.283d0817.js";import"./eagerComputed.1976f765.js";import"./onMountedOrActivated.ab39c918.js";import"./useWindowSizeFn.da3badfc.js";import"./useContentViewHeight.4d193d90.js";import"./ArrowLeftOutlined.dc57794f.js";import"./transButton.44f753c0.js";import"./index.97d348d1.js";import"./index.53053767.js";import"./index.33248555.js";import"./index.d822d396.js";import"./dateUtil.75313094.js";import"./_baseMerge.3b2a7b8a.js";import"./_isIterateeCall.ee7bfd30.js";import"./_baseEach.7bcf811f.js";import"./get.24ba2b55.js";import"./index.acbd45eb.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.4bdcdeab.js";import"./FullscreenOutlined.295e66a3.js";import"./index.9719a404.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.e8740387.js";import"./scrollTo.af67b220.js";import"./index.e0251c72.js";import"./index.214da44d.js";import"./index.f3cf27d5.js";import"./_baseIteratee.f1063301.js";import"./index.22002bc0.js";import"./useRefs.b71fd7f8.js";import"./download.dbebd0d9.js";import"./index.7fa0a554.js";import"./uniqBy.8999124b.js";import"./defaultsDeep.2221bec8.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};