fix: 公司概览页时间选择器响应式适配

This commit is contained in:
小蟑螂
2026-03-27 08:09:11 +08:00
parent 05c02bdd85
commit c94f60cfeb
@@ -533,16 +533,16 @@ const handleExportSelectedShops = async () => {
</template>
<template #extra>
<!-- 时间选择器 -->
<!-- 时间选择器 - 响应式适配 -->
<div
class="flex items-center gap-2 rounded-2xl border border-slate-200 bg-slate-200/50 p-1.5"
class="flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-2 rounded-2xl border border-slate-200 bg-slate-200/50 p-1.5"
>
<!-- 快速选择按钮组 -->
<div class="flex items-center gap-1 rounded-xl bg-white/30 p-1">
<div class="flex items-center gap-1 rounded-xl bg-white/30 p-1 overflow-x-auto">
<Button
type="text"
size="small"
class="!h-auto !min-w-0 !rounded-xl !border-none !px-5 !py-2 !text-sm !font-bold !shadow-none !transition-colors"
class="!h-auto !min-w-0 !rounded-xl !border-none !px-3 !py-2 !text-sm !font-bold !shadow-none !transition-colors sm:!px-5"
:class="
activeTimeRange === 'today'
? '!bg-white !text-blue-600 !shadow-sm'
@@ -555,7 +555,7 @@ const handleExportSelectedShops = async () => {
<Button
type="text"
size="small"
class="!h-auto !min-w-0 !rounded-xl !border-none !px-5 !py-2 !text-sm !font-bold !shadow-none !transition-colors"
class="!h-auto !min-w-0 !rounded-xl !border-none !px-3 !py-2 !text-sm !font-bold !shadow-none !transition-colors sm:!px-5"
:class="
activeTimeRange === 'yesterday'
? '!bg-white !text-blue-600 !shadow-sm'
@@ -568,7 +568,7 @@ const handleExportSelectedShops = async () => {
<Button
type="text"
size="small"
class="!h-auto !min-w-0 !rounded-xl !border-none !px-5 !py-2 !text-sm !font-bold !shadow-none !transition-colors"
class="!h-auto !min-w-0 !rounded-xl !border-none !px-3 !py-2 !text-sm !font-bold !shadow-none !transition-colors sm:!px-5"
:class="
activeTimeRange === '7days'
? '!bg-white !text-blue-600 !shadow-sm'
@@ -581,7 +581,7 @@ const handleExportSelectedShops = async () => {
<Button
type="text"
size="small"
class="!h-auto !min-w-0 !rounded-xl !border-none !px-5 !py-2 !text-sm !font-bold !shadow-none !transition-colors"
class="!h-auto !min-w-0 !rounded-xl !border-none !px-3 !py-2 !text-sm !font-bold !shadow-none !transition-colors sm:!px-5"
:class="
activeTimeRange === '30days'
? '!bg-white !text-blue-600 !shadow-sm'
@@ -592,17 +592,17 @@ const handleExportSelectedShops = async () => {
近30日
</Button>
</div>
<!-- 分隔线 -->
<div class="h-6 w-px bg-slate-300"></div>
<!-- 分隔线 - 移动端隐藏 -->
<div class="hidden h-6 w-px bg-slate-300 sm:block"></div>
<!-- 自定义日期选择器 -->
<div class="flex items-center gap-2 rounded-xl bg-white/30 px-3 py-1.5">
<span class="text-xs font-bold text-slate-400">自定义日期</span>
<span class="hidden text-xs font-bold text-slate-400 sm:inline">自定义日期</span>
<DatePicker.RangePicker
v-model:value="customDateRange"
size="small"
format="YYYY-MM-DD"
:allow-clear="false"
:placeholder="['开始日期', '结束日期']"
:placeholder="['开始', '结束']"
class="!border-none !bg-transparent !text-sm !font-bold"
@change="handleCustomDateRangeChange"
/>