在 CodeLaunchpad 里整一个关闭按钮

This commit is contained in:
2026-03-27 23:29:30 +08:00
parent b9d6f8b049
commit 4a87702694
2 changed files with 21 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
<script lang="ts" setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import CodeLaunchpadButton from '@renderer/components-code-launchpad/CodeLaunchpadButton.vue'
const activeKey = ref('/codeLaunchpad/IDEs')
const router = useRouter()
@@ -33,6 +34,7 @@ function handleUpdateValue(key: string): void {
<div class="scrollarea">
<router-view />
</div>
<CodeLaunchpadButton />
</div>
</template>

View File

@@ -0,0 +1,19 @@
<script setup lang="ts">
import { Close as CloseIcon } from '@vicons/ionicons5'
function close(): void {
window.api._closeCodeLaunchpad()
}
</script>
<template>
<n-float-button-group :right="16" :top="16" shape="circle">
<n-float-button type="default" @click="close">
<n-icon>
<CloseIcon />
</n-icon>
</n-float-button>
</n-float-button-group>
</template>
<style scoped></style>