From ae4174158d8a08ba71bb0b139935739a1a339291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Fri, 26 Sep 2025 13:52:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=AE=E6=92=AD=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=88=86=E8=A3=85=E6=97=B6=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/common/common.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/js/common/common.js b/common/js/common/common.js index 9692e6b6..2f620483 100644 --- a/common/js/common/common.js +++ b/common/js/common/common.js @@ -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时,按照分页滑动处理