fix: space style error when not support flex
parent
a1ffe2ae90
commit
e64fb33905
|
@ -68,7 +68,7 @@ const Space = defineComponent({
|
||||||
);
|
);
|
||||||
const style = computed(() => {
|
const style = computed(() => {
|
||||||
const gapStyle: CSSProperties = {};
|
const gapStyle: CSSProperties = {};
|
||||||
if (supportFlexGap) {
|
if (supportFlexGap.value) {
|
||||||
gapStyle.columnGap = `${horizontalSize.value}px`;
|
gapStyle.columnGap = `${horizontalSize.value}px`;
|
||||||
gapStyle.rowGap = `${verticalSize.value}px`;
|
gapStyle.rowGap = `${verticalSize.value}px`;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ const Space = defineComponent({
|
||||||
<div class={cn.value} style={style.value}>
|
<div class={cn.value} style={style.value}>
|
||||||
{items.map((child, index) => {
|
{items.map((child, index) => {
|
||||||
let itemStyle: CSSProperties = {};
|
let itemStyle: CSSProperties = {};
|
||||||
if (!supportFlexGap) {
|
if (!supportFlexGap.value) {
|
||||||
if (direction === 'vertical') {
|
if (direction === 'vertical') {
|
||||||
if (index < latestIndex) {
|
if (index < latestIndex) {
|
||||||
itemStyle = { marginBottom: `${horizontalSizeVal / (split ? 2 : 1)}px` };
|
itemStyle = { marginBottom: `${horizontalSizeVal / (split ? 2 : 1)}px` };
|
||||||
|
|
Loading…
Reference in New Issue