diff --git a/packages/core/src/cell/__tests__/__snapshots__/cell.test.tsx.snap b/packages/core/src/cell/__tests__/__snapshots__/cell.test.tsx.snap
index c9812c19..f21653a2 100644
--- a/packages/core/src/cell/__tests__/__snapshots__/cell.test.tsx.snap
+++ b/packages/core/src/cell/__tests__/__snapshots__/cell.test.tsx.snap
@@ -21,7 +21,7 @@ exports[` | render align 1`] = `
内容
@@ -33,7 +33,7 @@ exports[` | render icon 1`] = `
class="taroify-cell"
>
render isLink and arrowDirection 1`] = `
内容
diff --git a/packages/core/src/cell/cell-value.tsx b/packages/core/src/cell/cell-value.tsx
index e30cef23..61492eb0 100644
--- a/packages/core/src/cell/cell-value.tsx
+++ b/packages/core/src/cell/cell-value.tsx
@@ -12,19 +12,23 @@ interface CellValueProps extends ViewProps {
}
function CellValue(props: CellValueProps) {
- const { className, alone, valueClass, ...restProps } = props
+ const { className, alone, valueClass, children, ...restProps } = props
+ const empty = React.Children.count(children) === 0
return (
+ >
+ {children}
+
)
}
diff --git a/packages/core/src/cell/cell.scss b/packages/core/src/cell/cell.scss
index 33388caa..710a0670 100644
--- a/packages/core/src/cell/cell.scss
+++ b/packages/core/src/cell/cell.scss
@@ -76,10 +76,14 @@
}
&__value {
- flex: 0 0 auto;
+ flex: 1;
color: $cell-value-color;
text-align: right;
+ &--empty {
+ flex: 0 0 auto;
+ }
+
&--alone {
color: $text-color;
text-align: left;
diff --git a/packages/core/src/floating-panel/__tests__/__snapshots__/floating-panel.test.tsx.snap b/packages/core/src/floating-panel/__tests__/__snapshots__/floating-panel.test.tsx.snap
index bcd67b6f..7ab26485 100644
--- a/packages/core/src/floating-panel/__tests__/__snapshots__/floating-panel.test.tsx.snap
+++ b/packages/core/src/floating-panel/__tests__/__snapshots__/floating-panel.test.tsx.snap
@@ -15,7 +15,9 @@ exports[` should drag adsorption effect when anchors props is [
/>
内容
@@ -42,7 +44,9 @@ exports[` should minHeight 100 and maxHeight 0.6 innerHeight wh
/>
内容