fix: Remove Vue.component usage and refactor plugins into Vue Plugins (no-changelog) (#6445)
* fix: remove Vue.component usage and refactor plugins into Vue Plugins system (no-changelog) * fix linting issues --------- Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
import type { PluginObject } from 'vue';
|
||||
import Fragment from 'vue-fragment';
|
||||
import VueAgile from 'vue-agile';
|
||||
|
||||
@@ -10,24 +10,24 @@ import { N8nPlugin } from 'n8n-design-system';
|
||||
import EnterpriseEdition from '@/components/EnterpriseEdition.ee.vue';
|
||||
import { useMessage } from '@/composables/useMessage';
|
||||
|
||||
Vue.use(Fragment.Plugin);
|
||||
Vue.use(VueAgile);
|
||||
export const GlobalComponentsPlugin: PluginObject<{}> = {
|
||||
install(app) {
|
||||
const messageService = useMessage();
|
||||
|
||||
Vue.use(ElementUI);
|
||||
Vue.use(N8nPlugin);
|
||||
app.component('enterprise-edition', EnterpriseEdition);
|
||||
|
||||
Vue.component('enterprise-edition', EnterpriseEdition);
|
||||
app.use(Fragment.Plugin);
|
||||
app.use(VueAgile);
|
||||
app.use(ElementUI);
|
||||
app.use(N8nPlugin);
|
||||
app.use(Loading.directive);
|
||||
|
||||
Vue.use(Loading.directive);
|
||||
|
||||
Vue.prototype.$loading = Loading.service;
|
||||
Vue.prototype.$msgbox = MessageBox;
|
||||
|
||||
const messageService = useMessage();
|
||||
|
||||
Vue.prototype.$alert = messageService.alert;
|
||||
Vue.prototype.$confirm = messageService.confirm;
|
||||
Vue.prototype.$prompt = messageService.prompt;
|
||||
Vue.prototype.$message = messageService.message;
|
||||
|
||||
Vue.prototype.$notify = Notification;
|
||||
app.prototype.$loading = Loading.service;
|
||||
app.prototype.$msgbox = MessageBox;
|
||||
app.prototype.$alert = messageService.alert;
|
||||
app.prototype.$confirm = messageService.confirm;
|
||||
app.prototype.$prompt = messageService.prompt;
|
||||
app.prototype.$message = messageService.message;
|
||||
app.prototype.$notify = Notification;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user