-
-
-
-
Field Name
-
Type
-
Comment / Mapping
-
-
-
-
-
-
-
-
- {{ col.type }}
-
-
-
-
-
-
-
+
+
diff --git a/web/src/views/database/database.css b/web/src/views/database/database.css
index 2a1ed25..fde1b9b 100644
--- a/web/src/views/database/database.css
+++ b/web/src/views/database/database.css
@@ -30,13 +30,69 @@
@apply border-b border-dark-600 hover:bg-dark-600/50 transition-colors;
}
-/* 空状态 */
+/* 空状态(已不使用) */
.empty-state {
- @apply py-16 text-center text-gray-500;
+ @apply py-16 text-center;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+/* 自定义空状态盒子 */
+.empty-box {
+ min-height: 340px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+.empty-icon {
+ width: 100px;
+ height: 100px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: linear-gradient(135deg, #1f2937, #111827);
+ border-radius: 24px;
+ margin-bottom: 20px;
+}
+
+.empty-icon i {
+ font-size: 40px;
+ color: #6b7280;
+}
+
+.empty-text {
+ color: #d1d5db;
+ font-size: 1.25rem;
+ font-weight: 500;
+ margin-bottom: 8px;
+}
+
+.empty-tip {
+ color: #6b7280;
+ font-size: 0.875rem;
}
.empty-state-icon {
- @apply text-4xl mb-4 block;
+ font-size: 3rem;
+ margin-bottom: 1rem;
+ display: block;
+ color: #4b5563;
+}
+
+.empty-state-title {
+ color: #d1d5db;
+ font-size: 1.25rem;
+ font-weight: 500;
+}
+
+.empty-state-hint {
+ color: #6b7280;
+ font-size: 0.875rem;
+ margin-top: 0.5rem;
}
/* 表格复选框 */
diff --git a/web/src/views/database/useDatabase.ts b/web/src/views/database/useDatabase.ts
index e0283c4..295890d 100644
--- a/web/src/views/database/useDatabase.ts
+++ b/web/src/views/database/useDatabase.ts
@@ -482,10 +482,7 @@ export function useDatabase() {
parent_table: table.name,
sub_table_name: table.table_comment || table.name,
sub_table_comment: table.table_comment || '',
- fields: (table.columns || []).map(col => ({
- column_name: col.name,
- mapped_name: col.mapped_name || '',
- })),
+ ddl: table.ddl || '',
}))
try {