shaogen1995 2 anni fa
parent
commit
1bf4dba5da

+ 1 - 1
src/pages/Home/index.tsx

@@ -2,7 +2,7 @@ import { getTokenInfo } from "@/utils/storage";
 import { useCallback, useEffect, useMemo, useRef, useState } from "react";
 import styles from "./index.module.scss";
 import dayjs from "dayjs";
-import { Button, message } from "antd";
+import { Button } from "antd";
 import classNames from "classnames";
 import * as echarts from "echarts/core";
 import { TooltipComponent, GridComponent } from "echarts/components";

+ 3 - 2
src/pages/ObjectSon/Object3/AddObject3/GoodsAll.tsx

@@ -16,8 +16,9 @@ import { MessageFu } from "@/utils/message";
 
 type Props = {
   colsePage: any;
+  addPage:boolean
 };
-function GoodsAll({ colsePage }: Props) {
+function GoodsAll({ colsePage,addPage }: Props) {
   const dispatch = useDispatch();
 
   // 进页面获取列表
@@ -109,7 +110,7 @@ function GoodsAll({ colsePage }: Props) {
   return (
     <div className={styles.GoodsAll}>
       <Modal
-        open={true}
+        open={addPage}
         destroyOnClose
         wrapClassName="GoodsAllModel"
         title="添加藏品"

+ 1 - 1
src/pages/ObjectSon/Object3/AddObject3/index.tsx

@@ -333,7 +333,7 @@ function AddObject3() {
         </div>
       </div>
       {/* 点击添加或者编辑出来的页面 */}
-      {addPage ? <GoodsAll colsePage={() => setAddPage(false)} /> : null}
+      {addPage ? <GoodsAll addPage={addPage} colsePage={() => setAddPage(false)} /> : null}
 
       {/* 点击查看出来的对话框 */}
       {show ? (

+ 3 - 2
src/pages/ObjectSon/Object4/AddObject4/GoodsAll.tsx

@@ -16,8 +16,9 @@ import { MessageFu } from "@/utils/message";
 
 type Props = {
   colsePage: any;
+  addPage: boolean;
 };
-function GoodsAll({ colsePage }: Props) {
+function GoodsAll({ colsePage, addPage }: Props) {
   const dispatch = useDispatch();
 
   // 进页面获取列表
@@ -108,7 +109,7 @@ function GoodsAll({ colsePage }: Props) {
   return (
     <div className={styles.GoodsAll}>
       <Modal
-        open={true}
+        open={addPage}
         destroyOnClose
         wrapClassName="GoodsAllModel"
         title="添加藏品"

+ 1 - 1
src/pages/ObjectSon/Object4/AddObject4/index.tsx

@@ -346,7 +346,7 @@ function AddObject4() {
         </div>
       </div>
       {/* 点击添加或者编辑出来的页面 */}
-      {addPage ? <GoodsAll colsePage={() => setAddPage(false)} /> : null}
+      {addPage ? <GoodsAll addPage={addPage} colsePage={() => setAddPage(false)} /> : null}
 
       {/* 点击查看出来的对话框 */}
       {show ? (