| | |
| | | <template> |
| | | <el-form :inline="true"> |
| | | <el-form :inline="true" :size="size"> |
| | | <slot name="options"></slot> |
| | | <el-form-item> |
| | | <el-button icon="Search" type="primary" @click="search">{{ btnText }}</el-button> |
| | | <el-button |
| | | icon="Search" |
| | | type="primary" |
| | | :loading="loading" |
| | | @click="search" |
| | | @kekeyup.enter="search" |
| | | >{{ btnText }}</el-button |
| | | > |
| | | <slot name="buttons"></slot> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | size: { |
| | | type: String, |
| | | default: 'default' |
| | | }, |
| | | btnText: { |
| | | type: String, |
| | | default: '查询' |
| | | } |
| | | }, |
| | | loading: Boolean |
| | | }, |
| | | emits: ['search'], |
| | | methods: { |
| | | search() { |
| | | this.$emit('search') |
| | | this.$emit('search'); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |