mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Options for custom FhcApiFactory
This commit is contained in:
@@ -286,7 +286,9 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
app.config.globalProperties.$fhcApi.factory = new FhcApiFactoryWrapper(FhcApiFactory);
|
||||
const mergedFhcApiFactory = options?.factory ? {...FhcApiFactory, ...options.factory} : FhcApiFactory;
|
||||
|
||||
app.config.globalProperties.$fhcApi.factory = new FhcApiFactoryWrapper(mergedFhcApiFactory);
|
||||
|
||||
}
|
||||
};
|
||||
@@ -62,7 +62,7 @@ const phrasen = {
|
||||
|
||||
export default {
|
||||
install(app, options) {
|
||||
app.use(FhcApi);
|
||||
app.use(FhcApi, options?.fhcApi || undefined);
|
||||
app.config.globalProperties.$p = {
|
||||
t: phrasen.t,
|
||||
loadCategory: cat => phrasen.loadCategory.call(app, cat),
|
||||
|
||||
Reference in New Issue
Block a user