[change] block, component api
This commit is contained in:
parent
1aade992b2
commit
3b8f1f3a6a
1 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/yaoapp/gou/process"
|
"github.com/yaoapp/gou/process"
|
||||||
"github.com/yaoapp/kun/exception"
|
"github.com/yaoapp/kun/exception"
|
||||||
"github.com/yaoapp/yao/sui/core"
|
"github.com/yaoapp/yao/sui/core"
|
||||||
|
|
@ -105,7 +107,7 @@ func BlockFind(process *process.Process) interface{} {
|
||||||
|
|
||||||
sui := get(process)
|
sui := get(process)
|
||||||
templateID := process.ArgsString(1)
|
templateID := process.ArgsString(1)
|
||||||
blockID := process.ArgsString(2)
|
blockID := strings.TrimRight(process.ArgsString(2), ".js")
|
||||||
|
|
||||||
tmpl, err := sui.GetTemplate(templateID)
|
tmpl, err := sui.GetTemplate(templateID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -145,7 +147,7 @@ func ComponentFind(process *process.Process) interface{} {
|
||||||
|
|
||||||
sui := get(process)
|
sui := get(process)
|
||||||
templateID := process.ArgsString(1)
|
templateID := process.ArgsString(1)
|
||||||
componentID := process.ArgsString(2)
|
componentID := strings.TrimRight(process.ArgsString(2), ".js")
|
||||||
|
|
||||||
tmpl, err := sui.GetTemplate(templateID)
|
tmpl, err := sui.GetTemplate(templateID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue