日志管理+任务管理
This commit is contained in:
@@ -10,6 +10,8 @@ interface Props {
|
||||
loading?: boolean;
|
||||
tableType?: string;
|
||||
showDelete?: boolean;
|
||||
showExport?: boolean;
|
||||
notShowAdd?: boolean;
|
||||
}
|
||||
|
||||
defineProps<Props>();
|
||||
@@ -18,6 +20,7 @@ interface Emits {
|
||||
(e: 'add'): void;
|
||||
(e: 'delete'): void;
|
||||
(e: 'refresh'): void;
|
||||
(e: 'export'): void;
|
||||
}
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
@@ -37,6 +40,10 @@ function batchDelete() {
|
||||
function refresh() {
|
||||
emit('refresh');
|
||||
}
|
||||
|
||||
function handleExport() {
|
||||
emit('export');
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -49,12 +56,8 @@ function refresh() {
|
||||
<span>{{ $t('common.add') }}</span>
|
||||
</div>
|
||||
</AButton>
|
||||
<APopconfirm
|
||||
v-if="isShowBtn(`system:${tableType}:remove`) && showDelete"
|
||||
:title="$t('common.confirmDelete')"
|
||||
:disabled="disabledDelete"
|
||||
@confirm="batchDelete"
|
||||
>
|
||||
<APopconfirm v-if="isShowBtn(`system:${tableType}:remove`) && showDelete" :title="$t('common.confirmDelete')"
|
||||
:disabled="disabledDelete" @confirm="batchDelete">
|
||||
<AButton size="small" danger :disabled="disabledDelete">
|
||||
<div class="flex-y-center gap-8px">
|
||||
<icon-ic-round-delete class="text-icon" />
|
||||
@@ -69,6 +72,12 @@ function refresh() {
|
||||
<span>{{ $t('common.refresh') }}</span>
|
||||
</div>
|
||||
</AButton>
|
||||
<AButton size="small" type="primary" @click="handleExport" v-show="showExport">
|
||||
<div class="flex-y-center gap-8px">
|
||||
<icon-mdi-refresh class="text-icon" :class="{ 'animate-spin': loading }" />
|
||||
<span>{{ $t('common.export') }}</span>
|
||||
</div>
|
||||
</AButton>
|
||||
<TableColumnSetting v-model:columns="columns" />
|
||||
<slot name="suffix"></slot>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user