Преглед изворни кода

Merge branch 'iteration-oss-up' into jenkins

lex пре 1 година
родитељ
комит
c20560a149
1 измењених фајлова са 3 додато и 7 уклоњено
  1. 3 7
      src/components/upload-file/copper.tsx

+ 3 - 7
src/components/upload-file/copper.tsx

@@ -37,7 +37,6 @@ export default defineComponent({
       const { options } = state;
       state.visible = true;
       state.options = Object.assign({}, options, record);
-
       nextTick(() => {
         initImgCropper();
       });
@@ -98,12 +97,9 @@ export default defineComponent({
         <NGrid cols={2} xGap={24} style={{ paddingTop: '12px' }}>
           <NGi>
             <div style="width: 100%; height: 300px">
-              <img
-                ref={imgCropper}
-                id="myImages"
-                src={state.options.img}
-                alt=""
-              />
+              {state.options?.img && (
+                <img ref={imgCropper} src={state.options?.img} alt="" />
+              )}
             </div>
 
             <NSpace justify="center" style={{ paddingTop: '12px' }}>