rule

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SystemProvide = 1
	WechatProvide = 2
)

Variables

This section is empty.

Functions

func GenerateAutoTitle added in v1.9.0

func GenerateAutoTitle(displayName string, templateName string) string

func GenerateCCTitle added in v1.8.0

func GenerateCCTitle(displayName string, templateName string) string

func GenerateTitle

func GenerateTitle(displayName string, templateName string) string

func GetFields

func GetFields(rules []Rule, provide uint8, data map[string]interface{}) []card.Field

Types

type Data

type Data struct {
	Provide  uint8
	OderData map[string]interface{}
}

type FieldProcessor added in v1.9.0

type FieldProcessor struct {
	// contains filtered or unexported fields
}

type Options added in v1.9.0

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

type Rule

type Rule struct {
	Type     string                 `json:"type"`
	Field    string                 `json:"field"`
	Title    string                 `json:"title"`
	Style    map[string]interface{} `json:"style"`
	Children []Rule                 `json:"children"`
	Options  []Options              `json:"options"`
}

func FlattenRules added in v1.9.0

func FlattenRules(rules []Rule) []Rule

FlattenRules 扁平化处理函数,排除 type 为 "col" 和 "fcRow" 的规则本身,但保留它们的子规则

func ParseRules

func ParseRules(ruleData interface{}) ([]Rule, error)

ParseRules 解析模版字段

type Rules

type Rules []Rule

Jump to

Keyboard shortcuts

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