antvis / antvis/X6

在qianlkun子应用中使用x6,点击浏览器的回退和前进出现自定义Vue节点重复渲染

Open
#4,596 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.7k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

### 问题描述

我的项目是qiankun中的一个子应用,项目框架是Vue3+elementplus,x6的节点使用vue组件作为自定义节点。项目使用chrome浏览器进行访问,通过主应用的顶部导航可以进入到我的项目中。
问题重现操作步骤:
1、当进入到我的项目使用x6的页面时,点击主应用顶部导航到另一个子应用
2、点击浏览器左上角的回退按钮,会再次进入到我的项目使用x6的页面,这个时候页面上的节点会出现重复渲染
3、刷页面又恢复正常

### 重现链接

内网系统,无法提供重现链接

### 重现步骤

问题重现操作步骤:
1、当进入到我的项目使用x6的页面时,点击主应用顶部导航到另一个子应用
2、点击浏览器左上角的回退按钮,会再次进入到我的项目使用x6的页面,这个时候页面上的节点会出现重复渲染

### 预期行为

预期是每个自定义节点只渲染一个,不要出现重复渲染

![Image](https://github.com/user-attachments/assets/d864dc46-6bdf-4cc6-9e9b-cc744f072fa9)

### 平台

- 操作系统: [Windows, Linux]
- 网页浏览器: [Google Chrome]
- X6 版本: [2.18.1]
- x6-vue-shape 版本: [2.1.2]

### 屏幕截图或视频(可选)

_No response_

### 补充说明(可选)

![Image](https://github.com/user-attachments/assets/b18ff236-042a-4e83-a375-a2180381b0f3)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the browser back/forward sequence in a Vue 3 qiankun child application using X6 2.18.1 and x6-vue-shape 2.1.2, with navigation between two sub-applications. Trace the custom Vue node rendering across the return navigation and verify that each node renders once without requiring a page refresh.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.