perf(components): [el-button] delete isEmpty (#3479)

This commit is contained in:
啝裳 2021-09-18 20:49:50 +08:00 committed by GitHub
parent 39009034f1
commit a24c2977e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,6 @@
<script lang="ts">
import { computed, inject, defineComponent } from 'vue'
import isEmpty from 'lodash/isEmpty'
import { useFormItem } from '@element-plus/hooks'
import { elButtonGroupKey, elFormKey } from '@element-plus/tokens'
@ -45,7 +44,7 @@ export default defineComponent({
const elForm = inject(elFormKey, undefined)
const handleClick = (evt: MouseEvent) => {
if (props.nativeType === 'reset' && !isEmpty(elForm)) {
if (props.nativeType === 'reset') {
elForm?.resetFields()
}
emit('click', evt)