forked from github/dataease
fix(X-Pack): 社区版无法打开仪表板编辑页面
This commit is contained in:
parent
560e53242c
commit
eb3f667ca6
@ -110,7 +110,10 @@ onMounted(async () => {
|
|||||||
distributed = wsCache.get(key)
|
distributed = wsCache.get(key)
|
||||||
}
|
}
|
||||||
if (isNull(distributed)) {
|
if (isNull(distributed)) {
|
||||||
|
setTimeout(() => {
|
||||||
emits('loadFail')
|
emits('loadFail')
|
||||||
|
loading.value = false
|
||||||
|
}, 1000)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (distributed) {
|
if (distributed) {
|
||||||
|
@ -98,11 +98,14 @@ const pluginProxy = ref(null)
|
|||||||
const invokeMethod = param => {
|
const invokeMethod = param => {
|
||||||
if (pluginProxy.value['invokeMethod']) {
|
if (pluginProxy.value['invokeMethod']) {
|
||||||
pluginProxy.value['invokeMethod'](param)
|
pluginProxy.value['invokeMethod'](param)
|
||||||
} else {
|
} else if (param.methodName && pluginProxy.value[param.methodName]) {
|
||||||
pluginProxy.value[param.methodName](param.args)
|
pluginProxy.value[param.methodName](param.args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const emits = defineEmits(['loadFail'])
|
||||||
|
defineExpose({
|
||||||
|
invokeMethod
|
||||||
|
})
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const key = 'xpack-model-distributed'
|
const key = 'xpack-model-distributed'
|
||||||
let distributed = false
|
let distributed = false
|
||||||
@ -115,7 +118,10 @@ onMounted(async () => {
|
|||||||
distributed = wsCache.get(key)
|
distributed = wsCache.get(key)
|
||||||
}
|
}
|
||||||
if (isNull(distributed)) {
|
if (isNull(distributed)) {
|
||||||
|
setTimeout(() => {
|
||||||
emits('loadFail')
|
emits('loadFail')
|
||||||
|
loading.value = false
|
||||||
|
}, 1000)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (distributed) {
|
if (distributed) {
|
||||||
@ -143,11 +149,6 @@ onMounted(async () => {
|
|||||||
loadComponent()
|
loadComponent()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const emits = defineEmits(['loadFail'])
|
|
||||||
defineExpose({
|
|
||||||
invokeMethod
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
Loading…
Reference in New Issue
Block a user