feat: 添加 Action 协议

This commit is contained in:
2026-09-23 15:33:28 +08:00
parent f0d33ff058
commit 5ef873bfe9
14 changed files with 284 additions and 25 deletions
+19
View File
@@ -0,0 +1,19 @@
"""按相对位移移动组件"""
from typing import Literal
from pydantic import Field
from app.schemas.screen import Number
from .base import BaseAction
class MoveAction(BaseAction):
type: Literal["move"] = "move"
delta_x: Number = Field(
default=0, description="水平位移,单位 px,正数向右,负数向左"
)
delta_y: Number = Field(
default=0, description="垂直位移,单位 px,正数向下,负数向上"
)