mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
add provide to vuejs plugins FhcAlert, FhcApi and Phrasen so they are also useable with inject in composition api
This commit is contained in:
@@ -394,5 +394,6 @@ export default {
|
||||
}
|
||||
};
|
||||
app.config.globalProperties.$fhcAlert = $fhcAlert;
|
||||
app.provide('$fhcAlert', app.config.globalProperties.$fhcAlert);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,6 +316,6 @@ export default {
|
||||
const mergedFhcApiFactory = options?.factory ? {...FhcApiFactory, ...options.factory} : FhcApiFactory;
|
||||
|
||||
app.config.globalProperties.$fhcApi.factory = new FhcApiFactoryWrapper(mergedFhcApiFactory);
|
||||
|
||||
app.provide('$fhcApi', app.config.globalProperties.$fhcApi);
|
||||
}
|
||||
};
|
||||
@@ -69,5 +69,6 @@ export default {
|
||||
loadCategory: cat => phrasen.loadCategory.call(app, cat),
|
||||
t_ref: phrasen.t_ref
|
||||
};
|
||||
app.provide('$p', app.config.globalProperties.$p);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user