mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 11:49:19 +08:00
feat: 添加表格列说明提示(列标题 Hover 气泡)
- 新增 OverviewColumnHint 组件,支持列标题 hover 气泡提示 - 新增 overview-table-hints.ts 定义各列计算口径说明 - 店铺对比表、商品对比表、品类对比表、商品规格汇总表均已接入 - 说明内容包括:目标单量/金额、达成率、推广费、刷单费、税前盈亏、税额等
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
|
||||
import { createIconifyIcon } from '@vben/icons';
|
||||
import { Tooltip } from 'ant-design-vue';
|
||||
|
||||
const HelpIcon = createIconifyIcon('lucide:circle-help');
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** 深色底表头(如「税后盈亏」列)上的浅色问号 */
|
||||
light?: boolean;
|
||||
title: string;
|
||||
}>(),
|
||||
{ light: false },
|
||||
);
|
||||
|
||||
const iconWrapClass = computed(() =>
|
||||
props.light
|
||||
? 'inline-flex shrink-0 cursor-help text-emerald-100 transition-colors hover:text-white dark:text-emerald-100 dark:hover:text-white'
|
||||
: 'inline-flex shrink-0 cursor-help text-slate-400 transition-colors hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300',
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span class="inline-flex max-w-full items-center gap-1">
|
||||
<span class="min-w-0"><slot /></span>
|
||||
<Tooltip :title="title" placement="topLeft">
|
||||
<span
|
||||
:class="iconWrapClass"
|
||||
tabindex="0"
|
||||
role="img"
|
||||
aria-label="列说明"
|
||||
@click.prevent
|
||||
>
|
||||
<HelpIcon class="size-[14px]" />
|
||||
</span>
|
||||
</Tooltip>
|
||||
</span>
|
||||
</template>
|
||||
Reference in New Issue
Block a user