From f44804538c7d70a4b7a204162cc79866d06e8e60 Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Sat, 17 Apr 2021 00:42:17 +0800 Subject: [PATCH] fix: delete trim() in utils/operate/index.ts --- src/utils/operate/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/operate/index.ts b/src/utils/operate/index.ts index b328131b0..21aef1a6f 100644 --- a/src/utils/operate/index.ts +++ b/src/utils/operate/index.ts @@ -3,7 +3,7 @@ export const hasClass = (ele: Element, cls: string): any => { } export const addClass = (ele: Element, cls: string, extracls?: string): any => { - if (!hasClass(ele, cls)) ele.className += (' ' + cls).trim() + if (!hasClass(ele, cls)) ele.className += (' ' + cls) if (extracls) { if (!hasClass(ele, extracls)) ele.className += ' ' + extracls }