Files
yusheng-admin/dist/static/js/index-BTQkAWUQ.js

2 lines
3.1 KiB
JavaScript
Raw Normal View History

2025-10-23 11:07:17 +08:00
var q=Object.defineProperty,w=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var R=(s,t,a)=>t in s?q(s,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[t]=a,T=(s,t)=>{for(var a in t||(t={}))O.call(t,a)&&R(s,a,t[a]);if(N)for(var a of N(t))j.call(t,a)&&R(s,a,t[a]);return s},V=(s,t)=>w(s,M(t));var p=(s,t,a)=>new Promise((C,l)=>{var u=o=>{try{i(a.next(o))}catch(e){l(e)}},b=o=>{try{i(a.throw(o))}catch(e){l(e)}},i=o=>o.done?C(o.value):Promise.resolve(o.value).then(u,b);i((a=a.apply(s,t)).next())});import{_ as A}from"./form.vue_vue_type_script_setup_true_lang-J4dbTMG5.js";import{d as E,n as v,x as F,r as h,o as K,c as P,e as S,b as d,h as f,f as $,U,aA as m,aK as z,ag as G,_ as H}from"./index-CRmU-Qpi.js";import{q as J,r as Q,a as W,e as X}from"./expression-DA1ai6Y-.js";const Y={key:0,class:"viewPage"},Z={style:{display:"inline-flex","justify-content":"flex-end",width:"100%"}},D=E({__name:"index",setup(s){const t=v([]),a=v([]),C=v([{label:"ID",prop:"id"},{label:"分类名称",prop:"type_name"},{label:"操作",fixed:"right",width:210,slot:"operation"}]),l=()=>p(this,null,function*(){const{code:o,data:e}=yield J({});t.value=o?e.map(n=>({label:n.name,value:n.id})):[],o&&(a.value=e)}),u=v(null),b=o=>p(this,null,function*(){const{code:e}=yield Q({id:o.id});e&&(m(`您删除了表情名称为【${o.type_name}】的这条数据`,{type:"success"}),l())}),i=(o="新增",e)=>{var n,y;z({title:`${o}分类`,props:{formInline:{id:(n=e==null?void 0:e.id)!=null?n:"",type_name:(y=e==null?void 0:e.type_name)!=null?y:""}},width:"40%",closeOnClickModal:!1,contentRenderer:()=>G(A,{ref:u,formInline:null}),beforeSure:(_,{options:r})=>{const g=u.value.getRef(),I=r.props.formInline,B=c=>p(this,null,function*(){const{code:x,msg:k}=yield W(c);x?(m("新增成功",{type:"success"}),l(),_()):m(k,{type:"error"})}),L=c=>p(this,null,function*(){const{code:x,msg:k}=yield X(V(T({},c),{id:e.id}));x?(m("修改成功",{type:"success"}),l(),_()):m(k,{type:"error"})});g.validate(c=>{c&&(o==="新增"?B(I):L(I))})}})};return F(()=>{l()}),(o,e)=>{const n=h("el-button"),y=h("el-popconfirm"),_=h("pure-table");return t.value&&t.value.length?(K(),P("div",Y,[S("div",Z,[d(n,{type:"primary",onClick:e[0]||(e[0]=r=>i("新增",null))},{default:f(()=>e[1]||(e[1]=[$(" 新增 ")])),_:1})]),d(_,{class:"mt-5",ref:"tableRef","align-whole":"center",showOverflowTooltip:"","table-layout":"auto","default-expand-all":"","row-key":"id",adaptiveConfig:{offsetBottom:108},data:a.value,columns:C.value,"header-cell-style":{background:"var(--el-fill-color-light)",color:"var(--el-text-color-primary)"}},{operation:f(({row:r})=>[d(n,{link:"",type:"primary",onClick:g=>i("编辑",r)},{default:f(()=>e[2]||(e[2]=[$(" 编辑 ")])),_:2},1032,["onClick"]),d(y,{title:`是否确认删除表情名称为【${r.type_name}】的这条数据`,onConfirm:g=>b(r)},{reference:f(()=>[d(n,{link:"",type:"primary"},{default:f(()=>e[3]||(e[3]=[$(" 删除 ")])),_:1})]),_:2},1032,["title","onConfirm"])]),_:1},8,["data","columns"])])):U("",!0)}}}),se=H(D,[["__scopeId","data-v-364c9a75"]]);export{se as default};