From b785998c4df87ef55049c4d4623a476afb4115df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=94=E8=AE=B0=E6=9C=AC=E9=87=8C=E7=9A=84=E6=B0=B8?= =?UTF-8?q?=E5=B9=B3?= Date: Wed, 9 Jul 2025 19:32:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=AC=E6=AC=A1=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9=E5=A6=82=E4=B8=8B=20?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E5=99=A8=E6=94=B9=E5=A5=BD=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../new/components/step-indicator.tsx | 39 ++++++++++++------- .../traffic-distribution/NewDistribution.tsx | 37 +++++++++--------- .../TrafficDistribution.tsx | 8 ---- 3 files changed, 43 insertions(+), 41 deletions(-) diff --git a/Cunkebao/app/workspace/traffic-distribution/new/components/step-indicator.tsx b/Cunkebao/app/workspace/traffic-distribution/new/components/step-indicator.tsx index c9f5916a3..c381ed17e 100644 --- a/Cunkebao/app/workspace/traffic-distribution/new/components/step-indicator.tsx +++ b/Cunkebao/app/workspace/traffic-distribution/new/components/step-indicator.tsx @@ -17,22 +17,31 @@ interface StepIndicatorProps { export default function StepIndicator({ currentStep, steps }: StepIndicatorProps) { return ( -
- {steps.map((step, index) => ( -
-
- {step.icon} +
+ {/* 连接线 */} +
+ + {steps.map((step, index) => { + const isCompleted = index < currentStep + const isActive = index === currentStep + + return ( +
+
+ {step.icon} +
+ + {step.title} +
- - {step.title} - -
- ))} + ) + })}
) } diff --git a/nkebao/src/pages/workspace/traffic-distribution/NewDistribution.tsx b/nkebao/src/pages/workspace/traffic-distribution/NewDistribution.tsx index 6c7c594db..23be78bb2 100644 --- a/nkebao/src/pages/workspace/traffic-distribution/NewDistribution.tsx +++ b/nkebao/src/pages/workspace/traffic-distribution/NewDistribution.tsx @@ -8,6 +8,8 @@ import { Settings, Search, } from 'lucide-react'; +import { Steps, StepItem } from 'tdesign-mobile-react'; // 添加这一行 +import 'tdesign-mobile-react/es/style/index.css'; // 添加这一行 import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; @@ -88,21 +90,20 @@ interface TrafficPool { // 步骤指示器组件 function StepIndicator({ currentStep, steps }: StepIndicatorProps) { return ( -
- {steps.map((step, index) => ( -
-
- {step.icon} -
- - {step.title} - -
- ))} +
+ + {steps.map((step, index) => ( + + ))} +
); } @@ -336,7 +337,7 @@ function TargetSettingsStep({ onNext, onBack, initialData = {} }: TargetSettings key={device.id} className={`cursor-pointer border ${selectedDevices.includes(device.id) ? "border-blue-500" : "border-gray-200"}`} > - +
toggleDevice(device.id)}>
- -
toggleCustomerService(cs.id)}> + +
toggleCustomerService(cs.id)}>