mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
fix bindContext
This commit is contained in:
parent
c9c13e895c
commit
b020f4018b
@ -8,7 +8,7 @@ import NotFoundRender from "./staticsRenders/404"
|
|||||||
import CrashRender from "./staticsRenders/crash"
|
import CrashRender from "./staticsRenders/crash"
|
||||||
|
|
||||||
export const ConnectWithApp = (component) => {
|
export const ConnectWithApp = (component) => {
|
||||||
return window.app.bindContexts(component)
|
return RenderCore.bindContexts(component)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function GetRoutesComponentMap() {
|
export function GetRoutesComponentMap() {
|
||||||
@ -108,7 +108,7 @@ export class RenderCore extends Core {
|
|||||||
progressBar = progressBar.configure({ parent: "html", showSpinner: false })
|
progressBar = progressBar.configure({ parent: "html", showSpinner: false })
|
||||||
|
|
||||||
publicMethods = {
|
publicMethods = {
|
||||||
setLocation: this.ctx.history.setLocation,
|
bindContexts: RenderCore.bindContexts,
|
||||||
}
|
}
|
||||||
|
|
||||||
initialize = () => {
|
initialize = () => {
|
||||||
@ -138,6 +138,8 @@ export class RenderCore extends Core {
|
|||||||
this.ctx.history.lastLocation = this.history.location
|
this.ctx.history.lastLocation = this.history.location
|
||||||
}, delay ?? defaultTransitionDelay)
|
}, delay ?? defaultTransitionDelay)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.ctx.registerPublicMethod("setLocation", this.publicMethods.setLocation)
|
||||||
}
|
}
|
||||||
|
|
||||||
validateLocationSlash = (location) => {
|
validateLocationSlash = (location) => {
|
||||||
@ -150,7 +152,7 @@ export class RenderCore extends Core {
|
|||||||
return key
|
return key
|
||||||
}
|
}
|
||||||
|
|
||||||
bindContexts = (component) => {
|
static bindContexts = (component) => {
|
||||||
let contexts = {
|
let contexts = {
|
||||||
main: {},
|
main: {},
|
||||||
app: {},
|
app: {},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user