riku
2024-09-09 dc4ba8076aebd30f33282121a414262b4d4919f4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<template>
  <el-form :inline="true">
    <slot name="options"></slot>
    <el-form-item>
      <el-button icon="Search" type="primary" :loading="loading" @click="search">{{ btnText }}</el-button>
      <slot name="buttons"></slot>
    </el-form-item>
  </el-form>
</template>
 
<script>
export default {
  props: {
    btnText: {
      type: String,
      default: '查询'
    },
    loading: Boolean
  },
  emits: ['search'],
  methods: {
    search() {
      this.$emit('search');
    }
  }
};
</script>