From 10db9c76761e8adb3b0e62af8eca862d882277b1 Mon Sep 17 00:00:00 2001 From: baiwusanyu-c <740132583@qq.com> Date: Tue, 28 Mar 2023 18:06:22 +0800 Subject: [PATCH 1/2] chore: update snapshots by #7766 --- packages/compiler-sfc/__tests__/cssVars.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-sfc/__tests__/cssVars.spec.ts b/packages/compiler-sfc/__tests__/cssVars.spec.ts index 05e5f689ac9..7be41384a24 100644 --- a/packages/compiler-sfc/__tests__/cssVars.spec.ts +++ b/packages/compiler-sfc/__tests__/cssVars.spec.ts @@ -269,7 +269,7 @@ describe('CSS vars injection', () => { ` ) expect(content).toMatch( - `export default {\n setup(__props, { expose }) {\n expose();\n\n_useCssVars(_ctx => ({\n "xxxxxxxx-background": (_unref(background))\n}))` + `import { useCssVars as _useCssVars, unref as _unref } from 'vue'\nimport { ref as _ref } from 'vue';\n \nexport default {\n setup(__props, { expose: __expose }) {\n __expose();\n\n_useCssVars(_ctx => ({\n "xxxxxxxx-background": (_unref(background))\n}))\nlet background = _ref('red')\n \nreturn { get background() { return background }, set background(v) { background = v }, _ref }\n}\n\n}` ) }) }) From cc60da2a5bab8e0c25b8fc350a37bce160efa649 Mon Sep 17 00:00:00 2001 From: baiwusanyu-c <740132583@qq.com> Date: Tue, 28 Mar 2023 18:14:53 +0800 Subject: [PATCH 2/2] chore: update snapshots by #7766 --- packages/compiler-sfc/__tests__/cssVars.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-sfc/__tests__/cssVars.spec.ts b/packages/compiler-sfc/__tests__/cssVars.spec.ts index 7be41384a24..5b01d73d772 100644 --- a/packages/compiler-sfc/__tests__/cssVars.spec.ts +++ b/packages/compiler-sfc/__tests__/cssVars.spec.ts @@ -269,7 +269,7 @@ describe('CSS vars injection', () => { ` ) expect(content).toMatch( - `import { useCssVars as _useCssVars, unref as _unref } from 'vue'\nimport { ref as _ref } from 'vue';\n \nexport default {\n setup(__props, { expose: __expose }) {\n __expose();\n\n_useCssVars(_ctx => ({\n "xxxxxxxx-background": (_unref(background))\n}))\nlet background = _ref('red')\n \nreturn { get background() { return background }, set background(v) { background = v }, _ref }\n}\n\n}` + `export default {\n setup(__props, { expose: __expose }) {\n __expose();\n\n_useCssVars(_ctx => ({\n "xxxxxxxx-background": (_unref(background))\n}))` ) }) })