mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-26 02:46:48 +08:00
* 增强代码生成
This commit is contained in:
@@ -186,9 +186,17 @@ func (l *gCurd) loadView(ctx context.Context, in *CurdPreviewInput) (err error)
|
||||
importInput := gstr.Replace(temp.InputPath, "./", modName+"/")
|
||||
importController := gstr.Replace(temp.ControllerPath, "./", modName+"/")
|
||||
importService := "hotgo/internal/service"
|
||||
importDao := "hotgo/internal/dao"
|
||||
importEntity := "hotgo/internal/model/entity"
|
||||
if temp.IsAddon {
|
||||
importService = "hotgo/addons/" + in.In.AddonName + "/service"
|
||||
}
|
||||
if temp.IsAddon {
|
||||
importDao = "hotgo/addons/" + in.In.AddonName + "/dao"
|
||||
}
|
||||
if temp.IsAddon {
|
||||
importEntity = "hotgo/addons/" + in.In.AddonName + "/model/entity"
|
||||
}
|
||||
|
||||
importWebApi := "@/api/" + gstr.LcFirst(in.In.VarName)
|
||||
if temp.IsAddon {
|
||||
@@ -221,6 +229,8 @@ func (l *gCurd) loadView(ctx context.Context, in *CurdPreviewInput) (err error)
|
||||
"importWebApi": importWebApi, // 导入webApi
|
||||
"apiPrefix": in.options.ApiPrefix, // api前缀
|
||||
"componentPrefix": componentPrefix, // vue子组件前缀
|
||||
"importDao": importDao, // vue子组件前缀
|
||||
"importEntity": importEntity, // vue子组件前缀
|
||||
})
|
||||
|
||||
in.view = view
|
||||
|
||||
Reference in New Issue
Block a user