feat: 添加 Action 协议
This commit is contained in:
@@ -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,正数向下,负数向上"
|
||||
)
|
||||
Reference in New Issue
Block a user