commit
d4c0a23dbf
3 changed files with 3 additions and 3 deletions
|
|
@ -29,7 +29,7 @@ func (dsl DSL) Map() map[string]interface{} {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add Default Value for Upload api
|
// Add Default Value for Upload api
|
||||||
if dsl.Type == "Upload" && dsl.Props != nil && !dsl.Props.Has("api") {
|
if (dsl.Type == "Upload" || dsl.Type == "Image") && dsl.Props != nil && !dsl.Props.Has("api") {
|
||||||
res["props"].(map[string]interface{})["$api"] = map[string]interface{}{"process": "fs.data.Upload"}
|
res["props"].(map[string]interface{})["$api"] = map[string]interface{}{"process": "fs.data.Upload"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ func processComponent(process *gouProcess.Process) interface{} {
|
||||||
// :query
|
// :query
|
||||||
query := map[string]interface{}{}
|
query := map[string]interface{}{}
|
||||||
if process.NumOfArgsIs(4) {
|
if process.NumOfArgsIs(4) {
|
||||||
query = process.ArgsMap(3)
|
query = process.ArgsMap(3, map[string]interface{}{})
|
||||||
}
|
}
|
||||||
|
|
||||||
// execute query
|
// execute query
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,7 @@ func (dsl *DSL) Xgen(data map[string]interface{}, excludes map[string]bool) (map
|
||||||
for _, cProp := range dsl.CProps {
|
for _, cProp := range dsl.CProps {
|
||||||
err := cProp.Replace(setting, func(cProp component.CloudPropsDSL) interface{} {
|
err := cProp.Replace(setting, func(cProp component.CloudPropsDSL) interface{} {
|
||||||
|
|
||||||
if cProp.Type == "Upload" || cProp.Type == "WangEditor" {
|
if cProp.Type == "Upload" || cProp.Type == "WangEditor" || cProp.Type == "Image" {
|
||||||
return fmt.Sprintf("/api/__yao/table/%s%s", dsl.ID, cProp.UploadPath())
|
return fmt.Sprintf("/api/__yao/table/%s%s", dsl.ID, cProp.UploadPath())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue