|
@@ -77,7 +77,7 @@
|
|
|
<el-form-item class="flex">
|
|
|
<template v-if="items.length">
|
|
|
<m-button class="ml-3" icon="el-icon-search" @click="onSubmit">查询</m-button>
|
|
|
- <m-button v-if="showResetBtn" class="ml-3" icon="el-icon-refresh" @click="onReset">重置</m-button>
|
|
|
+ <m-button class="ml-3" icon="el-icon-refresh" @click="onReset">重置</m-button>
|
|
|
</template>
|
|
|
<slot name="button"></slot>
|
|
|
</el-form-item>
|
|
@@ -97,14 +97,6 @@ export default {
|
|
|
value: {
|
|
|
type: Object,
|
|
|
default: () => ({})
|
|
|
- },
|
|
|
- showResetBtn: {
|
|
|
- type: Boolean,
|
|
|
- default: true
|
|
|
- },
|
|
|
- customReset: {
|
|
|
- type: Boolean,
|
|
|
- default: false
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
@@ -133,7 +125,6 @@ export default {
|
|
|
},
|
|
|
onReset () {
|
|
|
this.$refs.form.resetFields()
|
|
|
- if (this.customReset) return this.$emit('reset', this.query)
|
|
|
this.$emit('search', this.query)
|
|
|
}
|
|
|
}
|