Commit 2daf2b78 authored by 李纪文's avatar 李纪文

fix: 修改图片选择器

parent a9d3803e
import React, { useContext, useState } from 'react';
import React, { useContext, useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Input, Image, Modal, Row, Col, ConfigProvider } from 'antd';
......@@ -21,6 +21,10 @@ const ImageSelect = ({ src, url, width, title, dataSource, onSearch, onSelect })
const [visible, setVisible] = useState(false);
const [imgSrc, setImgSrc] = useState(src);
useEffect(() => {
setImgSrc(src);
}, [src]);
// 展示模态框
const showModal = () => {
setVisible(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment