Merge pull request #12731 from dataease/pr@dev-v2@fix_xpack_load

fix(X-Pack): 社区版无法打开仪表板编辑页面
This commit is contained in:
fit2cloud-chenyw 2024-10-16 16:38:55 +08:00 committed by GitHub
commit 32ac10b94d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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>