fix: 添加 jQuery easing 函数备用定义

- 添加 easeOutCirc 和 easeOutExpo 备用实现
- 防止其他插件加载的 jQuery 覆盖 argon_js_merged 中的 easing 插件
- 解决 'n.easing[this.easing] is not a function' 错误
This commit is contained in:
2026-01-16 21:08:49 +08:00
parent 8f3f80d2df
commit cdf343f4b4

View File

@@ -30,6 +30,21 @@ if (typeof window.Zoomify === 'undefined') {
// 确保 jQuery 插件存在
if (typeof jQuery !== 'undefined') {
(function($) {
// 确保 easing 函数存在(防止其他插件覆盖 jQuery 后丢失)
if (typeof $.easing === 'undefined') {
$.easing = {};
}
if (typeof $.easing.easeOutCirc === 'undefined') {
$.easing.easeOutCirc = function(x) {
return Math.sqrt(1 - Math.pow(x - 1, 2));
};
}
if (typeof $.easing.easeOutExpo === 'undefined') {
$.easing.easeOutExpo = function(x) {
return x === 1 ? 1 : 1 - Math.pow(2, -10 * x);
};
}
// 确保 zoomify 插件存在
if (typeof $.fn.zoomify === 'undefined') {
$.fn.zoomify = function() { return this; };