From 4d7cac609c5b6feba09308a85127148379f7405c Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sat, 25 Jul 2020 21:57:06 +0800 Subject: [PATCH] fix: back-top trigger two click event --- components/back-top/index.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/back-top/index.jsx b/components/back-top/index.jsx index 0c059768a..0eb5e8f70 100644 --- a/components/back-top/index.jsx +++ b/components/back-top/index.jsx @@ -1,4 +1,5 @@ import { inject, Transition } from 'vue'; +import classNames from 'classnames'; import PropTypes from '../_util/vue-types'; import backTopTypes from './backTopTypes'; import addEventListener from '../vc-util/Dom/addEventListener'; @@ -16,6 +17,7 @@ const props = backTopTypes(); const BackTop = { name: 'ABackTop', + inheritAttrs: false, mixins: [BaseMixin], props: { ...props, @@ -77,15 +79,16 @@ const BackTop = { const getPrefixCls = this.configProvider.getPrefixCls; const prefixCls = getPrefixCls('back-top', customizePrefixCls); - + const classString = classNames(prefixCls, this.$attrs.class); const defaultElement = (