1
0
Fork 0
mirror of https://github.com/archtechx/airwire.git synced 2025-12-12 02:34:04 +00:00
This commit is contained in:
Samuel Štancl 2021-05-20 20:15:55 +02:00
commit d26fa93f1e
35 changed files with 2388 additions and 0 deletions

View file

@ -0,0 +1,19 @@
let state = window as any;
export default () => {
const deferrer = state.deferLoadingAlpine || function (callback: CallableFunction) { callback() }
state.deferLoadingAlpine = function (callback: CallableFunction) {
state.Alpine.addMagicProperty('$airwire', (el: any) => {
return function (...args: any) {
if (args) {
return window.Airwire.component(args[0], args[1], el.__x.$data.$reactive)
}
return window.Airwire;
}
})
deferrer(callback)
}
}