data-config组件
Install
Prerequisites
Using go get
go get github.com/mhaya/components/data-config@latest
Quick Start
import mhayaDataConfig "github.com/mhaya/components/data-config"
package demo
import (
"github.com/mhaya"
mhayaDataConfig "github.com/mhaya/components/data-config"
)
// RegisterComponent 注册struct到data-config
func RegisterComponent() {
dataConfig := mhayaDataConfig.NewComponent()
dataConfig.Register(
&DropList,
&DropOne,
)
//data-config组件注册到mhaya引擎
mhaya.RegisterComponent(dataConfig)
}
example