diff --git a/nezha-fronted/src/components/common/js/tools.js b/nezha-fronted/src/components/common/js/tools.js index ec257913e..668470acf 100644 --- a/nezha-fronted/src/components/common/js/tools.js +++ b/nezha-fronted/src/components/common/js/tools.js @@ -484,4 +484,8 @@ export const chartResizeTool = { } } } +}; + +export function blankPromise() { + return new Promise(resolve => {resolve();}); } diff --git a/nezha-fronted/src/components/page/config/account.vue b/nezha-fronted/src/components/page/config/account.vue index bc77efa1d..583fc1f8c 100644 --- a/nezha-fronted/src/components/page/config/account.vue +++ b/nezha-fronted/src/components/page/config/account.vue @@ -399,6 +399,7 @@ } }, showSubList(n) { + let vm = this; this.$bottomBoxWindow.showSubListWatch(vm, n); } }, diff --git a/nezha-fronted/src/components/page/config/dc.vue b/nezha-fronted/src/components/page/config/dc.vue index 4a3ad9926..095fd8565 100644 --- a/nezha-fronted/src/components/page/config/dc.vue +++ b/nezha-fronted/src/components/page/config/dc.vue @@ -492,6 +492,7 @@ } }, showSubList(n) { + let vm = this; this.$bottomBoxWindow.showSubListWatch(vm, n); } }, diff --git a/nezha-fronted/src/components/page/config/promServer.vue b/nezha-fronted/src/components/page/config/promServer.vue index 5ad96839d..23f32e66e 100644 --- a/nezha-fronted/src/components/page/config/promServer.vue +++ b/nezha-fronted/src/components/page/config/promServer.vue @@ -497,6 +497,7 @@ } }, showSubList(n) { + let vm = this; this.$bottomBoxWindow.showSubListWatch(vm, n); } } diff --git a/nezha-fronted/src/main.js b/nezha-fronted/src/main.js index 40b9abd17..ecc4aa3cf 100644 --- a/nezha-fronted/src/main.js +++ b/nezha-fronted/src/main.js @@ -19,7 +19,8 @@ import plTable from 'pl-table' import 'pl-table/themes/index.css' import {post, get, put, del} from './http.js' -import {toTop, clickoutside, scrollBar, bottomBoxWindow, stringTimeParseToUnix, unixTimeParseToString, chartResizeTool} from './components/common/js/tools.js' +import {toTop, clickoutside, scrollBar, bottomBoxWindow, stringTimeParseToUnix, unixTimeParseToString, chartResizeTool} from './components/common/js/tools.js'; +import * as tools from './components/common/js/tools.js'; import * as constants from './components/common/js/constants.js' @@ -75,6 +76,7 @@ Vue.prototype.$get = get; Vue.prototype.$put = put; Vue.prototype.$delete = del; Vue.prototype.$CONSTANTS = constants; +Vue.prototype.$TOOLS = tools; Vue.prototype.$toTop = toTop; //toTop置顶按钮方法 Vue.prototype.$bottomBoxWindow = bottomBoxWindow; //底部上滑框控制 Vue.prototype.$stringTimeParseToUnix = stringTimeParseToUnix;