-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy pathSystemHeader.vue
More file actions
55 lines (53 loc) · 1.6 KB
/
SystemHeader.vue
File metadata and controls
55 lines (53 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
·
<template>
<div class="app-top-bar-container border-b flex-center">
<div class="logo mt-4">
<LogoFull />
</div>
<div class="flex-between w-full align-center">
<h4><el-divider class="ml-16 mr-16" direction="vertical" />{{ $t('views.system.title') }}</h4>
<div class="flex align-center mr-8">
<TopAbout type="system"></TopAbout>
<el-divider class="ml-8 mr-8" direction="vertical" />
<el-button
link
@click="goHome"
style="color: var(--el-text-color-primary)"
v-if="
hasPermission(
[
RoleConst.USER.getWorkspaceRole,
RoleConst.EXTENDS_USER.getWorkspaceRole,
RoleConst.EXTENDS_WORKSPACE_MANAGE.getWorkspaceRole,
RoleConst.WORKSPACE_MANAGE.getWorkspaceRole,
],
'OR',
)
"
>
<AppIcon class="mr-8" iconName="app-workspace" style="font-size: 16px"></AppIcon>
{{ $t('views.workspace.toWorkspace') }}</el-button
>
</div>
</div>
<Avatar></Avatar>
</div>
</template>
<script setup lang="ts">
import { RoleConst } from '@/utils/permission/data'
import Avatar from './avatar/index.vue'
import TopAbout from './top-about/index.vue'
import { useRouter } from 'vue-router'
import { hasPermission } from '@/utils/permission'
const router = useRouter()
const goHome = () => {
router.push('/')
}
</script>
<style lang="scss" scoped>
.app-top-bar-container {
height: var(--app-header-height);
box-sizing: border-box;
padding: var(--app-header-padding);
}
</style>