wujingjing
2024-04-22 f106e4dffb8279cb90726e83e7edd631f4c77699
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
28
29
30
31
32
33
<template>
    <el-input width="300" v-bind="{ ...$attrs, ...props }">
        <template #append>
            <el-button icon="ele-Refresh" @click="resetQuery" :size="size" style="margin-right: 20px; border-color: rgb(220, 223, 230)" />
            <el-button icon="ele-Search" type="primary" @click="handleQuery" :size="size" style="border-color: rgb(220, 223, 230)" />
        </template>
    </el-input>
</template>
 
<script setup lang="ts">
import { PropType } from 'vue';
 
const props = defineProps({
    size: {
        type: String as PropType<'small' | 'default' | 'large'>,
        default: 'default',
    },
});
 
const emits = defineEmits<{
    (event: 'resetQuery'): void;
    (event: 'query'): void;
}>();
 
const handleQuery = () => {
    emits('query');
};
 
const resetQuery = () => {
    emits('resetQuery');
};
</script>
<style scoped lang="scss"></style>