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

同时加载多个子应用,卸载后再打开白屏,single-spa minified message #31 #2691

Closed
Echonessy opened this issue Sep 19, 2023 · 1 comment

Comments

@Echonessy
Copy link

复现:
打开tabA、打开tabB,关闭tabA,再打开tabA qiankun会挂载失败 single-spa minified message #31

对比了一下2.4.4版本

/**
 * @description: 2.4.4
 * @return {*}
 */
  const appInstanceId = `${appName}_${+new Date()}_${Math.floor(Math.random() * 1000)}`;
/**
 * @description: >2.4.4
 * @return {*}
 */
export const genAppInstanceIdByName = (appName: string): string => {
  const globalAppInstanceMap = getGlobalAppInstanceMap();
  if (!(appName in globalAppInstanceMap)) {
    nativeGlobal.__app_instance_name_map__[appName] = 0;
    return appName;
  }

  globalAppInstanceMap[appName]++;
  return `${appName}_${globalAppInstanceMap[appName]}`;
};

  const appInstanceId = genAppInstanceIdByName(appName);

这样会导致一个问题,就是我tabA unmount之后, globalAppInstanceMap[appName]++; 会从头开始计算,但是已经unmount了

@github-actions
Copy link

由于缺乏足够的信息(github、stackblitz、codesandbox等可复现仓库),我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。如果只是单独的技术咨询,可移步 https://qiankun.umijs.org/#-community 交流~

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant