From e9791175d58621d90791be64b1d526ea9985bb40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E4=BF=8A=E8=B6=85?= Date: Sun, 2 Jan 2022 16:39:25 +0800 Subject: [PATCH] fix: remove blank character after className --- package.json | 1 + src/index.jsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 2773521..bf94e6f 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "babel-preset-stage-0": "^6.22.0", "chai": "^3.5.0", "chai-spies": "^0.7.1", + "classnames": "^2.3.1", "eslint": "^4.18.2", "eslint-config-airbnb": "^14.1.0", "eslint-plugin-import": "^2.2.0", diff --git a/src/index.jsx b/src/index.jsx index 39c1505..2898bc7 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -3,6 +3,7 @@ */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import classNames from 'classnames'; import { on, off } from './utils/event'; import scrollParent from './utils/scrollParent'; import debounce from './utils/debounce'; @@ -339,7 +340,7 @@ class LazyLoad extends Component { } = this.props; return ( -
+
{this.visible ? ( children ) : placeholder ? (