From: linzhe <40790268+linzhe141@users.noreply.github.com> Date: Wed, 24 Sep 2025 09:06:03 +0000 (+0800) Subject: fix(compiler-ssr): ensure v-show has a higher priority in SSR (#12171) X-Git-Tag: v3.5.22~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=836b82976ffb7aa0ea9cbe417bef07deae3ca47c;p=thirdparty%2Fvuejs%2Fcore.git fix(compiler-ssr): ensure v-show has a higher priority in SSR (#12171) close #12162 --- diff --git a/packages/compiler-ssr/__tests__/ssrVShow.spec.ts b/packages/compiler-ssr/__tests__/ssrVShow.spec.ts index d0f3ec930..d06e2c9d7 100644 --- a/packages/compiler-ssr/__tests__/ssrVShow.spec.ts +++ b/packages/compiler-ssr/__tests__/ssrVShow.spec.ts @@ -11,9 +11,9 @@ describe('ssr: v-show', () => { const { ssrRenderAttrs: _ssrRenderAttrs } = require("vue/server-renderer") return function ssrRender(_ctx, _push, _parent, _attrs) { - _push(\`
\`) + }))}>\`) }" `) }) @@ -92,6 +92,24 @@ describe('ssr: v-show', () => { `) }) + test('with style + display', () => { + expect(compileWithWrapper(``).code) + .toMatchInlineSnapshot(` + "const { ssrRenderStyle: _ssrRenderStyle, ssrRenderAttrs: _ssrRenderAttrs } = require("vue/server-renderer") + + return function ssrRender(_ctx, _push, _parent, _attrs) { + _push(\`