lcny-vue3-antd-admin/dist/assets/index.9c5a3adc.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.6ab1eba2.js";import{T as R}from"./useForm.36793474.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.d39002cd.js";import{_ as U,c as W,s as z}from"./LinksDrawer.f37c8219.js";import{b as G}from"./index.e0609b39.js";import"./index.266b170a.js";import"./Checkbox.5d03fb9c.js";import"./index.62d78962.js";import"./index.1f781871.js";import"./index.26c3acb5.js";import"./index.6d77bb86.js";import"./useSize.d6417580.js";import"./eagerComputed.85f1df06.js";import"./onMountedOrActivated.40dc989a.js";import"./useWindowSizeFn.b01bfa18.js";import"./useContentViewHeight.c16bb11a.js";import"./ArrowLeftOutlined.43fb40bd.js";import"./transButton.1f8e084b.js";import"./index.98999ea9.js";import"./index.a78c7ba3.js";import"./index.032bd19f.js";import"./index.b5054b57.js";import"./dateUtil.cdadf7a4.js";import"./_baseMerge.0fcb8c41.js";import"./_isIterateeCall.222a40ca.js";import"./_baseEach.da3bf513.js";import"./get.bf2aa0fe.js";import"./index.a65cfc0e.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.89d86ff0.js";import"./FullscreenOutlined.c9237a1e.js";import"./index.528c1282.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.dc53185f.js";import"./scrollTo.e659753f.js";import"./index.bdd44cb7.js";import"./index.1d30c971.js";import"./index.22ab5e63.js";import"./_baseIteratee.7084243b.js";import"./index.52a2dbb2.js";import"./useRefs.88f4372b.js";import"./download.9c8781e1.js";import"./index.277242da.js";import"./uniqBy.948a872c.js";import"./defaultsDeep.a4b83f4d.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};