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