jd-opensource / jd-opensource/taro-ui
Flex 弹性布局H5和小程序端显示不一致
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
H5端显示效果如下:

小程序端显示效果如下:

jsx文件如下:
```
render () {
return (
国民老式纯棉床单单件双人单人全棉老上海加厚老粗布怀旧被单单件
标签
标签
¥33.5
);
}
```
scss文件如下:
```
.goods-item {
height: 250px;
margin-bottom: 10px;
.goods-cover {
height: 100%;
}
.goods-info {
display: flex;
flex-direction: row;
flex-wrap: wrap;
padding-left: 20px;
height: 100%;
.goods-title {
width: 100%;
height: 85px;
line-height: 43px;
white-space: pre-line;
word-wrap: break-word;
overflow: hidden;
word-break: break-all;
}
.goods-tags {
width: 100%;
padding: 10px 0;
.at-tag {
margin: 0 10px;
}
}
.goods-price {
display: flex;
flex-wrap: nowrap;
align-items: flex-end;
width: 100%;
line-height: 40px;
color: #e22d24;
.mark {
font-size: 24px;
}
.num {
font-size: 36px;
}
}
.line {
width: 100%;
border-bottom: 1px solid #f4f4f4;
}
}
}
```
新手刚接触,请大佬们指点一二,万分感谢
Contributor guide
Assessment
This issue has not been assessed yet.