feat(1.4.0-beta2): 搜索框新增折叠功能

This commit is contained in:
xlsea 2025-03-03 13:34:01 +08:00
parent 7c19fb8769
commit 855d8f22e2
3 changed files with 32 additions and 24 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "snail-job", "name": "snail-job",
"type": "module", "type": "module",
"version": "1.3.0-beta1", "version": "1.4.0-beta2",
"description": "A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling.", "description": "A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling.",
"license": "Apache-2.0", "license": "Apache-2.0",
"homepage": "https://gitee.com/aizuda/snail-job", "homepage": "https://gitee.com/aizuda/snail-job",

View File

@ -60,6 +60,8 @@ onMounted(() => {
<template> <template>
<NCard :title="title" :bordered="false" size="small" class="card-wrapper"> <NCard :title="title" :bordered="false" size="small" class="card-wrapper">
<NCollapse :default-expanded-names="String(route.name)">
<NCollapseItem :title="$t('common.search')" :name="String(route.name)">
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80" :show-feedback="appStore.isMobile"> <NForm ref="formRef" :model="model" label-placement="left" :label-width="80" :show-feedback="appStore.isMobile">
<NGrid responsive="screen" cols="24" item-responsive :y-gap="12"> <NGrid responsive="screen" cols="24" item-responsive :y-gap="12">
<slot></slot> <slot></slot>
@ -81,7 +83,13 @@ onMounted(() => {
</NFormItemGi> </NFormItemGi>
</NGrid> </NGrid>
</NForm> </NForm>
</NCollapseItem>
</NCollapse>
</NCard> </NCard>
</template> </template>
<style scoped></style> <style scoped>
:deep(.n-collapse-item__content-inner) {
padding-top: 12px !important;
}
</style>

View File

@ -27,7 +27,7 @@ const { bool: detailVisible, setTrue: openDetail } = useBoolean(false);
const { bool: detailLog, setBool: setDetailLog } = useBoolean(false); const { bool: detailLog, setBool: setDetailLog } = useBoolean(false);
const jobName = history.state.jobName; const jobName = history.state.jobName;
const jobId = history.state.jobId; const jobId = history.state.jobId;
const taskBatchStatus = [history.state.taskBatchStatus]; const taskBatchStatus = history.state.taskBatchStatus ? [history.state.taskBatchStatus] : [];
const { columnChecks, columns, data, getData, loading, mobilePagination, searchParams, resetSearchParams } = useTable({ const { columnChecks, columns, data, getData, loading, mobilePagination, searchParams, resetSearchParams } = useTable({
apiFn: fetchGetJobBatchList, apiFn: fetchGetJobBatchList,