opt: styles and view micro optimization

This commit is contained in:
RockYang
2024-05-01 07:40:56 +08:00
parent 3db55cbd48
commit 29cc24508b
6 changed files with 14 additions and 11 deletions

View File

@@ -358,8 +358,8 @@ const initData = () => {
// 加载角色列表
httpGet(`/api/role/list`).then((res) => {
roles.value = res.data;
if (router.currentRoute.value.params.role_id) {
roleId.value = parseInt(router.currentRoute.value.params["role_id"])
if (router.currentRoute.value.query.role_id) {
roleId.value = parseInt(router.currentRoute.value.query.role_id)
} else {
roleId.value = roles.value[0]['id']
}