-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathActionFooter.vue
More file actions
37 lines (34 loc) · 1010 Bytes
/
Copy pathActionFooter.vue
File metadata and controls
37 lines (34 loc) · 1010 Bytes
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
34
35
36
37
<template>
<div class="action-footer">
<a-space wrap size="small">
<a-button v-if="showCancel" size="small" @click="emit('cancel')">
{{ cancelText }}
</a-button>
<a-button v-if="showReset" size="small" @click="emit('reset')">
{{ resetText }}
</a-button>
<a-button v-if="showOk" type="primary" size="small" :disabled="disabled" @click="emit('ok')">
{{ okText }}
</a-button>
</a-space>
</div>
</template>
<script setup>
defineProps({
showOk: { type: Boolean, default: true },
showCancel: { type: Boolean, default: true },
showReset: { type: Boolean, default: false },
disabled: { type: Boolean, default: false },
okText: { type: String, default: '确定' },
cancelText: { type: String, default: '取消' },
resetText: { type: String, default: '重置' }
})
const emit = defineEmits(['ok', 'cancel', 'reset'])
</script>
<style scoped>
.action-footer {
display: flex;
justify-content: flex-end;
width: 100%;
}
</style>