From c6fd00bb2651c3db41de9137938d8a247c0923fa Mon Sep 17 00:00:00 2001 From: lishenfeng Date: Fri, 27 Dec 2024 10:55:33 +0800 Subject: [PATCH] =?UTF-8?q?fix():=20=E8=A1=A8=E5=8D=95=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/TestLine/createData.js | 10 ++++++++-- src/views/TestLine/index.js | 10 +++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/views/TestLine/createData.js b/src/views/TestLine/createData.js index fedf418..1249eb9 100644 --- a/src/views/TestLine/createData.js +++ b/src/views/TestLine/createData.js @@ -1,4 +1,4 @@ -import { Button, Form, Input, Popconfirm, Table } from 'antd'; +import { Button, Form, Input, InputNumber, Popconfirm, Table } from 'antd'; import React, { useContext, useEffect, useRef, useState } from 'react'; const EditableContext = React.createContext(null); const EditableRow = ({ index, ...props }) => { @@ -60,8 +60,14 @@ const EditableCell = ({ margin: 0, }} name={dataIndex} + rules={[ + { + required: true, + message: `${title}必填`, + }, + ]} > - + ) : (
{ - const all = editData.some(item => !item.drp) - if (all) { - message.error("所有雨量不能为空") - return - } + // const all = editData.some(item => !item.drp) + // if (all) { + // message.error("所有雨量不能为空") + // return + // } try { const newTabl = editData.map(item => ({ ...item,