From c3ff6356d5628b168347809a31670d1ae5955c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E8=8D=A3?= <372638156@qq.com> Date: Mon, 4 Jul 2022 12:04:43 +0800 Subject: [PATCH] fix(useCssVar): remove spaces at both ends fix #1738 --- packages/core/useCssVar/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/useCssVar/index.ts b/packages/core/useCssVar/index.ts index 943408e35b5..752d1401b0b 100644 --- a/packages/core/useCssVar/index.ts +++ b/packages/core/useCssVar/index.ts @@ -30,7 +30,7 @@ export function useCssVar( [elRef, () => unref(prop)], ([el, prop]) => { if (el && window) { - const value = window.getComputedStyle(el).getPropertyValue(prop) + const value = window.getComputedStyle(el).getPropertyValue(prop).trimStart().trimEnd() variable.value = value || initialValue } },