Pārlūkot izejas kodu

fix(组件): 若干的bugs

gemercheung 2 gadi atpakaļ
vecāks
revīzija
ce70f886c2

+ 8 - 3
src/components/Cropper/src/CopperModal.vue

@@ -6,6 +6,7 @@
     width="800px"
     :canFullscreen="false"
     @ok="handleOk"
+    @cancel="handleCancel"
     :okText="t('component.cropper.okText')"
   >
     <div :class="prefixCls">
@@ -156,9 +157,7 @@
       const { t } = useI18n();
 
       watchEffect(() => {
-        if (props.src) {
-          src.value = props.src;
-        }
+        src.value = props.src;
       });
 
       // Block upload
@@ -226,6 +225,11 @@
           }
         }
       }
+      function handleCancel() {
+        // debugger;
+        src.value = '';
+        previewSource.value = '';
+      }
 
       return {
         t,
@@ -238,6 +242,7 @@
         handleReady,
         handlerToolbar,
         handleOk,
+        handleCancel,
       };
     },
   });

+ 1 - 1
src/components/Table/src/components/TableImg.vue

@@ -57,7 +57,7 @@
       const getWrapStyle = computed((): CSSProperties => {
         const { size } = props;
         const s = `${size}px`;
-        return { height: s, width: s };
+        return { height: s, width: s, overflow: 'hidden' };
       });
 
       const { prefixCls } = useDesign('basic-table-img');

+ 1 - 0
src/layouts/default/header/components/lock/LockModal.vue

@@ -53,6 +53,7 @@
           {
             field: 'password',
             label: t('layout.header.lockScreenPassword'),
+            labelWidth: 80,
             colProps: {
               span: 24,
             },

+ 2 - 0
src/views/staff/detailsModal.vue

@@ -381,6 +381,7 @@
         closeModal();
         resetFields();
       }
+      async function handleUpclose() {}
 
       return {
         register,
@@ -391,6 +392,7 @@
         handleOk,
         resetFields,
         permListOptions,
+        handleUpclose,
       };
     },
   });