index.vue
1.98 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<template>
<div class="go-aside-footer">
<n-divider class="go-mt-0"></n-divider>
<n-space justify="space-around">
<n-tooltip v-if="collapsed" placement="right" trigger="hover">
<template #trigger>
<n-button secondary @click="handleDoc">
<template #icon>
<n-icon size="18">
<document-text-icon></document-text-icon>
</n-icon>
</template>
</n-button>
</template>
<n-text>
{{ $t('global.doc') }}
</n-text>
</n-tooltip>
<n-button v-else secondary @click="handleDoc">
<template #icon>
<n-icon size="18">
<document-text-icon></document-text-icon>
</n-icon>
</template>
<n-text>{{ $t('global.doc') }}</n-text>
</n-button>
<n-tooltip v-if="collapsed" placement="right" trigger="hover">
<template #trigger>
<n-button secondary @click="handleDoc">
<template #icon>
<n-icon size="18">
<code-slash-icon></code-slash-icon>
</n-icon>
</template>
</n-button>
</template>
<n-text>
{{ $t('global.code_addr') }}
</n-text>
</n-tooltip>
<n-button v-else secondary @click="handleCode">
<template #icon>
<n-icon size="18">
<code-slash-icon></code-slash-icon>
</n-icon>
</template>
<n-text v-show="!collapsed">{{ $t('global.code_addr') }}</n-text>
</n-button>
</n-space>
</div>
</template>
<script setup lang="ts">
import { openDoc, openGiteeSourceCode } from '@/utils'
import { icon } from '@/plugins'
const { DocumentTextIcon, CodeSlashIcon } = icon.ionicons5
const props = defineProps({
collapsed: Boolean
})
const handleDoc = () => {
openDoc()
}
const handleCode = () => {
openGiteeSourceCode()
}
</script>
<style lang="scss" scoped>
@include go('aside-footer') {
padding-bottom: 20px;
}
</style>