修复bug
This commit is contained in:
@@ -27,8 +27,10 @@
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 确认按钮 -->
|
||||
<button class="confirm-btn" @click="confirmSelect">确认</button>
|
||||
<!-- 确认按钮(固定底部,不随内容滚动) -->
|
||||
<view class="confirm-bar">
|
||||
<button class="confirm-btn" @click="confirmSelect">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -55,7 +57,7 @@ const fetchHouseList = async () => {
|
||||
try {
|
||||
const res = await getHouseList({ pageNum: pageNum.value, pageSize: pageSize.value })
|
||||
if (res.code === 200) {
|
||||
const list = res.rows || []
|
||||
const list = res.data || []
|
||||
houseList.value = list
|
||||
// 仅当从表单页带入了房屋ID时,自动选中对应房屋;否则不默认选择
|
||||
if (preSelectedHouseId.value) {
|
||||
@@ -106,15 +108,12 @@ const confirmSelect = () => {
|
||||
padding: 15px;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.house-list {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 120rpx;
|
||||
}
|
||||
.house-item {
|
||||
display: flex;
|
||||
@@ -145,6 +144,17 @@ const confirmSelect = () => {
|
||||
color: #666;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.confirm-bar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 20rpx 30rpx;
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
background: #f9f9f9;
|
||||
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
@@ -153,8 +163,6 @@ const confirmSelect = () => {
|
||||
color: #fff;
|
||||
border-radius: 8px;
|
||||
font-size: 28rpx;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
/* 空状态 */
|
||||
.empty-state {
|
||||
|
||||
Reference in New Issue
Block a user