From b1750a62d72aaed16ff0b4821f7b0478205eeedb Mon Sep 17 00:00:00 2001 From: Nixevol Date: Tue, 10 Nov 2026 09:53:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AD=97=E6=AE=B5=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=90=9C=E7=B4=A2=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/features/admin/SourcesView.vue | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/web/src/features/admin/SourcesView.vue b/web/src/features/admin/SourcesView.vue index 46d132f..9eba2d8 100644 --- a/web/src/features/admin/SourcesView.vue +++ b/web/src/features/admin/SourcesView.vue @@ -39,6 +39,12 @@ const fieldsOpen = ref(false); const fieldsLoading = ref(false); const fieldsTitle = ref(""); const fields = ref<{ name: string; type: string }[]>([]); +const fieldKeyword = ref(""); +const visibleFields = computed(() => { + const text = fieldKeyword.value.trim().toLowerCase(); + if (!text) return fields.value; + return fields.value.filter((field) => field.name.toLowerCase().includes(text)); +}); const editing = ref(null); const name = ref(""); const enabled = ref(true); @@ -104,6 +110,7 @@ const renderTableLabel: SelectRenderLabel = (option) => { async function openFields(tablename: string, title: string) { fieldsTitle.value = title || "字段"; + fieldKeyword.value = ""; fields.value = []; fieldsOpen.value = true; fieldsLoading.value = true; @@ -346,15 +353,17 @@ onMounted(load);

正在读取字段

- +

没有匹配的字段

+

没有字段

@@ -405,10 +414,10 @@ onMounted(load); .picked-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .picked-row strong { display: block; } .picked-row span { color: var(--muted); font-size: 12px; } +.field-panel { display: grid; gap: 8px; } .field-list { display: grid; gap: 0; - margin-top: 8px; max-height: min(48vh, 420px); overflow: auto; border: 1px solid var(--line);