Browse Source

调整样式

lex 1 year ago
parent
commit
51ed8c4f7f

+ 6 - 1
src/views/natural-resources/components/my-resources/index.module.less

@@ -16,6 +16,7 @@
 
     :global {
       .n-button {
+        --n-height: 37px !important;
         height: 37px;
         padding: 0 24px;
         font-size: max(18px, 14px);
@@ -94,11 +95,15 @@
     display: flex;
     justify-content: space-between;
     padding-bottom: 24px;
-    padding-top: 3px;
     border-bottom: 1px solid #F2F2F2;
     margin-bottom: 20px;
 
+    .btnGroup {
+      height: 37px;
+    }
+
     .addTrain {
+      --n-height: 37px !important;
       height: 37px;
       border-radius: 8px;
       font-size: 18px;

+ 21 - 20
src/views/natural-resources/components/my-resources/search-group-resources.tsx

@@ -37,9 +37,13 @@ export default defineComponent({
         {
           label: '全部',
           value: ''
-        },
-        ...resourceTypeArray
+        }
       ];
+      resourceTypeArray.forEach((item: any) => {
+        if (item.value !== 'MUSIC') {
+          resourceList.value.push(item);
+        }
+      });
 
       // 获取声部列表
       await catchStore.getSubjects();
@@ -48,26 +52,23 @@ export default defineComponent({
       <div class={styles.searchGroup}>
         <div class={styles.searchCatatory}>
           <NSpace size="small" class={styles.btnType}>
-            {resourceList.value.map(
-              (item: any) =>
-                item.value !== 'MUSIC' && (
-                  <NButton
-                    type={forms.type === item.value ? 'primary' : 'default'}
-                    secondary={forms.type === item.value ? false : true}
-                    round
-                    size="small"
-                    focusable={false}
-                    onClick={() => {
-                      forms.type = item.value;
-                      onSearch();
-                    }}>
-                    {item.label}
-                  </NButton>
-                )
-            )}
+            {resourceList.value.map((item: any) => (
+              <NButton
+                type={forms.type === item.value ? 'primary' : 'default'}
+                secondary={forms.type === item.value ? false : true}
+                round
+                size="small"
+                focusable={false}
+                onClick={() => {
+                  forms.type = item.value;
+                  onSearch();
+                }}>
+                {item.label}
+              </NButton>
+            ))}
           </NSpace>
 
-          <NSpace>
+          <NSpace size="small" class={styles.btnGroup}>
             {state.isEdit ? (
               <>
                 <NButton

+ 2 - 3
src/views/natural-resources/components/share-resources/index.module.less

@@ -135,7 +135,6 @@
   display: flex;
   flex-direction: row;
   align-items: flex-end;
-
 }
 
 .collaoseBtn {
@@ -149,10 +148,10 @@
 }
 
 .collapsSection {
-  padding-top: 10px;
+  // padding-top: 10px;
 }
 
 .isHidden {
   overflow: hidden;
   transition: 1s all ease-in;
-}
+}