-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathentry.js
More file actions
39 lines (35 loc) · 979 Bytes
/
entry.js
File metadata and controls
39 lines (35 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Import vue components
export { default as VueOpenapiForm } from '@/components/VueOpenapiForm.vue';
export { default as SchemaModel } from '@/components/SchemaModel.vue';
// Import custom js that are required
import { registerValidationRules } from '@/plugins/vee-validate';
const install = (app, options) => {
registerValidationRules();
app.mixin({
data: function () {
return {
get cleanObject() {
return options.cleanObject || false;
},
};
},
});
};
// Create module definition for Vue.use()
const plugin = {
install,
};
// To auto-install when vue is found
// eslint-disable-next-line no-redeclare
/* global window, global */
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
}
// Default export is library as a whole, registered via Vue.use()
export default plugin;