改进下拉

This commit is contained in:
田岩
2025-09-17 09:42:05 +08:00
parent badfc55df7
commit 6411ea98ff
18 changed files with 493 additions and 831 deletions
@@ -1,4 +1,3 @@
<!-- 在这个文件对每个tab对应的列表进行渲染 -->
<template>
<z-paging
ref="pagingRef"
@@ -46,10 +45,7 @@
}
}
});
console.log('aaa', props.state);
const updateData = (item) => {
console.log('未完成专属逻辑,如果未完成列表出现了已完成状态,就重新加载未完成列表', props.tabIndex, item.isFinish);
// 未完成专属逻辑,如果未完成列表出现了已完成状态,就重新加载未完成列表
if(props.tabIndex !== 0 && item.isFinish === '02') {
reload()
} else{
+1 -24
View File
@@ -1,4 +1,3 @@
<!-- 滑动切换选项卡演示(标准写法) -->
<template>
<z-paging-swiper>
<template #top>
@@ -68,23 +67,9 @@
listItemRefs.value[1]?.updateData(res);
listItemRefs.value[2]?.updateData(res);
});
// 完成任务后更新列表单条信息
// uni.$on('refresh_tasks_data', (res) => {
// listItemRefs.value[0]?.updateData(res);
// listItemRefs.value[1]?.clear();
// listItemRefs.value[2]?.clear();
// listItemRefs.value[tabAct.value]?.getData('first');
// if (tabAct.value === 0) {
// courseRef.value?.updateData(res);
// } else if (tabAct.value === 1) {
// taskRef.value?.updateData(res);
// }
// });
});
onUnload(() => {
uni.$off('update_tasks_item');
// uni.$off('refresh_tasks_data');
});
</script>
@@ -100,7 +85,7 @@
background-repeat: no-repeat !important;
}
}
.swiper {
height: 100%;
}
@@ -191,13 +176,5 @@
.scroll_div {
background-color: #f1f5fa;
padding: 22rpx;
// height: calc(100vh - var(--status-bar-height) - 88rpx - 80rpx - 88rpx - 20rpx - 30rpx);
.scroll_item_div {
background-color: #fff;
border-radius: 16rpx;
padding: 0 12rpx 0 22rpx;
box-sizing: border-box;
}
}
</style>