Skip to content

Commit 84ad0d5

Browse files
committed
style: 优化用户管理搜索栏样式
1 parent 1382346 commit 84ad0d5

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/components/GiForm/src/GiForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
</a-col>
191191
</template>
192192
<a-col v-if="!options.btns?.hide" :span="options.btns?.span || 12" v-bind="options.btns?.col">
193-
<a-space wrap :size="[8, 16]">
193+
<a-space wrap :size="[8, 16]" style="flex-wrap: nowrap">
194194
<slot name="suffix">
195195
<a-button type="primary" @click="emit('search')">
196196
<template #icon><icon-search /></template>

src/views/system/user/index.vue

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ import UserResetPwdModal from './UserResetPwdModal.vue'
101101
import { type UserQuery, type UserResp, deleteUser, exportUser, listUser } from '@/apis/system'
102102
import type { Columns, Options } from '@/components/GiForm'
103103
import type { TableInstanceColumns } from '@/components/GiTable/type'
104-
import { useBreakpointIndex, useDownload, useTable } from '@/hooks'
104+
import { useDownload, useTable } from '@/hooks'
105105
import { isMobile } from '@/utils'
106106
import getAvatar from '@/utils/avatar'
107107
import has from '@/utils/has'
@@ -122,14 +122,9 @@ const {
122122
123123
const options: Options = reactive({
124124
form: { layout: 'inline' },
125-
col: { xs: 24, sm: 24, md: 5, lg: 5, xl: 5, xxl: 5 },
126-
btns: { col: { xs: 24, sm: 24, md: 7, lg: 7, xl: 7, xxl: 7 } },
127-
fold: { enable: true, index: 2, defaultCollapsed: true }
128-
})
129-
130-
useBreakpointIndex((index) => {
131-
// 自适应折叠,让折叠后始终一行显示
132-
options.fold && (options.fold.index = index)
125+
col: { xs: 24, sm: 24, md: 5, lg: 4, xl: 4, xxl: 4 },
126+
btns: { col: { xs: 24, sm: 24, md: 7, lg: 8, xl: 6, xxl: 6 } },
127+
fold: { enable: true, index: 1, defaultCollapsed: true }
133128
})
134129
135130
const queryFormColumns: Columns = reactive([
@@ -140,7 +135,7 @@ const queryFormColumns: Columns = reactive([
140135
hideLabel: true
141136
},
142137
props: {
143-
placeholder: '请输入用户名/昵称/描述',
138+
placeholder: '用户名/昵称/描述',
144139
allowClear: true
145140
}
146141
},
@@ -162,7 +157,7 @@ const queryFormColumns: Columns = reactive([
162157
item: {
163158
hideLabel: true
164159
},
165-
col: { xs: 24, sm: 24, md: 10, lg: 10, xl: 10, xxl: 10 }
160+
col: { xs: 24, sm: 24, md: 10, lg: 9.5, xl: 9, xxl: 8 }
166161
}
167162
])
168163

0 commit comments

Comments
 (0)