diff --git a/nkebao/src/pages/scenarios/NewPlan.tsx b/nkebao/src/pages/scenarios/NewPlan.tsx
index fb734578..45a5f3db 100644
--- a/nkebao/src/pages/scenarios/NewPlan.tsx
+++ b/nkebao/src/pages/scenarios/NewPlan.tsx
@@ -3,6 +3,8 @@ import { useNavigate, useSearchParams } from 'react-router-dom';
import { Check, Settings } from 'lucide-react';
import PageHeader from '@/components/PageHeader';
import { useToast } from '@/components/ui/toast';
+import Layout from '@/components/Layout';
+import '@/components/Layout.css';
// 步骤定义
const steps = [
@@ -134,33 +136,55 @@ export default function NewPlan() {
setCurrentStep((prev) => Math.max(prev - 1, 1));
};
- // 步骤指示器组件
- const StepIndicator = ({ steps, currentStep }: { steps: any[], currentStep: number }) => (
-
- {steps.map((step, index) => (
-
-
step.id
- ? 'bg-green-500 text-white'
- : currentStep === step.id
- ? 'bg-blue-500 text-white'
- : 'bg-gray-200 text-gray-500'
- }`}>
- {currentStep > step.id ?
: step.id}
+ // 步骤指示器组件(方案A:简洁线性进度条风格)
+ const StepIndicator = ({ steps, currentStep }: { steps: any[], currentStep: number }) => {
+ const percent = ((currentStep - 1) / (steps.length - 1)) * 100;
+ return (
+
+ {/* 进度条 */}
+
+
+
+ {/* 圆点 */}
+
+ {steps.map((step, idx) => {
+ const isActive = currentStep === step.id;
+ const isDone = currentStep > step.id;
+ return (
+
+
+ {isDone ? : {step.id}}
+
+
+ );
+ })}
-
-
{step.title}
-
{step.subtitle}
-
- {index < steps.length - 1 && (
-
step.id ? 'bg-green-500' : 'bg-gray-200'
- }`} />
- )}
- ))}
-
- );
+ {/* 步骤文字 */}
+
+ {steps.map((step, idx) => {
+ const isActive = currentStep === step.id;
+ const isDone = currentStep > step.id;
+ return (
+
+ {step.title}
+ {step.subtitle}
+
+ );
+ })}
+
+
+ );
+ };
// 基础设置步骤
const BasicSettings = () => {
@@ -393,8 +417,8 @@ export default function NewPlan() {
};
return (
-
-
+
}
/>
-
- {/* 添加pt-16来避免被固定导航栏遮挡 */}
-
-
+ }
+ >
+
+
+
-
{renderStepContent()}
-
+
);
}
\ No newline at end of file