style(sj_map_reduce): 优化日志刷新频率样式

This commit is contained in:
xlsea 2024-06-26 15:51:09 +08:00
parent c366c22881
commit 03f6db667a
2 changed files with 15 additions and 7 deletions

View File

@ -166,9 +166,13 @@ function openNewTab() {
const handleSyncSelect = async (time: number) => {
if (time === -1) {
if (finished.value) {
finished.value = false;
await getLogList();
}
return;
}
if (time === 0) {
stopLog();
return;
@ -282,12 +286,14 @@ const SnailLogComponent = defineComponent({
<span class="ml-6px">{{ title }}</span>
<ButtonIcon icon="hugeicons:share-01" tooltip-content="在新标签页打开" class="ml-6px" @click="openNewTab" />
<NDropdown trigger="hover" :options="syncOptions" @select="handleSyncSelect">
<NTooltip>
<NTooltip placement="right">
<template #trigger>
<NButton quaternary class="ml-3px" @click="handleSyncSelect(-1)">
<NButton quaternary class="ml-3px w-136px" @click="handleSyncSelect(-1)">
<template #icon>
<div class="flex-center gap-8px">
<icon-solar:refresh-outline class="text-18px" />
{{ syncOptions.filter(item => item.key === syncTime)[0].label }}
<SvgIcon icon="material-symbols:expand-more-rounded" />
</div>
</template>
</NButton>
@ -304,12 +310,14 @@ const SnailLogComponent = defineComponent({
<template #header-extra>
<div class="flex items-center">
<NDropdown trigger="hover" :options="syncOptions" @select="handleSyncSelect">
<NTooltip>
<NTooltip placement="right">
<template #trigger>
<NButton quaternary class="ml-3px" @click="handleSyncSelect(-1)">
<NButton quaternary class="ml-3px w-136px" @click="handleSyncSelect(-1)">
<template #icon>
<div class="flex-center gap-8px">
<icon-solar:refresh-outline class="text-18px" />
{{ syncOptions.filter(item => item.key === syncTime)[0].label }}
<SvgIcon icon="material-symbols:expand-more-rounded" />
</div>
</template>
</NButton>

View File

@ -41,7 +41,7 @@ const title = computed(() => {
</script>
<template>
<div>
<div class="h-full">
<LogDrawer :drawer="false" :title="title" :type="type" :task-data="taskData" />
</div>
</template>