This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
handingkang-ohmyweb/static/SwitchRoles.59f681e8.js
2022-07-04 02:00:00 +00:00

2 lines
735 B
JavaScript

import{a,y as e,c as s,R as l,k as t,r as o,o as n,b as i,z as r,t as d,g as u,e as m,w as c}from"./index.f5832b78.js";const p={style:{"margin-bottom":"15px"}},g={style:{display:"flex","align-items":"center"}},b=r("span",null,"切换权限:",-1),v=a({__name:"SwitchRoles",emits:["change"],setup(a,{emit:v}){const y=e(),f=s((()=>y.roles)),h=l(f.value[0]);return t(h,(async a=>{await y.changeRoles(a),v("change")})),(a,e)=>{const s=o("el-radio-button"),l=o("el-radio-group");return n(),i("div",null,[r("div",p,"你的权限:"+d(u(f)),1),r("div",g,[b,m(l,{modelValue:h.value,"onUpdate:modelValue":e[0]||(e[0]=a=>h.value=a)},{default:c((()=>[m(s,{label:"editor"}),m(s,{label:"admin"})])),_:1},8,["modelValue"])])])}}});export{v as _};