role-list.49e432c5.js 1.0 KB

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