From 9ddaba53332145daaa5fb20fd8857133381e14b5 Mon Sep 17 00:00:00 2001 From: Vben Date: Wed, 13 Nov 2024 22:23:13 +0800 Subject: [PATCH] fix: correct grid styling issue (#4889) --- docs/.vitepress/config/en.mts | 8 ++++---- docs/.vitepress/config/zh.mts | 8 ++++---- .../plugins/src/vxe-table/{theme.css => style.css} | 4 +++- packages/effects/plugins/src/vxe-table/use-vxe-grid.vue | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) rename packages/effects/plugins/src/vxe-table/{theme.css => style.css} (97%) diff --git a/docs/.vitepress/config/en.mts b/docs/.vitepress/config/en.mts index b598bece..3f7dd4fa 100644 --- a/docs/.vitepress/config/en.mts +++ b/docs/.vitepress/config/en.mts @@ -221,9 +221,9 @@ function nav(): DefaultTheme.NavItem[] { link: '/commercial/community', text: '👨‍👦‍👦 Community', }, - { - link: '/friend-links/', - text: '🤝 Friend Links', - }, + // { + // link: '/friend-links/', + // text: '🤝 Friend Links', + // }, ]; } diff --git a/docs/.vitepress/config/zh.mts b/docs/.vitepress/config/zh.mts index 5c8505ab..fea3a3dd 100644 --- a/docs/.vitepress/config/zh.mts +++ b/docs/.vitepress/config/zh.mts @@ -282,10 +282,10 @@ function nav(): DefaultTheme.NavItem[] { // }, // ], }, - { - link: '/friend-links/', - text: '🤝 友情链接', - }, + // { + // link: '/friend-links/', + // text: '🤝 友情链接', + // }, ]; } diff --git a/packages/effects/plugins/src/vxe-table/theme.css b/packages/effects/plugins/src/vxe-table/style.css similarity index 97% rename from packages/effects/plugins/src/vxe-table/theme.css rename to packages/effects/plugins/src/vxe-table/style.css index 27b48420..2f8fa843 100644 --- a/packages/effects/plugins/src/vxe-table/theme.css +++ b/packages/effects/plugins/src/vxe-table/style.css @@ -81,7 +81,8 @@ } .vxe-tools--operate { - @apply ml-3; + margin-right: 0.25rem; + margin-left: 0.75rem; } .vxe-table-custom--checkbox-option:hover { @@ -93,6 +94,7 @@ } .vxe-buttons--wrapper:not(:empty), +.vxe-tools--operate:not(:empty), .vxe-tools--wrapper:not(:empty) { padding: 0.6em 0; } diff --git a/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue b/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue index d8347f70..feca4cb2 100644 --- a/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue +++ b/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue @@ -32,7 +32,7 @@ import { useTableForm } from './init'; import 'vxe-table/styles/cssvar.scss'; import 'vxe-pc-ui/styles/cssvar.scss'; -import './theme.css'; +import './style.css'; interface Props extends VxeGridProps { api: ExtendedVxeGridApi; @@ -270,7 +270,7 @@ onUnmounted(() => { ref="gridRef" :class=" cn( - 'p-2', + 'p-2 pt-0', { 'pt-0': showToolbar && !formOptions, },