Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report]使用插件渲染Menu、MiniMap等会报错(vue3) #1311

Closed
fanwww opened this issue Aug 27, 2023 · 4 comments
Closed

[Bug report]使用插件渲染Menu、MiniMap等会报错(vue3) #1311

fanwww opened this issue Aug 27, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@fanwww
Copy link

fanwww commented Aug 27, 2023

问题描述

使用插件渲染Menu、MiniMap等会报错,需要手动刷新才会加载出来
image
image
image

最简复现

可去这个网站看一下,不过生产环境没有报错信息,上面的报错是开发环境的报错,但是问题依然存在
https://superfan-fan.gitee.io/myweb/#/mindMaping/talking

相关信息 context

LogicFlow Version:
"@logicflow/core": "^1.2.12",
"@logicflow/extension": "^1.2.13",
Node Version:v16.17.0
Platform:vue3

@fanwww
Copy link
Author

fanwww commented Aug 28, 2023

image
加个定时器的话就没有问题,但是这种的话就是以写bug的方式来解决bug

@wumail
Copy link
Collaborator

wumail commented Aug 29, 2023

还是提供一下可复现示例吧,我这里没有问题
image

@fanwww
Copy link
Author

fanwww commented Aug 29, 2023

还是提供一下可复现示例吧,我这里没有问题 image

可以拉取一下这个demo https://github.com/fanwww/logic_flow
在切换路由的时候会出问题
image

@wbccb
Copy link
Contributor

wbccb commented Sep 3, 2023

Suspense组件导致的问题,把Suspense去掉就没问题了,比如下面这样

<router-view v-slot="{ Component,route }">
  <Transition name="fade" mode="out-in">
    <keep-alive :exclude="['logicflow2']">
      <Suspense>
        <!-- 主要内容 -->
        <component :is="Component" :key="route.path" :name="route.name"></component>
        <!-- 加载中状态 -->
        <template #fallback>
          正在加载...
        </template>
      </Suspense>
    </keep-alive>
  </Transition>
</router-view>

换成:

<router-view v-slot="{ Component,route }">
  <Transition name="fade" mode="out-in">
    <keep-alive :exclude="['logicflow2']">
      <component :is="Component" :key="route.path" :name="route.name"></component>
    </keep-alive>
  </Transition>
</router-view>

至于Suspense组件为什么延缓了部分组件的render()的执行...这个就不清楚了,调试不出来

@boyongjiong boyongjiong added the bug Something isn't working label Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants