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

@@ -13,7 +13,7 @@
<span class="name">{{ scope.item.name }}</span>
<div class="opt">
<div v-if="hasRole(scope.item.key)">
<el-button size="small" type="success" @click="useRole(scope.item.id)">使用</el-button>
<el-button size="small" type="success" @click="useRole(scope.item)">使用</el-button>
<el-button size="small" type="danger" @click="updateRole(scope.item,'remove')">移除</el-button>
</div>
<el-button v-else size="small"
@@ -110,8 +110,8 @@ const hasRole = (roleKey) => {
}
const router = useRouter()
const useRole = (roleId) => {
router.push({name: "chat", params: {role_id: roleId}})
const useRole = (role) => {
router.push(`/chat?role_id=${role.id}`)
}
</script>