From: edison Date: Fri, 8 Oct 2021 15:57:39 +0000 (+0800) Subject: fix(compiler-sfc): support runtime Enum in normal script (#4698) X-Git-Tag: v3.2.20~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f66d456b7a39db9dae7e70c28bb431ff293d8fef;p=thirdparty%2Fvuejs%2Fcore.git fix(compiler-sfc): support runtime Enum in normal script (#4698) --- diff --git a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap index 9dbe37cc9d..79d598ae6f 100644 --- a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap +++ b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap @@ -1323,6 +1323,25 @@ return { Foo } })" `; +exports[`SFC compile + ` + ) + assertCode(content) + expect(bindings).toStrictEqual({ + D: BindingTypes.SETUP_CONST, + C: BindingTypes.SETUP_CONST, + B: BindingTypes.SETUP_CONST, + Foo: BindingTypes.SETUP_CONST + }) + }) + test('const Enum', () => { const { content, bindings } = compile( `