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.f207ed4d.js
2022-10-25 10:38:31 +00:00

2 lines
768 B
JavaScript

import{b as a,y as e,a as s,m as l,e as o,o as t,f as d,z as n,t as i,j as r,h as u,w as c,D as m,G as p,_ as v}from"./index.d53fa97d.js";const f={class:"switch-roles"},h=(a=>(m("data-v-21f43ea2"),a=a(),p(),a))((()=>n("span",null,"切换权限:",-1))),_=v(a({__name:"SwitchRoles",emits:["change"],setup(a,{emit:m}){const p=e(),v=s(p.roles[0]);return l(v,(async a=>{await p.changeRoles(a),m("change")})),(a,e)=>{const s=o("el-radio-button"),l=o("el-radio-group");return t(),d("div",null,[n("div",null,"你的权限:"+i(r(p).roles),1),n("div",f,[h,u(l,{modelValue:v.value,"onUpdate:modelValue":e[0]||(e[0]=a=>v.value=a)},{default:c((()=>[u(s,{label:"editor"}),u(s,{label:"admin"})])),_:1},8,["modelValue"])])])}}}),[["__scopeId","data-v-21f43ea2"]]);export{_ as S};