123456789101112131415161718192021222324252627282930313233 |
- <template>
- <el-row :gutter="20">
- <el-col :span="24" class="top-search">
- <div>
- <slot />
- <el-button type="primary" icon="Search" @click="handle('search')">查询</el-button>
- <el-button icon="RefreshLeft" @click="handle('reset')">重置</el-button>
- </div>
- <div>
- <el-button type="primary" icon="Plus" @click="handle('add')">{{addText}}</el-button>
- <slot name="afterBtn"/>
- </div>
- </el-col>
- </el-row>
- </template>
- <script setup lang="ts">
- import { ref,reactive } from 'vue'
- const props = defineProps({
- addText: String
- })
- const emit = defineEmits(['handle'])
- const name = ref<string>('')
- const params = reactive({
- name: '',
- page: 1,
- size: 20
- })
- const handle=(event)=>{
- emit("handle",event)
- }
- </script>
|