feat: 优化搜索表单

This commit is contained in:
2026-08-20 00:25:43 +08:00
parent 0ddaf55820
commit 8e4a526e9a
10 changed files with 14 additions and 19 deletions
@@ -260,6 +260,8 @@ const formOptions = computed(() => ({
}; };
gridReloadRef.value?.(); gridReloadRef.value?.();
}, },
collapsed: true,
collapsedRows: 1,
})); }));
const [Grid, gridApi] = useVbenVxeGrid({ const [Grid, gridApi] = useVbenVxeGrid({
@@ -356,8 +356,8 @@ const formOptions = computed(() => ({
}, },
], ],
showDefaultActions: true, showDefaultActions: true,
collapsed: false, collapsed: true,
collapsedRows: 2, collapsedRows: 1,
})); }));
const [Grid, gridApi] = useVbenVxeGrid({ const [Grid, gridApi] = useVbenVxeGrid({
@@ -201,6 +201,8 @@ const formOptions = computed(() => ({
searchForm.value = { mallName: '', merchantType: undefined }; searchForm.value = { mallName: '', merchantType: undefined };
gridReloadRef.value?.(); gridReloadRef.value?.();
}, },
collapsed: true,
collapsedRows: 1,
})); }));
const [Grid, gridApi] = useVbenVxeGrid({ const [Grid, gridApi] = useVbenVxeGrid({
@@ -261,7 +261,8 @@ const formOptions = computed(() => ({
}, },
], ],
showDefaultActions: true, showDefaultActions: true,
collapsed: false, collapsed: true,
collapsedRows: 1,
submitOnEnter: true, submitOnEnter: true,
})); }));
@@ -24,7 +24,7 @@ import {
getSystemFingerprintApi, getSystemFingerprintApi,
} from '#/api/sys/license'; } from '#/api/sys/license';
import FingerprintDisplay from './FingerprintDisplay.vue'; import FingerprintDisplay from './components/FingerprintDisplay.vue';
defineOptions({ name: 'SystemLicensePage' }); defineOptions({ name: 'SystemLicensePage' });
@@ -109,7 +109,7 @@ onMounted(() => {
</script> </script>
<template> <template>
<Page title="授权管理" description="查看机器指纹,激活或更新 License"> <Page auto-content-height>
<div class="grid gap-4 lg:grid-cols-2"> <div class="grid gap-4 lg:grid-cols-2">
<Card title="机器指纹" :loading="fingerprintLoading"> <Card title="机器指纹" :loading="fingerprintLoading">
<FingerprintDisplay <FingerprintDisplay
@@ -417,7 +417,7 @@ function getMenuTypeColor(type: string) {
const [Grid, gridApi] = useVbenVxeGrid({ const [Grid, gridApi] = useVbenVxeGrid({
gridOptions, gridOptions,
showSearchForm: false, showSearchForm: false,
tableTitle: '菜单管理', tableTitle: '系统菜单',
gridEvents: { gridEvents: {
rowDragend: handleDragSort, rowDragend: handleDragSort,
cellMenu: onCellMenu, cellMenu: onCellMenu,
@@ -426,7 +426,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
</script> </script>
<template> <template>
<Page title="菜单管理" auto-content-height> <Page auto-content-height>
<!-- VbenVxeGrid 表格 --> <!-- VbenVxeGrid 表格 -->
<Grid :loading="loading" class="menu-grid"> <Grid :loading="loading" class="menu-grid">
<!-- 工具栏工具 --> <!-- 工具栏工具 -->
@@ -444,10 +444,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
<CollapseIcon /> <CollapseIcon />
全部收起 全部收起
</Button> </Button>
<div class="text-sm text-gray-500">
支持跨父级拖拽(按住 Ctrl
可拖成目标子节点);右键行可编辑 / 增下级 / 删除
</div>
</Space> </Space>
</template> </template>
@@ -348,6 +348,7 @@ function handleCtxMenuSelect(key: string) {
const [Grid, gridApi] = useVbenVxeGrid({ const [Grid, gridApi] = useVbenVxeGrid({
gridOptions, gridOptions,
tableTitle: '系统权限',
gridEvents: { gridEvents: {
rowDragend: handleDragSort, rowDragend: handleDragSort,
cellMenu: onCellMenu, cellMenu: onCellMenu,
@@ -382,14 +383,7 @@ const getTypeColor = (type: string) => {
</script> </script>
<template> <template>
<Page title="系统权限" auto-content-height> <Page auto-content-height>
<template #description>
<div class="text-foreground/80 mt-2">
支持跨父级拖拽(按住 Ctrl 可拖成目标子节点);右键行可增加下级 /
编辑 / 删除
</div>
</template>
<Grid class="permission-grid"> <Grid class="permission-grid">
<template #toolbar-tools> <template #toolbar-tools>
<Space> <Space>