Use global Vue calls instead of vueApp reference
This commit is contained in:
parent
f2309c7c89
commit
91e0349486
@ -1,12 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
import Vue from "vue";
|
||||
|
||||
const $ = require("jquery");
|
||||
const socket = require("./socket");
|
||||
const utils = require("./utils");
|
||||
const ContextMenu = require("./contextMenu");
|
||||
const contextMenuActions = [];
|
||||
const contextMenuItems = [];
|
||||
const {vueApp} = require("./vue");
|
||||
const {switchToChannel, navigate} = require("./router");
|
||||
const store = require("./store").default;
|
||||
|
||||
@ -327,7 +328,7 @@ function addEditTopicItem() {
|
||||
store.getters.findChannel(Number(itemData)).channel.editTopic = true;
|
||||
document.querySelector(`#sidebar .chan[data-id="${Number(itemData)}"]`).click();
|
||||
|
||||
vueApp.$nextTick(() => {
|
||||
Vue.nextTick(() => {
|
||||
document.querySelector(`#chan-${Number(itemData)} .topic-input`).focus();
|
||||
});
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
import Vue from "vue";
|
||||
|
||||
const socket = require("../socket");
|
||||
const {vueApp} = require("../vue");
|
||||
const store = require("../store").default;
|
||||
|
||||
socket.on("more", function(data) {
|
||||
@ -15,7 +16,7 @@ socket.on("more", function(data) {
|
||||
data.totalMessages > channel.channel.messages.length + data.messages.length;
|
||||
channel.channel.messages.unshift(...data.messages);
|
||||
|
||||
vueApp.$nextTick(() => {
|
||||
Vue.nextTick(() => {
|
||||
channel.channel.historyLoading = false;
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
import Vue from "vue";
|
||||
|
||||
const socket = require("../socket");
|
||||
const {vueApp} = require("../vue");
|
||||
const store = require("../store").default;
|
||||
|
||||
socket.on("msg:preview", function(data) {
|
||||
@ -15,6 +16,6 @@ socket.on("msg:preview", function(data) {
|
||||
const previewIndex = message.previews.findIndex((m) => m.link === data.preview.link);
|
||||
|
||||
if (previewIndex > -1) {
|
||||
vueApp.$set(message.previews, previewIndex, data.preview);
|
||||
Vue.set(message.previews, previewIndex, data.preview);
|
||||
}
|
||||
});
|
||||
|
@ -1,7 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
import Vue from "vue";
|
||||
|
||||
const socket = require("../socket");
|
||||
const {vueApp, initChannel} = require("../vue");
|
||||
const {initChannel} = require("../vue");
|
||||
const store = require("../store").default;
|
||||
const {switchToChannel} = require("../router");
|
||||
|
||||
@ -58,6 +60,6 @@ socket.on("network:info", function(data) {
|
||||
}
|
||||
|
||||
for (const key in data) {
|
||||
vueApp.$set(network, key, data[key]);
|
||||
Vue.set(network, key, data[key]);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user