role-list.5dc63f1c.js 1000 B

1
  1. import{_ as d,d as p,aF as f,w as m,x as _,r as h,o,G as v,C,c as l,F as b,D as g,B as R,L as k,u as x}from"./index.7fe3185d.js";import{h as w}from"./index.4dd233d2.js";const y=["onClick"],L=p({__name:"role-list",props:{currentRole:{type:Object,required:!0}},emits:["changeCurrentRole"],setup(c,{emit:t}){const i=f(),r=m([]);async function u(){const{code:n,data:a,message:s}=await w({size:100});i({code:n,message:s,handler:()=>{r.value=a.list,t("changeCurrentRole",x(r)[0])}})}return _(()=>u()),(n,a)=>{const s=h("ElScrollbar");return o(),v(s,{class:"border-r border-#dcdfe6"},{default:C(()=>[(o(!0),l(b,null,g(r.value,e=>(o(),l("div",{class:R(["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)},k(e.role_name),11,y))),128))]),_:1})}}});var E=d(L,[["__file","D:/work/accout-vue3-ui1/src/views/interest/processPermission/components/role-list.vue"]]);export{E as default};