Skip to content

Commit d59e3c4

Browse files
committed
update build tag to amisgo_local_sdk
1 parent cc1d3c6 commit d59e3c4

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

comp/action.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (a action) transform(input any, dstKey, successMsg string, transfor func(an
7171
defer r.Body.Close()
7272
m := Schema{}
7373
js.Unmarshal(inputData, &m)
74-
input := m["input"]
74+
input := m["__amisgo__input"]
7575
output, err := transfor(input)
7676
if err != nil {
7777
respError(w, err)
@@ -94,10 +94,10 @@ func (a action) transform(input any, dstKey, successMsg string, transfor func(an
9494
return a.ActionType("ajax").Api(
9595
Schema{
9696
"url": route,
97-
"data": Data{"input": ipt},
98-
"responses": Schema{
97+
"data": Data{"__amisgo__input": ipt},
98+
"__amisgo_resp": Schema{
9999
"200": Schema{
100-
"then": EventAction().ActionType("setValue").Args(Schema{"value": "${response}"}),
100+
"then": EventAction().ActionType("setValue").Args(Schema{"value": "${__amisgo__resp}"}),
101101
},
102102
},
103103
},

jssdk/fs.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build amisgo_local_sdk
2+
13
package jssdk
24

35
import (

new.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build !amisgo_use_local_sdk
1+
//go:build !amisgo_local_sdk
22

33
package amisgo
44

new_local_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build amisgo_use_local_sdk
1+
//go:build amisgo_local_sdk
22

33
package amisgo
44

0 commit comments

Comments
 (0)