浏览代码

🐛添加藏品必填字段输入空格问题

shaogen1995 2 年之前
父节点
当前提交
b9b6d03c75

+ 3 - 0
src/assets/styles/base.css

@@ -44,6 +44,9 @@ ul {
   overflow-y: auto;
 
 }
+body {
+  overflow-y: overlay;
+}
 
 /* 文本域取消下拉 */
 textarea {

+ 2 - 0
src/components/ObjectAdd/index.tsx

@@ -560,6 +560,7 @@ function ObjectAdd({ id, colsePage, editId, dirCode, upInfoAPIFu }: Props) {
                 label="藏品名称"
                 name="name"
                 rules={[{ required: true, message: "不能为空!" }]}
+                getValueFromEvent={(e) => e.target.value.replace(/\s+/g, "")}
               >
                 <Input maxLength={50} showCount placeholder="请输入" />
               </Form.Item>
@@ -694,6 +695,7 @@ function ObjectAdd({ id, colsePage, editId, dirCode, upInfoAPIFu }: Props) {
                 label="具体尺寸"
                 name="sizeSpecific"
                 rules={[{ required: true, message: "不能为空!" }]}
+                getValueFromEvent={(e) => e.target.value.replace(/\s+/g, "")}
               >
                 <Input maxLength={50} showCount placeholder="请输入" />
               </Form.Item>

+ 1 - 2
src/pages/ObjectSon/Object3/LookObject3/index.tsx

@@ -4,7 +4,7 @@ import ImageLazy from "@/components/ImageLazy";
 import LookModal from "@/components/LookObjTable/LookModal";
 import { RootState } from "@/store";
 import { object3infoOutAPI } from "@/store/action/object3";
-import { obj3InStorage, statusObj, storageStatusObj } from "@/utils/dataChange";
+import { obj3InStorage, statusObj } from "@/utils/dataChange";
 import history, { urlParameter } from "@/utils/history";
 import { Button, Table } from "antd";
 import React, {
@@ -101,7 +101,6 @@ function LookObject3() {
       },
       {
         title: "入库状态",
-        // render: (item: any) => storageStatusObj[item.storageStatus],
         render: (item: any) =>
           info.statusTxt === "已完成" ? "已入库" : "未入库",
       },