@@ -25,7 +25,7 @@ const Save = (props: Props) => {
const [form] = Form.useForm();
useEffect(() => {
- if (visible && data) {
+ if (visible && data && Object.keys(data).length) {
form.setFieldsValue({
...data,
});
@@ -17,7 +17,7 @@ interface Props {
model: 'add' | 'edit';
}
-const defaultImage = require('/public/images/device-product.png');
+const defaultImage = '/images/device-product.png';
const Save = (props: Props) => {
const { visible, close, data } = props;
@@ -12,7 +12,7 @@ import styles from '../../Cascade/Save/index.less';
import { useDomFullHeight } from '@/hooks';
const DefaultAccessType = 'gb28181-2016';
-const defaultImage = require('/public/images/device-media.png');
+const defaultImage = '/images/device-media.png';
const Save = () => {
const location: any = useLocation();