修改轮播数据分装时的显示

master
于肖磊 2025-09-26 13:52:35 +08:00
parent 9b88f11501
commit ae4174158d
1 changed files with 3 additions and 0 deletions

View File

@ -675,6 +675,9 @@ export const location_compute = (size, location, container_size) => {
* @returns {Array} - 返回一个处理后的列表每个元素包含一个split_list属性该属性是一个数组包含当前页的轮播项
*/
export const get_swiper_list = (list, num, rolling_fashion, judgment = true) => {
if (list.length <= 0) {
return list;
}
// 深拷贝一下,确保不会出现问题
const cloneList = JSON.parse(JSON.stringify(list));
// 判断滑动方式如果不是翻译滑动并且judgment为true时按照分页滑动处理