chore: Update tdesign-vue-next and refactor UserMenu and Settings components
- Upgraded tdesign-vue-next to version 1.17.2 for improved features and performance. - Replaced emoji icons with corresponding tdesign icons in UserMenu and Settings components for consistency. - Adjusted styles in the nav-icon class for better alignment and visual appeal.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
"pagefind": "^1.1.1",
|
||||
"pinia": "^3.0.1",
|
||||
"tdesign-icons-vue-next": "^0.4.1",
|
||||
"tdesign-vue-next": "^1.11.5",
|
||||
"tdesign-vue-next": "^1.17.2",
|
||||
"vue": "^3.5.13",
|
||||
"vue-router": "^4.5.0",
|
||||
"webpack": "^5.94.0"
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
<Transition name="dropdown">
|
||||
<div v-if="menuVisible" class="user-dropdown" @click.stop>
|
||||
<div class="menu-item" @click="handleQuickNav('models')">
|
||||
<t-icon name="component" class="menu-icon" />
|
||||
<t-icon name="control-platform" class="menu-icon" />
|
||||
<span>模型配置</span>
|
||||
</div>
|
||||
<div class="menu-item" @click="handleQuickNav('ollama')">
|
||||
<span class="menu-icon emoji-icon">🦙</span>
|
||||
<t-icon name="server" class="menu-icon" />
|
||||
<span>Ollama</span>
|
||||
</div>
|
||||
<div class="menu-item" @click="handleQuickNav('knowledge')">
|
||||
<t-icon name="layers" class="menu-icon" />
|
||||
<t-icon name="folder-open" class="menu-icon" />
|
||||
<span>知识库</span>
|
||||
</div>
|
||||
<div class="menu-divider"></div>
|
||||
@@ -39,7 +39,7 @@
|
||||
<span>API 文档</span>
|
||||
</div>
|
||||
<div class="menu-item" @click="openWebsite">
|
||||
<t-icon name="internet" class="menu-icon" />
|
||||
<t-icon name="home" class="menu-icon" />
|
||||
<span>官网</span>
|
||||
</div>
|
||||
<div class="menu-item" @click="openGithub">
|
||||
@@ -316,11 +316,6 @@ onUnmounted(() => {
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
.emoji-icon {
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
// 下拉动画
|
||||
.dropdown-enter-active,
|
||||
.dropdown-leave-active {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
}]"
|
||||
@click="handleNavClick(item)"
|
||||
>
|
||||
<span class="nav-icon">{{ item.icon }}</span>
|
||||
<t-icon :name="item.icon" class="nav-icon" />
|
||||
<span class="nav-label">{{ item.label }}</span>
|
||||
<t-icon
|
||||
v-if="item.children && item.children.length > 0"
|
||||
@@ -116,10 +116,10 @@ const currentSubSection = ref<string>('')
|
||||
const expandedMenus = ref<string[]>([])
|
||||
|
||||
const navItems = [
|
||||
{ key: 'general', icon: '⚙️', label: '常规' },
|
||||
{ key: 'general', icon: 'setting', label: '常规' },
|
||||
{
|
||||
key: 'models',
|
||||
icon: '🤖',
|
||||
icon: 'control-platform',
|
||||
label: '模型配置',
|
||||
children: [
|
||||
{ key: 'chat', label: '对话模型' },
|
||||
@@ -128,10 +128,10 @@ const navItems = [
|
||||
{ key: 'vllm', label: 'VLLM' }
|
||||
]
|
||||
},
|
||||
{ key: 'ollama', icon: '🦙', label: 'Ollama' },
|
||||
{ key: 'knowledge', icon: '📚', label: '知识库' },
|
||||
{ key: 'agent', icon: '🧠', label: 'Agent 配置' },
|
||||
{ key: 'system', icon: 'ℹ️', label: '系统信息' }
|
||||
{ key: 'ollama', icon: 'server', label: 'Ollama' },
|
||||
{ key: 'knowledge', icon: 'folder-open', label: '知识库' },
|
||||
{ key: 'agent', icon: 'chat', label: 'Agent 配置' },
|
||||
{ key: 'system', icon: 'info-circle', label: '系统信息' }
|
||||
]
|
||||
|
||||
// 导航项点击处理
|
||||
@@ -350,12 +350,12 @@ onUnmounted(() => {
|
||||
|
||||
.nav-icon {
|
||||
margin-right: 12px;
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
flex-shrink: 0;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.nav-label {
|
||||
|
||||
Reference in New Issue
Block a user