role-list.fe52b3bf.js 1.0 KB

1
  1. import{_ as p,d,aC as f,E as m,F as _,x as h,o as r,N as C,K as v,c as l,M as b,L as g,u as R,J as k,T as x}from"./index.1417328f.js";import{h as y}from"./index.c73594a5.js";const L=["onClick"],E=d({__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:o}=await y({size:100});i({code:n,message:o,handler:()=>{s.value=a.list,t("changeCurrentRole",R(s)[0])}})}return _(()=>u()),(n,a)=>{const o=h("ElScrollbar");return r(),C(o,{class:"border-r border-#dcdfe6"},{default:v(()=>[(r(!0),l(g,null,b(s.value,e=>(r(),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=p(E,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/interest/processPermission/components/role-list.vue"]]);export{S as default};