fix: gap separately controls column-gap and row-gap ineffective

pull/7847/head
ZhouWei 2024-09-19 16:45:11 +08:00
parent 49d4b3166e
commit 3ec87678c7
1 changed files with 6 additions and 1 deletions

View File

@ -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(