feat:【mall 商城】交易统计、商品统计【antd】15%:product-rank-card.vue 完善

This commit is contained in:
YunaiV
2025-10-19 22:14:49 +08:00
parent cb717a9d84
commit b5bc8d24b9
7 changed files with 156 additions and 250 deletions

View File

@@ -162,4 +162,21 @@ class RequestClient {
}
}
/**
* 构建排序字段,处理 vxe 排序条件
*
* add by 芋艿
*/
export const buildSortingField = (sorts: any[]) => {
if (!sorts || sorts.length === 0) {
return {};
}
const result: Record<string, any> = {};
sorts.forEach((sort: any, index: number) => {
result[`sortingFields[${index}].field`] = sort.field;
result[`sortingFields[${index}].order`] = sort.order;
});
return result;
};
export { RequestClient };