forked from n1crack/vuefinder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
27 lines (23 loc) · 760 Bytes
/
index.js
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
import VueFinder from './components/VueFinder.vue';
import './assets/css/style.scss';
import { menuItems, SimpleItem } from './utils/contextmenu';
export default {
/**
* @param {import('vue').App} app
* @param options
*/
install(app, options = {}) {
// define global properties with 'options'
options.i18n = options.i18n ?? {};
let [firstLanguage] = Object.keys(options.i18n)
options.locale = options.locale ?? firstLanguage ?? 'en';
// unique id for the app options
app.provide('VueFinderOptions', options);
// define main component
app.component("VueFinder", VueFinder);
}
};
export {
menuItems as contextMenuItems,
SimpleItem as SimpleContextMenuItem,
}