smart

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoOption

type AutoOption struct {
	Label string `json:"label"`
	Value any    `json:"value"`
}

type Column

type Column struct {
	Key      string
	Label    string
	Keyword  bool
	Sortable bool
	Filter   map[string]any
	Date     bool
	Ellipsis bool
	Break    bool
}

type Field

type Field struct {
	Key         string         `json:"key"`
	Label       string         `json:"label"`
	Type        string         `json:"type,omitempty"` //type object array
	Default     any            `json:"default,omitempty"`
	Placeholder string         `json:"placeholder,omitempty"`
	Tips        string         `json:"tips,omitempty"`
	Pattern     string         `json:"pattern,omitempty"`
	Options     []SelectOption `json:"options,omitempty"`
	Required    bool           `json:"required,omitempty"`
	Min         float64        `json:"min,omitempty"`
	Max         float64        `json:"max,omitempty"`
	Step        float64        `json:"step,omitempty"`

	Disabled bool `json:"disabled,omitempty"`
	Hidden   bool `json:"hidden,omitempty"`

	Array    bool    `json:"array,omitempty"`
	Children []Field `json:"children,omitempty"` //子级?

	Auto []AutoOption `json:"auto,omitempty"`

	Time   bool   `json:"time,omitempty"`
	Upload string `json:"upload,omitempty"` //上传路径
}

type Form

type Form []Field

type Info

type Info struct {
	Key     string         `json:"key"`
	Type    string         `json:"type,omitempty"` //type object array
	Label   string         `json:"label"`
	Span    int            `json:"span,omitempty"`
	Options map[string]any `json:"options,omitempty"`
	Default any            `json:"default,omitempty"`
}

type Page

type Page struct {
	Name    string
	Type    string //table edit detail
	Table   string
	Columns []Column
	Fields  []Field
}

type SelectOption

type SelectOption struct {
	Value    any    `json:"value"`
	Label    string `json:"label"`
	Disabled bool   `json:"disabled,omitempty"`
}

type Table

type Table []Column

Jump to

Keyboard shortcuts

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