mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-23 23:19:19 +08:00
feat: 调整行号
This commit is contained in:
@@ -48,8 +48,9 @@ const gridOptions: VxeGridProps<any> = {
|
||||
},
|
||||
{
|
||||
title: 'Logo',
|
||||
width: 100,
|
||||
width: 120,
|
||||
align: 'center' as const,
|
||||
showOverflow: false,
|
||||
slots: { default: 'logo' },
|
||||
},
|
||||
{
|
||||
@@ -85,7 +86,11 @@ const gridOptions: VxeGridProps<any> = {
|
||||
height: 'auto',
|
||||
border: true,
|
||||
stripe: true,
|
||||
rowConfig: { isHover: true },
|
||||
// 行高需容纳店铺 Logo(与商品表一致)
|
||||
rowConfig: {
|
||||
isHover: true,
|
||||
height: 88,
|
||||
},
|
||||
showOverflow: true,
|
||||
size: 'small',
|
||||
toolbarConfig: {
|
||||
@@ -236,7 +241,7 @@ function handleViewOverview(record: ShopVO.Info) {
|
||||
<template>
|
||||
<Page auto-content-height>
|
||||
<!-- VbenVxeGrid 表格 -->
|
||||
<Grid :loading="loading">
|
||||
<Grid :loading="loading" class="shop-grid">
|
||||
<!-- 工具栏工具 -->
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
@@ -247,28 +252,21 @@ function handleViewOverview(record: ShopVO.Info) {
|
||||
</Space>
|
||||
</template>
|
||||
|
||||
<!-- Logo列 -->
|
||||
<template #logo="{ row }: { row: any }">
|
||||
<div
|
||||
v-if="row.logo"
|
||||
style="display: flex; justify-content: center; align-items: center"
|
||||
>
|
||||
<!-- Logo 列:64px 图标,需配合更高行高 -->
|
||||
<template #logo="{ row }: { row: ShopVO.Info }">
|
||||
<div class="shop-logo-cell flex items-center justify-center">
|
||||
<img
|
||||
v-if="row.logo"
|
||||
:src="row.logo"
|
||||
:alt="row.name"
|
||||
style="
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
object-fit: cover;
|
||||
border-radius: 4px;
|
||||
"
|
||||
class="h-16 w-16 rounded-md border border-slate-200 object-cover dark:border-[hsl(240deg_3.7%_22%)]"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
style="display: flex; justify-content: center; align-items: center"
|
||||
>
|
||||
<span style="color: #999">暂无Logo</span>
|
||||
<span
|
||||
v-else
|
||||
class="flex h-16 w-16 items-center justify-center rounded-md border border-dashed border-slate-200 text-xs text-slate-400 dark:border-[hsl(240deg_3.7%_22%)] dark:text-[hsl(240deg_5%_64.9%)]"
|
||||
>
|
||||
暂无
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -306,3 +304,14 @@ function handleViewOverview(record: ShopVO.Info) {
|
||||
<ShopFormModal ref="shopFormModalRef" @success="handleModalSuccess" />
|
||||
</Page>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* 店铺表行高与 Logo 垂直居中 */
|
||||
:deep(.shop-grid .vxe-body--column) {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.shop-logo-cell {
|
||||
min-height: 64px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -121,6 +121,7 @@ const gridOptions: VxeGridProps<any> = {
|
||||
rowConfig: {
|
||||
isHover: true,
|
||||
drag: true, // 启用行拖拽
|
||||
height: 52,
|
||||
},
|
||||
showOverflow: true,
|
||||
size: 'small',
|
||||
@@ -367,7 +368,7 @@ onMounted(() => {
|
||||
<template>
|
||||
<Page title="菜单管理" auto-content-height>
|
||||
<!-- VbenVxeGrid 表格 -->
|
||||
<Grid ref="gridRef" :loading="loading">
|
||||
<Grid ref="gridRef" :loading="loading" class="menu-grid">
|
||||
<!-- 工具栏工具 -->
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
@@ -463,3 +464,9 @@ onMounted(() => {
|
||||
<MenuFormModal ref="menuFormModalRef" @success="handleModalSuccess" />
|
||||
</Page>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
:deep(.menu-grid .vxe-body--column) {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -105,6 +105,7 @@ const gridOptions: VxeGridProps<any> = {
|
||||
rowConfig: {
|
||||
isHover: true,
|
||||
drag: true,
|
||||
height: 52,
|
||||
},
|
||||
rowDragConfig: {
|
||||
isPeerDrag: false,
|
||||
@@ -236,7 +237,7 @@ const getTypeColor = (type: string) => {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<Grid>
|
||||
<Grid class="permission-grid">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<Button type="primary" @click="handleAdd">
|
||||
@@ -278,3 +279,9 @@ const getTypeColor = (type: string) => {
|
||||
/>
|
||||
</Page>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
:deep(.permission-grid .vxe-body--column) {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user