diff --git a/server/resource/package/server/service/service.go.tpl b/server/resource/package/server/service/service.go.tpl index 8b28c47b83..77a4946b6f 100644 --- a/server/resource/package/server/service/service.go.tpl +++ b/server/resource/package/server/service/service.go.tpl @@ -62,6 +62,7 @@ import ( "{{.Module}}/model/{{.Package}}" {{- if not .IsTree}} {{.Package}}Req "{{.Module}}/model/{{.Package}}/request" + {{- else }} "errors" {{- end }} {{- if .AutoCreateResource }} diff --git a/server/resource/plugin/server/service/service.go.template b/server/resource/plugin/server/service/service.go.template index 0927082814..ce6ae4aa25 100644 --- a/server/resource/plugin/server/service/service.go.template +++ b/server/resource/plugin/server/service/service.go.template @@ -62,6 +62,7 @@ import ( "{{.Module}}/plugin/{{.Package}}/model" {{- if not .IsTree }} "{{.Module}}/plugin/{{.Package}}/model/request" + {{- else }} "errors" {{- end }} {{- if .AutoCreateResource }} diff --git a/server/resource/plugin/web/view/view.vue.template b/server/resource/plugin/web/view/view.vue.template index a0b62437e1..77b6d8fcac 100644 --- a/server/resource/plugin/web/view/view.vue.template +++ b/server/resource/plugin/web/view/view.vue.template @@ -1096,7 +1096,7 @@ const rootNode = { const getTableData = async() => { const table = await get{{.StructName}}List() if (table.code === 0) { - tableData.value = table.data + tableData.value = table.data || [] } } {{- end }}