Explorar o código

feat:修改一下上传组件

ljc hai 2 meses
pai
achega
4ab521ea50
Modificáronse 1 ficheiros con 50 adicións e 44 borrados
  1. 50 44
      components/cwg-file-picker.vue

+ 50 - 44
components/cwg-file-picker.vue

@@ -16,7 +16,7 @@
                             </template>
                             <template v-else>
                                 <text class="plus">+</text>
-                                <text class="tip">{{ uploadText || t('Common.Upload') }}</text>
+<!--                                <text class="tip">{{ uploadText || t('common.upload') }}</text>-->
                             </template>
                         </view>
                     </slot>
@@ -607,6 +607,55 @@ defineExpose({
                 border: none;
                 background: transparent;
             }
+          .uni-file-picker__files{
+            height: 100%;
+          }
+          .files-button{
+            height: 100%;
+          }
+          .custom-upload-btn {
+            width: 100%!important;
+            height: 100%!important;
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            justify-content: center;
+
+            &.replace-btn {
+              background: rgba(0, 0, 0, 0.03);
+
+              .replace-icon {
+                font-size: 40px;
+                color: #666;
+                margin-bottom: 4px;
+                transform: rotate(90deg);
+              }
+
+              .tip {
+                color: #666;
+              }
+
+              &:hover {
+                background: rgba(234, 32, 39, 0.05);
+
+                .replace-icon,
+                .tip {
+                  color: #ea2027;
+                }
+              }
+            }
+
+            .plus {
+              font-size: 48px;
+              color: #9ca3af;
+              //line-height: 1;
+            }
+
+            .tip {
+              font-size: 24px;
+              color: #6b7280;
+            }
+          }
 
             .file-picker__box-list {
                 display: flex;
@@ -662,50 +711,7 @@ defineExpose({
                     background: #fef2f2;
                 }
 
-                .custom-upload-btn {
-                    width: 100%;
-                    height: 100%;
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    justify-content: center;
-
-                    &.replace-btn {
-                        background: rgba(0, 0, 0, 0.03);
-
-                        .replace-icon {
-                            font-size: 40px;
-                            color: #666;
-                            margin-bottom: 4px;
-                            transform: rotate(90deg);
-                        }
-
-                        .tip {
-                            color: #666;
-                        }
-
-                        &:hover {
-                            background: rgba(234, 32, 39, 0.05);
 
-                            .replace-icon,
-                            .tip {
-                                color: #ea2027;
-                            }
-                        }
-                    }
-
-                    .plus {
-                        font-size: 48px;
-                        color: #9ca3af;
-                        line-height: 1;
-                        margin-bottom: 8px;
-                    }
-
-                    .tip {
-                        font-size: 24px;
-                        color: #6b7280;
-                    }
-                }
 
                 .add-icon {
                     display: none;