use path (#32)
* feat:add claasf * refactor(tag.go) * refactor(cache.go) * refactor(attribute.go) * refactor(app.go) * refactor(attribute.go) * fix:use path in PostPartialWithQs * fix: PostPartial
This commit is contained in:
parent
4eabe21d68
commit
30ac29fd6c
1 changed files with 1 additions and 10 deletions
|
|
@ -2,7 +2,6 @@ package h
|
|||
|
||||
import (
|
||||
"github.com/maddalax/htmgo/framework/hx"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func Get(path string, trigger ...string) *AttributeMapOrdered {
|
||||
|
|
@ -22,18 +21,10 @@ func GetWithQs(path string, qs *Qs, trigger string) *AttributeMapOrdered {
|
|||
}
|
||||
|
||||
func PostPartial(partial PartialFunc, triggers ...string) *AttributeMapOrdered {
|
||||
path := GetPartialPath(partial)
|
||||
if !strings.HasPrefix(path, "/") {
|
||||
path = "/" + path
|
||||
}
|
||||
return Post(path, triggers...)
|
||||
return Post(GetPartialPath(partial), triggers...)
|
||||
}
|
||||
|
||||
func PostPartialWithQs(partial PartialFunc, qs *Qs, trigger ...string) *AttributeMapOrdered {
|
||||
path := GetPartialPathWithQs(partial, qs)
|
||||
if !strings.HasPrefix(path, "/") {
|
||||
path = "/" + path
|
||||
}
|
||||
return Post(GetPartialPathWithQs(partial, qs), trigger...)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue