style: 简化数据管理数据库标题
This commit is contained in:
@@ -728,5 +728,5 @@
|
|||||||
## 2026-06-25:数据管理数据库选择改为弹窗列表
|
## 2026-06-25:数据管理数据库选择改为弹窗列表
|
||||||
|
|
||||||
- 数据管理页不再用下拉框切换数据库,改为表标题旁的图标按钮打开「选择数据库」弹窗;弹窗内为固定高度列表,超出高度滚动。
|
- 数据管理页不再用下拉框切换数据库,改为表标题旁的图标按钮打开「选择数据库」弹窗;弹窗内为固定高度列表,超出高度滚动。
|
||||||
- 选择项仍来自主数据库与 CellData 数据库配置,后续新增更多数据库时继续扩展同一列表,不占用侧栏宽度。
|
- 左侧标题只显示分类名(主数据库 / CellData),不显示具体库名,也不再显示“表”字;选择项后续新增更多数据库时继续扩展同一列表,不占用侧栏宽度。
|
||||||
- 验证:`frontend` `npm run build` 通过(仅既有大 chunk 提示);构建产物已清理。
|
- 验证:`frontend` `npm run build` 通过(仅既有大 chunk 提示);构建产物已清理。
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
<section class="database-table-pane">
|
<section class="database-table-pane">
|
||||||
<div class="database-table-pane-header">
|
<div class="database-table-pane-header">
|
||||||
<div class="database-source-header">
|
<div class="database-source-header">
|
||||||
<h2>表</h2>
|
|
||||||
<span class="database-source-name">{{ selectedDatabaseSourceLabel }}</span>
|
<span class="database-source-name">{{ selectedDatabaseSourceLabel }}</span>
|
||||||
<n-button
|
<n-button
|
||||||
quaternary
|
quaternary
|
||||||
@@ -268,7 +267,7 @@ import {
|
|||||||
} from '@vicons/ionicons5';
|
} from '@vicons/ionicons5';
|
||||||
|
|
||||||
import { apiGet, apiPost, download } from '../api/client';
|
import { apiGet, apiPost, download } from '../api/client';
|
||||||
import type { ApiMessage, AppConfig, DatabaseInfo, TableData, TableInfo } from '../types';
|
import type { ApiMessage, DatabaseInfo, TableData, TableInfo } from '../types';
|
||||||
import { showDownloadCompleteDialog } from '../composables/downloadFeedback';
|
import { showDownloadCompleteDialog } from '../composables/downloadFeedback';
|
||||||
import { resetPageHeader, setPageHeader } from '../composables/pageHeader';
|
import { resetPageHeader, setPageHeader } from '../composables/pageHeader';
|
||||||
|
|
||||||
@@ -406,24 +405,12 @@ async function testConnection() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadDatabaseSourceOptions() {
|
function loadDatabaseSourceOptions() {
|
||||||
try {
|
|
||||||
const config = await apiGet<AppConfig>('/api/config');
|
|
||||||
const mainName = config.warehouse_type === 'metrix'
|
|
||||||
? (config.metrix.target_database || 'Metrix')
|
|
||||||
: (config.mysql.dbname || '主数据库');
|
|
||||||
const cellName = config.cell_data?.mysql?.dbname || 'CellData';
|
|
||||||
databaseSourceOptions.value = [
|
|
||||||
{ label: `主数据库:${mainName}`, value: 'main' },
|
|
||||||
{ label: `CellData:${cellName}`, value: 'cell_data' }
|
|
||||||
];
|
|
||||||
} catch {
|
|
||||||
databaseSourceOptions.value = [
|
databaseSourceOptions.value = [
|
||||||
{ label: '主数据库', value: 'main' },
|
{ label: '主数据库', value: 'main' },
|
||||||
{ label: 'CellData', value: 'cell_data' }
|
{ label: 'CellData', value: 'cell_data' }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
async function loadTables() {
|
async function loadTables() {
|
||||||
if (loadingTables.value) return;
|
if (loadingTables.value) return;
|
||||||
@@ -756,14 +743,6 @@ function formatCell(value: unknown): string {
|
|||||||
border-bottom: 1px solid var(--td-border-color-light);
|
border-bottom: 1px solid var(--td-border-color-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.database-table-pane-header h2 {
|
|
||||||
margin: 0;
|
|
||||||
color: var(--td-text-color-primary);
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 600;
|
|
||||||
line-height: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.database-source-header {
|
.database-source-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@@ -775,8 +754,10 @@ function formatCell(value: unknown): string {
|
|||||||
.database-source-name {
|
.database-source-name {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: var(--td-text-color-secondary);
|
color: var(--td-text-color-primary);
|
||||||
font-size: 12px;
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 22px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user