site: adjust copy icon position

This commit is contained in:
07akioni 2021-06-09 02:27:40 +08:00
parent 8d918d1312
commit 92fef0bb0e
3 changed files with 10 additions and 13 deletions

View File

@ -14,7 +14,7 @@
</span>
</template>
<template #header-extra>
<n-tooltip trigger="hover" :placement="'top'" :show-arrow="true">
<n-tooltip>
<template #trigger>
<edit-in-code-sandbox-button
style="padding: 0; margin-right: 6px"
@ -24,7 +24,7 @@
</template>
{{ t('editInCodeSandbox') }}
</n-tooltip>
<n-tooltip trigger="hover" :placement="'top'" :show-arrow="true">
<n-tooltip>
<template #trigger>
<edit-on-github-button
depth="3"
@ -35,7 +35,7 @@
</template>
{{ t('editOnGithub') }}
</n-tooltip>
<n-tooltip trigger="hover" :placement="'top'" :show-arrow="true">
<n-tooltip>
<template #trigger>
<copy-code-button
depth="3"
@ -47,12 +47,7 @@
</template>
{{ t('copyCode') }}
</n-tooltip>
<n-tooltip
ref="expandCodeButtonRef"
trigger="hover"
:placement="'top'"
:show-arrow="true"
>
<n-tooltip ref="expandCodeButtonRef">
<template #trigger>
<n-button
style="padding: 0"
@ -87,13 +82,14 @@ import { CodeOutline } from '@vicons/ionicons5'
import { useDisplayMode } from '../store'
import { i18n } from '../utils/composables'
import EditOnGithubButton from './EditOnGithubButton.vue'
import editInCodeSandboxButton from './EditInCodeSandboxButton.vue'
import EditInCodeSandboxButton from './EditInCodeSandboxButton.vue'
import CopyCodeButton from './CopyCodeButton.vue'
export default {
components: {
CodeOutline,
EditOnGithubButton,
editInCodeSandboxButton,
EditInCodeSandboxButton,
CopyCodeButton
},
props: {

View File

@ -8,7 +8,7 @@
>
<template #icon>
<n-icon size="14">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-32 -32 544 544">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-32 -16 544 560">
<rect
x="128"
y="128"
@ -41,6 +41,7 @@
<script>
import { useMessage } from 'naive-ui'
export default {
name: 'CopyCodeButton',
props: {

View File

@ -2,7 +2,7 @@
<n-h1 :id="id" class="naive-doc-title">
<span>{{ text }}</span>
<span class="edit-button">
<n-tooltip trigger="hover" placement="right" :show-arrow="true">
<n-tooltip placement="right">
<template #trigger>
<edit-on-github-button
text