refactor editor and panel.

This commit is contained in:
2023-01-31 22:16:41 +08:00
parent 7b0163885a
commit 17aa4afc04
8 changed files with 115 additions and 74 deletions

View File

@@ -15,10 +15,16 @@ function handleClick(value: string) {
<template>
<n-tooltip trigger="hover">
<template #trigger>
<n-icon @click="handleClick(value)">
<n-icon class="icon" @click="handleClick(value)">
<component :is="copied ? Select : DocumentCopy"></component>
</n-icon>
</template>
{{ copied ? "已复制" : "复制" }}
</n-tooltip>
</template>
<style scoped>
.icon {
cursor: pointer;
transform: translateY(2px);
}
</style>

View File

@@ -107,7 +107,13 @@ const options = computed<Array<DropdownOption | DropdownDividerOption>>(() => [
<n-button @click="toggleSignup(true)">注册</n-button>
</n-space>
<n-dropdown :options="menus">
<n-button>菜单</n-button>
<n-button>
<template #icon>
<n-icon>
<i-ep-menu />
</n-icon>
</template>
</n-button>
</n-dropdown>
</n-space>
</template>