Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TBaseInfo ¶
type TBaseInfo struct {
DesignerVersion string // 生成工具版本
DateTime string // 生成时间
UIFile string // UI 文件
UserFile string // 用户文件
}
基础信息
type TComponentData ¶
type TComponentData struct {
Name string // 组件名称
ClassName string // 组件类名
Mod string // 组件所属模块
Type consts.ComponentType // 组件类型
Properties []TPropertyData // 组件属性
Parent *TComponentData // 组件所属父类
Children []*TComponentData // 子组件列表
}
组件数据
func (*TComponentData) GoIntfName ¶
func (m *TComponentData) GoIntfName() string
模板调用函数 - 返回组件在Go定义的接口名
func (*TComponentData) GoNewObject ¶
func (m *TComponentData) GoNewObject() string
模板调用函数 - 返回组件在Go创建方法名
func (*TComponentData) GoSetObjectParent ¶
func (m *TComponentData) GoSetObjectParent() string
模板调用函数 - 返回组件在Go创建方法名
type TFormData ¶
type TFormData struct {
BaseInfo *TBaseInfo // 基础信息
PackageName string // 包名
Imports *tool.HashSet[string] // 导入包
Form *TComponentData // 窗体根组件节点
}
窗体数据
func (*TFormData) IncludePackage ¶
func (m *TFormData) IncludePackage()
包含的包 该函数在渲染之前执行, 获取当前所依赖的模块包 根据不同的属性和组件所属模板区分包
type TListenFileInfo ¶
type TPropertyData ¶
type TPropertyData struct {
Name string // 属性名称
Value any // 属性值
Type consts.PropertyDataType // 属性类型
NoCode bool // 是否生成代码, true: 不生成, false 生成
}
属性数组
func (*TPropertyData) GoPropertySet ¶
func (m *TPropertyData) GoPropertySet(comp *TComponentData, form *TFormData) string
模板调用函数 - 设置对象属性
Click to show internal directories.
Click to hide internal directories.