- 发布:2022-06-08 15:00
- 更新:2022-06-13 11:33
- 阅读:1050
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 未知
HBuilderX类型: 正式
HBuilderX版本号: 3.4.14
手机系统: 全部
手机系统版本号: Android 12
手机厂商: 小米
页面类型: vue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
测试过的手机:
示例代码:
.content {
padding: 0 32rpx;
text-align: left;
display: inline-block;
word-wrap: break-word;
word-break: break-all;
white-space: normal;
.topcss{
background: blue;
width: 100%;
display: flex;
align-items: flex-end;
justify-content: space-between;
.title {
background: red;
width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 52rpx;
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 52rpx;
}
.time {
background: green;
height: 52rpx;
width: calc(100% - 200rpx);
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 22rpx;
color: #AAAAAA;
}
}
.item {
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 52rpx;
font-size: 28rpx;
color: #333333;
line-height: 52rpx;
}
}
.content {
padding: 0 32rpx;
text-align: left;
display: inline-block;
word-wrap: break-word;
word-break: break-all;
white-space: normal;
.topcss{
background: blue;
width: 100%;
display: flex;
align-items: flex-end;
justify-content: space-between;
.title {
background: red;
width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 52rpx;
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 52rpx;
}
.time {
background: green;
height: 52rpx;
width: calc(100% - 200rpx);
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 22rpx;
color: #AAAAAA;
}
}
.item {
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 52rpx;
font-size: 28rpx;
color: #333333;
line-height: 52rpx;
}
}
操作步骤:
.content {
padding: 0 32rpx;
text-align: left;
display: inline-block;
word-wrap: break-word;
word-break: break-all;
white-space: normal;
.topcss{
background: blue;
width: 100%;
display: flex;
align-items: flex-end;
justify-content: space-between;
.title {
background: red;
width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 52rpx;
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 52rpx;
}
.time {
background: green;
height: 52rpx;
width: calc(100% - 200rpx);
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 22rpx;
color: #AAAAAA;
}
}
.item {
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 52rpx;
font-size: 28rpx;
color: #333333;
line-height: 52rpx;
}
}
.content {
padding: 0 32rpx;
text-align: left;
display: inline-block;
word-wrap: break-word;
word-break: break-all;
white-space: normal;
.topcss{
background: blue;
width: 100%;
display: flex;
align-items: flex-end;
justify-content: space-between;
.title {
background: red;
width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 52rpx;
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 52rpx;
}
.time {
background: green;
height: 52rpx;
width: calc(100% - 200rpx);
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 22rpx;
color: #AAAAAA;
}
}
.item {
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 52rpx;
font-size: 28rpx;
color: #333333;
line-height: 52rpx;
}
}
预期结果:
红色和绿色在同一行
红色和绿色在同一行
实际结果:
红色盒子和绿色盒子换行
红色盒子和绿色盒子换行
bug描述:
Hbuilder更新到3.4.14版本后页面的flex布局部分失效 页面样式错乱
应该下面这个样式搞的,flex布局得设置direction为row,flex-shrink也得重新设值
···
uni-view[data-v-4a02ae53], uni-scroll-view[data-v-4a02ae53], uni-swiper-item[data-v-4a02ae53] {
display: flex;
flex-direction: column;
flex-shrink: 0;
flex-grow: 0;
flex-basis: auto;
align-items: stretch;
align-content: flex-start;
}
···