Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`<Cell /> render align 1`] = `
内容
</taro-view-core>
<taro-view-core
class="van-icon van-icon-arrow taroify-icon taroify-icon--inherit taroify-cell__right-icon"
class="van-icon van-icon-arrow taroify-icon taroify-cell__right-icon"
/>
</taro-view-core>
</div>
Expand All @@ -33,7 +33,7 @@ exports[`<Cell /> render icon 1`] = `
class="taroify-cell"
>
<taro-view-core
class="van-icon van-icon-location-o taroify-icon taroify-icon--inherit taroify-cell__icon"
class="van-icon van-icon-location-o taroify-icon taroify-cell__icon"
/>
<taro-view-core
class="taroify-cell__title"
Expand Down Expand Up @@ -70,7 +70,7 @@ exports[`<Cell /> render isLink and arrowDirection 1`] = `
内容
</taro-view-core>
<taro-view-core
class="van-icon van-icon-arrow-down taroify-icon taroify-icon--inherit taroify-cell__right-icon"
class="van-icon van-icon-arrow-down taroify-icon taroify-cell__right-icon"
/>
</taro-view-core>
</div>
Expand Down
8 changes: 6 additions & 2 deletions packages/core/src/cell/cell-value.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<View
className={classNames(
prefixClassname("cell__value"),
{
[prefixClassname("cell__value--alone")]: alone,
[prefixClassname("cell__value--empty")]: empty,
},
className,
valueClass,
)}
{...restProps}
/>
>
{children}
</View>
)
}

Expand Down
6 changes: 5 additions & 1 deletion packages/core/src/cell/cell.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ exports[`<FloatingPanel /> should drag adsorption effect when anchors props is [
/>
</taro-view-core>
<taro-scroll-view-core
bounces="false"
class="taroify-floating-panel__content"
enhanced="true"
scroll-y="true"
>
内容
Expand All @@ -42,7 +44,9 @@ exports[`<FloatingPanel /> should minHeight 100 and maxHeight 0.6 innerHeight wh
/>
</taro-view-core>
<taro-scroll-view-core
bounces="false"
class="taroify-floating-panel__content"
enhanced="true"
scroll-y="true"
>
内容
Expand Down