outPutForm

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonOutPutForm

type CommonOutPutForm struct {
	Version    string                                           `json:"version,omitempty"`
	Name       string                                           `json:"name,omitempty"`
	Type       string                                           `json:"type,omitempty"`
	Props      map[string]interface{}                           `json:"props,omitempty"`
	State      State                                            `json:"state,omitempty"`
	Operations map[apistructs.OperationKey]apistructs.Operation `json:"operations,omitempty"`
	Data       Data                                             `json:"data"`
	InParams   InParams                                         `json:"inParams,omitempty"`
}

type ComponentOutPutForm

type ComponentOutPutForm struct {
	base.DefaultProvider

	CommonOutPutForm
	// contains filtered or unexported fields
}

func (*ComponentOutPutForm) GenComponentState

func (i *ComponentOutPutForm) GenComponentState(c *cptype.Component) error

GenComponentState 获取state

func (*ComponentOutPutForm) GetInParams

func (i *ComponentOutPutForm) GetInParams(ctx context.Context) error

func (*ComponentOutPutForm) Render

func (*ComponentOutPutForm) RenderListOutPutForm

func (i *ComponentOutPutForm) RenderListOutPutForm(gs *cptype.GlobalStateData) error

func (*ComponentOutPutForm) RenderOnChange

func (i *ComponentOutPutForm) RenderOnChange(gs *cptype.GlobalStateData) ([]PropChangeOption, error)

可编辑器的初始值

func (*ComponentOutPutForm) RenderProtocol

func (i *ComponentOutPutForm) RenderProtocol(c *cptype.Component, g *cptype.GlobalStateData)

func (*ComponentOutPutForm) RenderUpdateOutPutForm

func (i *ComponentOutPutForm) RenderUpdateOutPutForm() error

func (*ComponentOutPutForm) SetProps

type Data

type Data struct {
	List []ParamData `json:"list"`
}

type DeleteOperation

type DeleteOperation OperationInfo

type InParams

type InParams struct {
	SceneSetID uint64 `json:"sceneSetId__urlQuery"`
}

type OnChangeOperation

type OnChangeOperation OperationInfo

type OpMetaInfo

type OpMetaInfo struct {
	apistructs.AutotestSceneRequest
	SelectOption []PropChangeOption `json:"selectOption,omitempty"`
}

func GetOpsInfo

func GetOpsInfo(opsData interface{}) (*OpMetaInfo, error)

type OperationBaseInfo

type OperationBaseInfo struct {
	Key string `json:"key"`
	// 操作展示名称
	Text string `json:"text,omitempty"`
	// 确认提示
	Confirm string `json:"confirm,omitempty"`
	// 前端操作是否需要触发后端
	Reload      bool   `json:"reload"`
	Disabled    bool   `json:"disabled"`
	DisabledTip string `json:"disabledTip"`

	FillMeta string `json:"fillMeta"`
}

type OperationInfo

type OperationInfo struct {
	OperationBaseInfo
	Meta OpMetaInfo `json:"meta"`
}

type ParamData

type ParamData struct {
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	Value       string                 `json:"value"`
	ID          uint64                 `json:"id"`
	Operations  map[string]interface{} `json:"operations"`
}

type PropChangeOption

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

type PropColumn

type PropColumn struct {
	Title  string     `json:"title"`
	Key    PropsKey   `json:"key"`
	Width  int64      `json:"width"`
	Flex   int64      `json:"flex"`
	Render PropRender `json:"render"`
}

type PropRender

type PropRender struct {
	Type             string                 `json:"type,omitempty"`
	ValueConvertType string                 `json:"valueConvertType,omitempty"`
	Options          []PropChangeOption     `json:"options,omitempty"`
	Required         bool                   `json:"required,omitempty"`
	UniqueValue      bool                   `json:"uniqueValue,omitempty"`
	Operations       map[string]interface{} `json:"operations,omitempty"`
	Rules            []PropRenderRule       `json:"rules,omitempty"`
	Props            PropRenderProp         `json:"props,omitempty"`
}

type PropRenderProp

type PropRenderProp struct {
	MaxLength int64              `json:"maxLength,omitempty"`
	Options   []PropChangeOption `json:"options,omitempty"`
}

type PropRenderRule

type PropRenderRule struct {
	Pattern string `json:"pattern,omitempty"`
	Msg     string `json:"msg,omitempty"`
}

type PropsKey

type PropsKey string
const (
	PropsKeyParamsName PropsKey = "name"
	PropsKeyDesc       PropsKey = "description"
	PropsKeyValue      PropsKey = "value"
)

type State

type State struct {
	AutotestSceneRequest apistructs.AutotestSceneRequest  `json:"autotestSceneRequest"`
	List                 []apistructs.AutoTestSceneOutput `json:"list"`
}

Jump to

Keyboard shortcuts

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