fix(ecom-dmb): 订单导入页深色模式适配

This commit is contained in:
小蟑螂
2026-04-18 01:48:20 +08:00
parent acc4aa4b4e
commit e296ba084c
2 changed files with 31 additions and 12 deletions
@@ -101,9 +101,9 @@ const handleFileSelect = (e: Event) => {
<template>
<Spin :spinning="loading" tip="正在解析文件...">
<div
class="rounded-lg border-2 border-dashed border-gray-300 p-8 text-center transition-colors"
class="rounded-lg border-2 border-dashed border-gray-300 dark:border-[hsl(240deg_3.7%_22%)] p-8 text-center transition-colors"
:class="{
'border-blue-500 bg-blue-50': isDragOver && !loading,
'border-blue-500 bg-blue-50 dark:bg-[hsl(240deg_3.7%_15.9%/20%)]': isDragOver && !loading,
'cursor-not-allowed opacity-60': loading,
}"
@dragover.prevent="!loading && handleDragOver($event)"
@@ -114,7 +114,7 @@ const handleFileSelect = (e: Event) => {
<div class="relative mx-auto h-12 w-12">
<UploadIcon
v-if="!loading"
class="h-12 w-12 text-gray-400"
class="h-12 w-12 text-gray-400 dark:text-[hsl(240deg_5%_64.9%)]"
:class="{ 'text-blue-500': isDragOver }"
/>
<LoaderIcon v-else class="h-12 w-12 animate-spin text-blue-500" />
@@ -122,7 +122,7 @@ const handleFileSelect = (e: Event) => {
<div>
<p
class="text-lg font-medium"
:class="loading ? 'text-gray-500' : 'text-gray-700'"
:class="loading ? 'text-gray-500 dark:text-[hsl(240deg_5%_64.9%)]' : 'text-gray-700 dark:text-[hsl(0deg_0%_95%)]'"
>
{{
loading
@@ -130,7 +130,7 @@ const handleFileSelect = (e: Event) => {
: '拖拽CSV文件到此处或点击上传'
}}
</p>
<p v-if="!loading" class="text-sm text-gray-500">
<p v-if="!loading" class="text-sm text-gray-500 dark:text-[hsl(240deg_5%_64.9%)]">
支持.csv格式,最大10MB
</p>
</div>
@@ -166,4 +166,14 @@ const handleFileSelect = (e: Event) => {
border-color: #1890ff !important;
background-color: #f0f8ff !important;
}
:deep(.border-dashed:hover) {
border-color: #1890ff !important;
background-color: #f0f8ff !important;
}
html.dark .border-dashed:hover {
border-color: hsl(240deg 3.7% 40%) !important;
background-color: hsl(240deg 3.7% 15.9% / 15%) !important;
}
</style>
@@ -235,14 +235,14 @@ onUnmounted(() => {
</script>
<template>
<div class="h-full overflow-hidden bg-slate-100 p-8">
<div class="h-full overflow-hidden bg-slate-100 dark:bg-[hsl(222.34deg_10.43%_12.27%)] p-8">
<div class="mx-auto flex h-full w-[60%] flex-col overflow-hidden">
<!-- 头部标题 -->
<div class="mb-12 shrink-0 text-center">
<h1 class="mb-2 text-4xl font-black tracking-tight text-slate-800">
<h1 class="mb-2 text-4xl font-black tracking-tight text-slate-800 dark:text-[hsl(0deg_0%_95%)]">
订单导入中心
</h1>
<p class="text-base font-medium text-slate-500">
<p class="text-base font-medium text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">
请上传 CSV 格式的订单原始数据进行分析
</p>
</div>
@@ -255,7 +255,7 @@ onUnmounted(() => {
<div class="mb-8 shrink-0">
<!-- 导入区域 -->
<div
class="relative flex min-h-[400px] flex-col items-center justify-center overflow-hidden rounded-[2rem] border border-white/50 bg-white/45 p-8 shadow-[0_25px_50px_-12px_rgba(0,0,0,0.1)] backdrop-blur-2xl"
class="relative flex min-h-[400px] flex-col items-center justify-center overflow-hidden rounded-[2rem] border border-white/50 bg-white/45 dark:border-[hsl(240deg_3.7%_22%/50%)] dark:bg-[hsl(222.34deg_10.43%_12.27%/80%)] p-8 shadow-[0_25px_50px_-12px_rgba(0,0,0,0.1)] dark:shadow-none backdrop-blur-2xl"
>
<div
class="absolute -right-10 -top-10 h-32 w-32 rounded-full bg-indigo-400 opacity-10 blur-3xl"
@@ -278,8 +278,8 @@ onUnmounted(() => {
class="mb-6 flex shrink-0 flex-wrap items-start justify-between gap-4"
>
<div class="flex-1">
<h2 class="mb-1 text-2xl font-bold text-slate-800">数据预览</h2>
<p class="m-0 text-sm text-slate-500">
<h2 class="mb-1 text-2xl font-bold text-slate-800 dark:text-[hsl(0deg_0%_95%)]">数据预览</h2>
<p class="m-0 text-sm text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">
共 {{ csvData.length }} 条数据,请检查数据后创建导入任务
</p>
</div>
@@ -292,7 +292,7 @@ onUnmounted(() => {
</div>
<div
ref="tableContainerRef"
class="flex min-h-0 flex-1 flex-col overflow-hidden rounded-[2rem] border border-white/50 bg-white/45 p-6 shadow-[0_25px_50px_-12px_rgba(0,0,0,0.1)] backdrop-blur-2xl"
class="flex min-h-0 flex-1 flex-col overflow-hidden rounded-[2rem] border border-white/50 bg-white/45 dark:border-[hsl(240deg_3.7%_22%/50%)] dark:bg-[hsl(222.34deg_10.43%_12.27%/80%)] p-6 shadow-[0_25px_50px_-12px_rgba(0,0,0,0.1)] dark:shadow-none backdrop-blur-2xl"
>
<Grid />
</div>
@@ -330,6 +330,15 @@ onUnmounted(() => {
background: rgba(99, 102, 241, 0.05) !important;
}
html.dark :deep(.border-dashed) {
border-color: hsl(240deg 3.7% 30%);
}
html.dark :deep(.border-dashed:hover) {
border-color: #818cf8;
background: hsl(240deg 3.7% 15.9% / 15%);
}
/* VxeGrid 表格样式 */
:deep(.vxe-grid) {
flex: 1;