mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-24 05:26:58 +00:00
- 移除了多个组件中的 max-width 属性,使布局更加灵活 - 统一了状态选择框的样式和提示文本 - 调整了部分字段的标签和占位符文本 - 优化了表格列的标题 - 修复了部分组件的样式问题
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
from typing import Optional, Literal
|
|
from fastapi import Query
|
|
|
|
|
|
class MenuQueryParams:
|
|
"""菜单管理查询参数"""
|
|
|
|
def __init__(
|
|
self,
|
|
name: Optional[str] = Query(None, description="菜单名称"),
|
|
route_path: Optional[str] = Query(None, description="路由地址"),
|
|
component_path: Optional[str] = Query(None, description="组件路径"),
|
|
type: Optional[Literal['M', 'C', 'F']] = Query(None, description="菜单类型(M目录 C菜单 F按钮)"),
|
|
permission: Optional[str] = Query(None, description="权限标识"),
|
|
available: Optional[bool] = Query(None, description="菜单状态(True正常 False停用)"),
|
|
) -> None:
|
|
super().__init__()
|
|
|
|
# 模糊查询字段
|
|
self.name = ("like", name)
|
|
self.route_path = ("like", route_path)
|
|
self.component_path = ("like", component_path)
|
|
self.permission = ("like", permission)
|
|
|
|
# 精确查询字段
|
|
self.type = type
|
|
self.available = available
|