From 3ec87678c76206e81b5e3a93468df517d7532766 Mon Sep 17 00:00:00 2001 From: ZhouWei <1244620067@qq.com> Date: Thu, 19 Sep 2024 16:45:11 +0800 Subject: [PATCH] fix: gap separately controls column-gap and row-gap ineffective --- components/flex/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/flex/index.tsx b/components/flex/index.tsx index 68f540da4..12847d5df 100644 --- a/components/flex/index.tsx +++ b/components/flex/index.tsx @@ -9,6 +9,7 @@ import { withInstall } from '../_util/type'; import type { FlexProps } from './interface'; import { flexProps } from './interface'; import createFlexClassNames from './utils'; +import { isNumber } from '../_util/hooks/_vueuse/is'; const AFlex = defineComponent({ name: 'AFlex', @@ -38,7 +39,11 @@ const AFlex = defineComponent({ } if (gap && !isPresetSize(gap)) { - mergedStyle.gap = `${gap}px`; + if (isNumber(gap)) { + mergedStyle.gap = `${gap}px`; + } else { + mergedStyle.gap = gap; + } } return wrapSSR(