Merge branch 'main' of http://43.140.215.244:7040/wangyukun/PRA-only-demo
This commit is contained in:
commit
8176bf7c75
3 files changed
+6
-30
No files matched your search
@@ -212,8 +212,8 @@ register("Image_Screenshot", async (ctx, node, args) => {
|
||||
if (range === "2") {
|
||||
const regionRaw = text(args, ["position", "action", "position_img"]);
|
||||
if (!regionRaw.trim()) {
|
||||
throw new RuntimeError("validation_error", "截图范围为「框选区域」时,position 需填写区域 JSON", {
|
||||
recommendation: '在 position 填写 {"x":0,"y":0,"width":100,"height":80} 或 [x, y, width, height],或将截图范围改回「整个屏幕」'
|
||||
throw new RuntimeError("validation_error", "截图范围为「框选区域」时,截图区域需填写区域 JSON", {
|
||||
recommendation: '在「截图区域」点屏幕框选,或填写 {"x":0,"y":0,"width":100,"height":80},或将截图范围改回「整个屏幕」'
|
||||
});
|
||||
}
|
||||
if (screenOrigin) {
|
||||
|
||||
@@ -29,6 +29,8 @@ export function fieldIsActive(componentId: string, key: string, values: Record<s
|
||||
}
|
||||
}
|
||||
if (componentId === "System_ScreenSaverShowV1" && key === "password") return truthy(values.set_password);
|
||||
// Image_Screenshot: 区域坐标仅截图范围为「框选区域」时显示
|
||||
if (componentId === "Image_Screenshot" && key === "position") return String(values.shotRange ?? "1") === "2";
|
||||
// Window_*_v1 series: conditional fields based on get_type mode
|
||||
if (/^Window_.*_v1$/.test(componentId) || componentId === "Window_WindowExists" || componentId === "Window_WaitWindow") {
|
||||
const gt = String(values.get_type ?? "");
|
||||
|
||||
Reference in new issue
Block a user