liushengqiang 1 year ago
parent
commit
4959d517b7
2 changed files with 29 additions and 25 deletions
  1. 2 1
      src/views/schedule-manage/index.module.less
  2. 27 24
      src/views/schedule-manage/index.tsx

+ 2 - 1
src/views/schedule-manage/index.module.less

@@ -122,7 +122,8 @@
   height: 60px;
   :global {
     .van-search {
-      flex: 1
+      flex: 1;
+      padding-left: 0;
     }
 
     .van-dropdown-menu {

+ 27 - 24
src/views/schedule-manage/index.tsx

@@ -264,13 +264,13 @@ export default defineComponent({
                   console.log('触底', todoData.completeResh);
                   getComplete();
                 }}>
-                {todoData.completeSkelet && (
+                {todoData.completeSkelet ? (
                   <div class={[styles.list, styles.listHide]}>
                     <Skeleton loading={true}>
                       {{
                         template: () => (
                           <div style={{ width: '100%' }}>
-                            {new Array(10).fill(1).map((item: any) => (
+                            {new Array(4).fill(1).map((item: any) => (
                               <SkeletionItem />
                             ))}
                           </div>
@@ -278,28 +278,31 @@ export default defineComponent({
                       }}
                     </Skeleton>
                   </div>
-                )}
-                {todoData.completeList.map(item => (
-                  <ListItem
-                    item={item}
-                    isLink={true}
-                    onGoto={() => handleGoto(item)}
-                    status={
-                      item.status === 'PASS'
-                        ? 'success'
-                        : item.status === 'REJECT'
-                        ? 'error'
-                        : ''
-                    }
-                  />
-                ))}
-                {!todoData.completeList.length && (
-                  <MEmpty
-                    description="暂无数据"
-                    style={{
-                      minHeight: '100%'
-                    }}
-                  />
+                ) : (
+                  <>
+                    {todoData.completeList.map(item => (
+                      <ListItem
+                        item={item}
+                        isLink={true}
+                        onGoto={() => handleGoto(item)}
+                        status={
+                          item.status === 'PASS'
+                            ? 'success'
+                            : item.status === 'REJECT'
+                            ? 'error'
+                            : ''
+                        }
+                      />
+                    ))}
+                    {!todoData.completeList.length && (
+                      <MEmpty
+                        description="暂无数据"
+                        style={{
+                          minHeight: '100%'
+                        }}
+                      />
+                    )}
+                  </>
                 )}
               </List>
             </MFullRefresh>