From 4fbc74e7e0ca97ddcb93fc4f5e4826283bb92647 Mon Sep 17 00:00:00 2001
From: DarkFlameMaster <1004452714@qq.com>
Date: Thu, 7 May 2026 14:30:51 +0800
Subject: [PATCH] =?UTF-8?q?feat(BvLocator):=20=E4=B8=BA=20JavaScript=20?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=A8=E6=80=81=E5=8F=82=E6=95=B0=E9=87=8D?=
=?UTF-8?q?=E8=BD=BD=E6=96=B9=E6=B3=95=20(#3106)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BetterGenshinImpact/Core/BgiVision/BvLocator.cs | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/BetterGenshinImpact/Core/BgiVision/BvLocator.cs b/BetterGenshinImpact/Core/BgiVision/BvLocator.cs
index f23e8037..abedab3c 100644
--- a/BetterGenshinImpact/Core/BgiVision/BvLocator.cs
+++ b/BetterGenshinImpact/Core/BgiVision/BvLocator.cs
@@ -208,4 +208,16 @@ public class BvLocator
RetryAction = action;
return this;
}
+
+ ///
+ /// 为 JavaScript 提供的动态参数重载
+ /// 解决 ClearScript 无法将 JS 函数隐式转换为 Action 委托的问题
+ ///
+ /// JS 回调函数
+ ///
+ public BvLocator WithRetryAction(dynamic action)
+ {
+ RetryAction = (results) => action(results);
+ return this;
+ }
}
\ No newline at end of file