ui: 默认展开内容折叠区
This commit is contained in:
1 parent
b9db84c261
commit
8e8fab307f
19 files changed
+90
-126
No files matched your search
@@ -3,7 +3,7 @@ import { computed, ref, watch } from 'vue'
|
||||
import { NAlert, NButton, NCollapse, NCollapseItem, NInput, NSelect, NTab, NTabs } from 'naive-ui'
|
||||
import { Download, RefreshCw, Search } from '@lucide/vue'
|
||||
import { AppDialog, EmptyState } from '../../components/ui'
|
||||
import { useQuery } from '../../composables/useQuery'
|
||||
import { usePolling } from '../../composables/usePolling'
|
||||
import { downloadText, formatDate, nodeLabel } from '../../lib/format'
|
||||
import { loadWorkflowDiagnostics } from './diagnostics'
|
||||
import type { Checkpoint } from './types'
|
||||
@@ -13,7 +13,7 @@ const props = defineProps<{ projectId: string; checkpoints: Checkpoint[] }>()
|
||||
const open = defineModel<boolean>('open', { default: false })
|
||||
const key = computed(() => (open.value ? props.projectId : ''))
|
||||
/** 诊断弹窗已有刷新按钮,打开后只读取一次。 */
|
||||
const query = useQuery(key, (id, signal) => (id ? loadWorkflowDiagnostics(id, signal) : Promise.resolve(null)))
|
||||
const query = usePolling(key, (id, signal) => (id ? loadWorkflowDiagnostics(id, signal) : Promise.resolve(null)), false)
|
||||
const tab = ref('timeline')
|
||||
const workflow = ref('all')
|
||||
const search = ref('')
|
||||
@@ -136,7 +136,7 @@ function exportReport() {
|
||||
<p class="mt-2 break-all font-mono text-[11px] text-muted">{{ node.checkpointId }}</p>
|
||||
</article>
|
||||
</div>
|
||||
<NCollapse v-else class="mt-4"
|
||||
<NCollapse v-else class="mt-4" :default-expanded-names="groups.map(group => group.phase)"
|
||||
><NCollapseItem
|
||||
v-for="group in groups"
|
||||
:key="group.phase"
|
||||
|
||||
Reference in new issue
Block a user