mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
perf(components): [el-button] delete isEmpty (#3479)
This commit is contained in:
parent
39009034f1
commit
a24c2977e1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user