feat(initialization): 新增配置文件操作和管理员权限检查

- 新增配置文件保存、加载和重置功能
- 添加管理员权限检查和重启为管理员的功能
- 实现 pip 包管理器安装功能
- 优化初始化流程,自动检测并安装依赖
This commit is contained in:
2025-08-07 20:18:53 +08:00
parent e7f898f357
commit 0171c3ca4d
15 changed files with 2397 additions and 8 deletions

View File

@@ -0,0 +1,64 @@
<template>
<div class="step-panel">
<h3>安装 pip 包管理器</h3>
<div v-if="!pipInstalled" class="install-section">
<p>pip Python 的包管理工具用于安装和管理 Python </p>
<div class="pip-info">
<a-alert
message="pip 安装信息"
description="将自动下载并安装 pip 包管理器,这是安装 Python 依赖包的必要工具。"
type="info"
show-icon
/>
</div>
</div>
<div v-else class="already-installed">
<a-result status="success" title="pip 已安装" />
</div>
</div>
</template>
<script setup lang="ts">
defineProps<{
pipInstalled: boolean
}>()
</script>
<style scoped>
.step-panel {
padding: 20px;
background: var(--ant-color-bg-elevated);
border-radius: 8px;
border: 1px solid var(--ant-color-border);
}
.step-panel h3 {
font-size: 20px;
font-weight: 600;
color: var(--ant-color-text);
margin-bottom: 20px;
}
.install-section {
display: flex;
flex-direction: column;
gap: 20px;
}
.install-section p {
color: var(--ant-color-text-secondary);
margin: 0;
}
.pip-info {
margin-top: 16px;
}
.already-installed {
display: flex;
justify-content: center;
align-items: center;
min-height: 200px;
}
</style>