缺陷优化

This commit is contained in:
2025-10-19 18:27:30 +08:00
parent 506f857dc9
commit a3c3087e46
5 changed files with 63 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
import React, { useState, useEffect, useCallback } from "react";
import React, { useState, useEffect } from "react";
import CommonPopup from "@/components/CommonPopup";
import { View, Text, Image } from "@tarojs/components";
import { View } from "@tarojs/components";
import Picker from "./Picker";
import {
renderYearMonth,
@@ -9,7 +9,7 @@ import {
} from "./PickerData";
import NTRPTestEntryCard from "../NTRPTestEntryCard";
import { EvaluateScene } from "@/store/evaluateStore";
import imgs from "@/config/images";
// import imgs from "@/config/images";
import styles from "./index.module.scss";
interface PickerOption {
text: string | number;
@@ -27,7 +27,7 @@ interface PickerProps {
options?: PickerOption[][] | PickerOption[];
value?: (string | number)[];
type?: "month" | "day" | "hour" | "ntrp" | null;
img?: string;
// img?: string;
onConfirm?: (options: PickerOption[], values: (string | number)[]) => void;
onChange?: (value: (string | number)[]) => void;
style?: React.CSSProperties;
@@ -42,7 +42,7 @@ const PopupPicker = ({
visible,
setvisible,
value = [],
img,
// img,
onConfirm,
onChange,
options = [],
@@ -54,7 +54,6 @@ const PopupPicker = ({
const changePicker = (options: any[], values: any, columnIndex: number) => {
if (onChange) {
console.log("picker onChange", columnIndex, values, options);
if (
type === "day" &&
JSON.stringify(defaultValue) !== JSON.stringify(values)
@@ -79,7 +78,6 @@ const PopupPicker = ({
};
const handleConfirm = () => {
console.log(defaultValue, "defaultValue");
onChange(defaultValue);
setvisible(false);
};