role-list.614178dc.js 1004 B

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