add vue usings

This commit is contained in:
Jiiks 2018-01-29 20:00:31 +02:00
parent 5791368a75
commit ca5467addb
3 changed files with 12 additions and 2 deletions

View File

@ -19,7 +19,7 @@ class BetterDiscord {
}
globalReady() {
BdUI.injectUi();
this.vueInstance = BdUI.injectUi();
}
}

View File

@ -10,10 +10,18 @@
import Dom from './dom';
import Vue from 'vue';
import VTooltip from 'v-tooltip';
import { BdSettingsWrapper } from './components';
export default class {
static injectUi() {
Vue.use(VTooltip, {
defaultContainer: 'bdtooltips',
defaultClass: 'bd-tooltip',
defaultTargetClass: 'bd-has-tooltip',
defaultInnerSelector: '.bd-tooltip-inner',
defaultTemplate: '<div class="bd-tooltip"><span class="bd-tooltip-inner"></span></div>'
});
Dom.createElement('div', null, 'bd-settings').appendTo(Dom.bdBody);
@ -22,5 +30,7 @@ export default class {
components: { BdSettingsWrapper },
template: '<BdSettingsWrapper/>'
});
return vueInstance;
}
}

View File

@ -1,5 +1,5 @@
<template>
<div>Hi!</div>
<div></div>
</template>
<script>
export default {}