types

package
v0.0.0-...-746bfac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRsp

type AddRsp struct {
	ID int64 `json:"id"`
}

AddRsp 添加数据返回结果

type AmisPageResp

type AmisPageResp[T any] struct {
	Items []T   `json:"items"`
	Total int64 `json:"total"`
}

type App

type App struct {
	Pages []*Menu `json:"pages"`
}

type BatchUpdate

type BatchUpdate struct {
	Rows []map[string]any `json:"rows"`
}

BatchUpdate 批量更新参数,rows 需包含 ID 字段

type DelReq

type DelReq struct {
	IDs string `json:"ids"`
}

DelReq 批量删除

type Menu struct {
	Label     string  `json:"label"`               // 菜单名称
	Icon      string  `json:"icon,omitempty"`      // 菜单图标
	URL       string  `json:"url,omitempty"`       // 页面路由路径
	Link      string  `json:"link,omitempty"`      // 跳转外部链接
	Redirect  string  `json:"redirect,omitempty"`  // 当命中当前页面时,跳转到目标页面。
	Visible   bool    `json:"visible"`             // 有些页面可能不想出现在菜单中,可以配置成 false,另外带参数的路由无需配置,直接就是不可见的。
	SchemaAPI string  `json:"schemaApi,omitempty"` // 页面配置
	Children  []*Menu `json:"children,omitempty"`  // 子菜单
}

Menu 页面配置 参考 https://baidu.github.io/amis/zh-CN/components/app#%E5%B1%9E%E6%80%A7%E8%AF%B4%E6%98%8E

type OKRsp

type OKRsp struct {
	Success bool `json:"success"`
}

OKRsp 返回成功或失败

type Option

type Option struct {
	Label    string    `json:"label"`
	Value    any       `json:"value"`
	Children []*Option `json:"children"`
}

type PageVO

type PageVO[T any] struct {
	List    []T   `json:"list"`
	Offset  int64 `json:"offset"`
	Limit   int64 `json:"limit"`
	Count   int64 `json:"count"`
	HasNext bool  `json:"has_next"`
}

func (*PageVO[T]) ToAmisResp

func (v *PageVO[T]) ToAmisResp() *AmisPageResp[T]

type SelectResp

type SelectResp struct {
	Options []*Option `json:"options"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL