webxc 1.0.25 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,8 @@
12
12
  * themes/butterfly/scripts/filters/perf.js 把 URL 挂到本标签的 data-swiper-*
13
13
  * 上,pjax 切回首页时在这里按需补下载。
14
14
  * 3) 容器上已有实例时先销毁再重建,避免 pjax 重复初始化。
15
+ * 4) 打开 fadeEffect.crossFade —— 原站配置下(fade + loop)旧幻灯片不会淡出,
16
+ * 切几次就叠成一片,这是之前「banner 偶尔糊掉」的真因,详见下方构造参数处的注释。
15
17
  */
16
18
  (function () {
17
19
  var self = document.currentScript
@@ -37,6 +39,11 @@
37
39
  passiveListeners: true,
38
40
  spaceBetween: 30,
39
41
  effect: 'fade',
42
+ // 不加 crossFade 的话,Swiper 5.4.5 在 loop + fade 下只给新幻灯片加透明度,
43
+ // 老幻灯片永远停在不透明状态:切 3 次就有 4 张叠在一起,标题糊成一团。
44
+ // 实测(computed opacity):旧幻灯片 1.00 保持不动,新幻灯片 0→1 淡入;
45
+ // 加上之后才是真正的交叉淡入淡出(1.00 → 0.89 → 0.33 → 0.05 → 0)。
46
+ fadeEffect: { crossFade: true },
40
47
  loop: true,
41
48
  autoplay: {
42
49
  disableOnInteraction: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webxc",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "webxc static assets",
5
5
  "main": "index.js",
6
6
  "scripts": {