fix(X-Pack): 社区版无法打开仪表板编辑页面

This commit is contained in:
fit2cloud-chenyw 2024-10-16 16:37:18 +08:00
parent 560e53242c
commit eb3f667ca6
2 changed files with 13 additions and 9 deletions

View File

@ -110,7 +110,10 @@ onMounted(async () => {
distributed = wsCache.get(key)
}
if (isNull(distributed)) {
emits('loadFail')
setTimeout(() => {
emits('loadFail')
loading.value = false
}, 1000)
return
}
if (distributed) {

View File

@ -98,11 +98,14 @@ const pluginProxy = ref(null)
const invokeMethod = param => {
if (pluginProxy.value['invokeMethod']) {
pluginProxy.value['invokeMethod'](param)
} else {
} else if (param.methodName && pluginProxy.value[param.methodName]) {
pluginProxy.value[param.methodName](param.args)
}
}
const emits = defineEmits(['loadFail'])
defineExpose({
invokeMethod
})
onMounted(async () => {
const key = 'xpack-model-distributed'
let distributed = false
@ -115,7 +118,10 @@ onMounted(async () => {
distributed = wsCache.get(key)
}
if (isNull(distributed)) {
emits('loadFail')
setTimeout(() => {
emits('loadFail')
loading.value = false
}, 1000)
return
}
if (distributed) {
@ -143,11 +149,6 @@ onMounted(async () => {
loadComponent()
}
})
const emits = defineEmits(['loadFail'])
defineExpose({
invokeMethod
})
</script>
<template>