fix: 客户人员编辑表单组件

style: 对page.json代码缩进对齐
This commit is contained in:
wangzhuo
2025-08-18 21:43:28 +08:00
parent f9474ac01d
commit df29941de5
3 changed files with 1196 additions and 459 deletions

View File

@@ -145,10 +145,12 @@ const mescrollInit = (mescroll) => {
const downCallback = async (mescroll) => {
try {
setTimeout(async () => {
const res = await getList(1, upOption.value.page.size);
// 重置页码为第一页
const res = await getList(1, mescroll.size || upOption.page.size);
cssFlag.value = false;
list.value = res.list;
mescroll.endSuccess(res.list.length, res.total >= upOption.value.page.size);
// 正确传递 total 参数
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
}, 500);
} catch (error) {
console.log(error)
@@ -159,13 +161,15 @@ const downCallback = async (mescroll) => {
const upCallback = async (mescroll) => {
try {
setTimeout(async () => {
// 使用 mescroll 提供的页码和大小参数
const res = await getList(mescroll.num, mescroll.size);
if (mescroll.num === 1) {
list.value = res.list;
} else {
list.value.push(...res.list);
}
mescroll.endSuccess(res.list.length, res.total >= mescroll.size);
// 正确判断是否还有更多数据
mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
}, 500);
} catch (error) {
console.log(error)
@@ -188,7 +192,6 @@ const getList = (pageIndex, pageSize) => {
total: res.total
});
});
}
// 跳转到详情
@@ -298,20 +301,28 @@ let handleDelete = async (item)=>{
.white-bg {
padding-bottom: 10rpx;
.w-b-title{
align-items: flex-start;
}
}
.btn-edit{
white-space: nowrap;
&.wancheng-deal {
background: #00aa7f;
border:solid 1rpx #00aa7f;
background-color: #00aa7f;
}
&.daishenhe-un-deal {
background: #ffaa7f;
border:solid 1rpx #ffaa7f;
background-color: #ffaa7f;
}
&.chaoqi-deal {
background: #ff0000;
border:1rpx solid #ff0000;
background-color: #ff0000;
}
&.tijiao-deal {
background: #00aaff;
border:1rpx solid #00aaff;
background-color: #00aaff;
}
}
</style>