ui_migration feat(deps): Modified src/ main.js for vue3 compatibility
This commit is contained in:
parent
70cdce3323
commit
8ced9f8b75
2 changed files with 16 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
<template>
|
<template :key="shortcut.shortcut">
|
||||||
<div id="app" class="uk-height-1-1 uk-margin-remove uk-padding-remove" :class="handleTheme">
|
<div id="app" class="uk-height-1-1 uk-margin-remove uk-padding-remove" :class="handleTheme">
|
||||||
<!-- this stops the app loading until setConnected is committed in the store, this means
|
<!-- this stops the app loading until setConnected is committed in the store, this means
|
||||||
other components will not load until we have Thing Descriptions. -->
|
other components will not load until we have Thing Descriptions. -->
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
<button class="uk-modal-close-default" type="button" uk-close></button>
|
<button class="uk-modal-close-default" type="button" uk-close></button>
|
||||||
<div
|
<div
|
||||||
v-for="shortcut in keyboardManual"
|
v-for="shortcut in keyboardManual"
|
||||||
:key="shortcut.shortcut"
|
|
||||||
class="uk-margin-small"
|
class="uk-margin-small"
|
||||||
uk-grid
|
uk-grid
|
||||||
>
|
>
|
||||||
|
|
@ -26,10 +25,9 @@
|
||||||
// Import components
|
// Import components
|
||||||
import appContent from "./components/appContent.vue";
|
import appContent from "./components/appContent.vue";
|
||||||
import loadingContent from "./components/loadingContent.vue";
|
import loadingContent from "./components/loadingContent.vue";
|
||||||
|
import MouseTrap from "mousetrap";
|
||||||
|
|
||||||
var Mousetrap = require("mousetrap");
|
MouseTrap.prototype.stopCallback = function (e, element) {
|
||||||
|
|
||||||
Mousetrap.prototype.stopCallback = function (e, element) {
|
|
||||||
// if the element has the class "mousetrap" then no need to stop
|
// if the element has the class "mousetrap" then no need to stop
|
||||||
if ((" " + element.className + " ").indexOf(" mousetrap ") > -1) {
|
if ((" " + element.className + " ").indexOf(" mousetrap ") > -1) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import Vue from "vue";
|
import { createApp } from 'vue';
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import store from "./store";
|
import store from "./store";
|
||||||
import UIkit from "uikit";
|
import UIkit from "uikit";
|
||||||
|
|
@ -21,15 +21,19 @@ UIkit.mixin(
|
||||||
"accordion",
|
"accordion",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Create Vue app
|
||||||
|
const app = createApp(App);
|
||||||
|
|
||||||
// Use visibility observer
|
// Use visibility observer
|
||||||
Vue.use(VueObserveVisibility);
|
app.use(VueObserveVisibility);
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
// Disable production tip for Vue
|
||||||
|
app.config.productionTip = false;
|
||||||
|
|
||||||
Vue.mixin(queryMixin);
|
// Use global mixins
|
||||||
Vue.mixin(modalMixin);
|
app.mixin(queryMixin);
|
||||||
|
app.mixin(modalMixin);
|
||||||
|
|
||||||
new Vue({
|
// Use Vuex store
|
||||||
store,
|
app.use(store);
|
||||||
render: (h) => h(App),
|
app.mount("#app");
|
||||||
}).$mount("#app");
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue