소스 검색

fix: delete trim() in utils/operate/index.ts

xiaoxian521 4 년 전
부모
커밋
f44804538c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/utils/operate/index.ts

+ 1 - 1
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
   }