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

perf[table]: replace eagerComputed with computed #7609

Closed

Conversation

cc-hearts
Copy link
Contributor

Relates #7592.

In Vue 3.4+, if computed new value does not change,computed, effect, watch, watchEffect, render dependencies will not be triggered.

@orionna319
Copy link

Have you tried it locally? When I use pnpm patch to patch /vc-table/Cell/index.tsx, I use computed instead of eagerComputed, but I still get the error Maximum call stack size exceeded

@cc-hearts
Copy link
Contributor Author

I've tested it locally and it works, is the package for the pnpm patch a tsx file? But if you import locally, it will import the files in the es folder after compiling, if there is still a problem, can you provide me with the code?

@orionna319
Copy link

I used pnpm patch under node_modules/ant-design-vue/lib/vc-table/Cell/index.js. Maybe I need to patch node_modules/ant-design-vue/es/vc-table/Cell/index.js. I will try it again tomorrow. Thank you for your reply.

@cc-hearts
Copy link
Contributor Author

image

Here's my test in vite's development environment(I have not yet executed the patch operation, just directly changed the third-party code, if there is a problem, I will continue to correct it!)

@orionna319
Copy link

I should patch in node_modules/ant-design-vue/es/vc-table/Cell/index.js. Thank you for your contribution. I just tested it locally and there is no error. Thank you.

@cc-hearts
Copy link
Contributor Author

refs: #7682

@cc-hearts cc-hearts closed this Jun 23, 2024
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

Successfully merging this pull request may close these issues.

2 participants