-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
fix(server-renderer): getSSRProps can get exposed property #7502
Closed
Closed
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
93406ed
fix(server-renderer): getSSRProps can get exposed property
baiwusanyu-c a8aaa17
fix(server-renderer): added unit test
baiwusanyu-c 43aa9e1
fix(server-renderer): update code
baiwusanyu-c fb80c84
Merge branch 'vuejs:main' into bwsy/fix/getSSRProps
baiwusanyu-c 5f43eed
Merge branch 'vuejs:main' into bwsy/fix/getSSRProps
baiwusanyu-c 399c1ce
Merge branch 'vuejs:main' into bwsy/fix/getSSRProps
baiwusanyu-c b174489
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 1bfa639
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c a581f3c
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 8976c26
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 1b85487
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 2365226
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 68bd92c
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 33ad78c
Merge remote-tracking branch 'origin/main' into bwsy/fix/getSSRProps
baiwusanyu-c 7d0bbff
fix(server-render): updated unit test
baiwusanyu-c be00941
Merge remote-tracking branch 'origin/main' into bwsy/fix/getSSRProps
baiwusanyu-c 53aaee6
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 671aaad
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c ee51e5e
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 93eecc4
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 9029a9a
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c a57a19b
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 9209661
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c c4522a5
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c cc7b894
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c b263a8c
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 27d26cf
Merge branch 'main' into bwsy/fix/getSSRProps
baiwusanyu-c 0223c97
Merge remote-tracking branch 'origin/main' into bwsy/fix/getSSRProps
baiwusanyu-c f103ba5
[autofix.ci] apply automated fixes
autofix-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ import { | |
import { ssrRenderAttrs } from './helpers/ssrRenderAttrs' | ||
import { ssrCompile } from './helpers/ssrCompile' | ||
import { ssrRenderTeleport } from './helpers/ssrRenderTeleport' | ||
|
||
import { getExposeProxy } from '@vue/runtime-dom' | ||
const { | ||
createComponentInstance, | ||
setCurrentRenderingInstance, | ||
|
@@ -183,7 +183,7 @@ function renderComponentSubTree( | |
const prev = setCurrentRenderingInstance(instance) | ||
try { | ||
ssrRender( | ||
instance.proxy, | ||
getExposeProxy(instance) || instance.proxy, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't really the right fix as for the component's own render function, it should be using the default (internal facing) proxy. See the correct fix in df686ab (reusing tests from this PR) |
||
push, | ||
instance, | ||
attrs, | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that we should expose this from runtime-core, as this way it will be re-exposed from the main vue package. But really it's an internal API.
I think we should move to the
shared
package like other stuff that's internally shared between different renderers.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you said makes sense, but moving
getExposeProxy
toshaerd
seems to be more costly, because thepublicPropertiesMap
it uses involves a lot of internal APIs.Import
getExposeProxy
directly through the path, how do you think this is possible?Because I see that there are similar writing in
customFormatter.ts
andpackages/vue-compat/src/index.ts