From 3141788958b209c449aad2904a586129ec573ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E8=8D=A3?= <372638156@qq.com> Date: Wed, 6 Jul 2022 11:02:09 +0800 Subject: [PATCH] fix(useCssVar): remove spaces at both ends (#1741) --- 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..424eb6cdfd2 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)?.trim() variable.value = value || initialValue } },