role-list.92e01b50.js 1008 B

1
  1. import{_ as p,d,c_ as m,m as _,n as f,r as h,o as t,A as v,x as b,c as l,F as C,y as g,v as R,G as k,u as y}from"./index.b5c844d0.js";import{h as x}from"./index.2506a23e.js";const w=["onClick"],L=d({__name:"role-list",props:{currentRole:{type:Object,required:!0}},emits:["changeCurrentRole"],setup(j,{emit:c}){const n=c,i=m(),r=_([]);async function u(){const{code:s,data:a,message:o}=await x({size:100});i({code:s,message:o,handler:()=>{r.value=a.list,n("changeCurrentRole",y(r)[0])}})}return f(()=>u()),(s,a)=>{const o=h("ElScrollbar");return t(),v(o,{class:"border-r border-#dcdfe6"},{default:b(()=>[(t(!0),l(C,null,g(r.value,e=>(t(),l("div",{class:R(["px-1 py-0.5 m-1.5 hover:color-blue hover:bg-#f7f7f7 cursor-pointer duration-200",s.currentRole.id===e.id&&"color-blue bg-#f7f7f7"]),key:e.id,onClick:()=>n("changeCurrentRole",e)},k(e.role_name),11,w))),128))]),_:1})}}});var S=p(L,[["__file","D:/work/sjtj/report-v3/src/views/interest/processPermission/components/role-list.vue"]]);export{S as default};