Files
my-v0-server/app/schemas/actions/move.py
T
2026-09-23 15:33:28 +08:00

20 lines
472 B
Python

"""按相对位移移动组件"""
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,正数向下,负数向上"
)