mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 07:49:19 +08:00
feat: 新增导入功能
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
|
||||
import { createIconifyIcon } from '@vben/icons';
|
||||
|
||||
import { Button } from 'ant-design-vue';
|
||||
|
||||
import { useImportTaskStore } from '#/store';
|
||||
|
||||
import ImportTaskDropdown from './ImportTaskDropdown.vue';
|
||||
|
||||
defineOptions({ name: 'ImportTaskButton' });
|
||||
|
||||
// 创建下载图标组件
|
||||
const DownloadIcon = createIconifyIcon('lucide:download');
|
||||
|
||||
const importTaskStore = useImportTaskStore();
|
||||
|
||||
// 计算属性:是否有进行中的任务
|
||||
const hasActiveTasks = computed(() => importTaskStore.hasActiveTasks);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ImportTaskDropdown>
|
||||
<template #trigger>
|
||||
<div class="flex-center mr-2 h-full">
|
||||
<Button type="text" shape="circle" class="relative">
|
||||
<template #icon>
|
||||
<DownloadIcon class="size-4" />
|
||||
</template>
|
||||
<span
|
||||
v-if="hasActiveTasks"
|
||||
class="bg-primary absolute right-0.5 top-0.5 h-2 w-2 rounded"
|
||||
></span>
|
||||
</Button>
|
||||
</div>
|
||||
</template>
|
||||
</ImportTaskDropdown>
|
||||
</template>
|
||||
Reference in New Issue
Block a user