Browse Source

更新打包

lex 1 year ago
parent
commit
369c89fa7f

File diff suppressed because it is too large
+ 8927 - 1
package-lock.json


+ 12 - 8
src/components/TheNoticeBar/index.tsx

@@ -9,7 +9,7 @@ export default defineComponent({
       default: ''
     },
     isAnimation: {
-      type: Boolean,  
+      type: Boolean,
       default: false
     }
   },
@@ -49,7 +49,7 @@ export default defineComponent({
         requestAnimationFrame(() => {
           requestAnimationFrame(() => {
             startAnimate();
-          })
+          });
         });
       }, 5 * 1000);
     };
@@ -60,13 +60,17 @@ export default defineComponent({
       notiData.contentStyle.transform = 'translateX(0px)';
       notiData.time = null;
     };
-    watch(() => props.isAnimation, (val) => {
-      if (val) {
-        init();
-      } else {
-        stopAnimate();
+    watch(
+      () => props.isAnimation,
+      val => {
+        console.log(props.isAnimation, 'animation');
+        if (val) {
+          init();
+        } else {
+          stopAnimate();
+        }
       }
-    })
+    );
     return () => (
       <div
         ref={wrapRef}

+ 1 - 3
src/components/card-type/index.module.less

@@ -76,11 +76,9 @@
       padding-left: 6px;
       font-size: 16px;
       max-width: 180px;
-      white-space: nowrap;
-      overflow: hidden;
-      text-overflow: ellipsis;
       color: #131415;
       font-weight: 600;
+      flex: 1;
     }
   }
 

+ 13 - 3
src/components/card-type/index.tsx

@@ -1,4 +1,4 @@
-import { PropType, defineComponent } from 'vue';
+import { PropType, defineComponent, ref } from 'vue';
 import styles from './index.module.less';
 import { NButton, NCard, NImage } from 'naive-ui';
 import iconImage from '@common/images/icon-image.png';
@@ -51,6 +51,7 @@ export default defineComponent({
    */
   emits: ['click', 'collect', 'add'],
   setup(props, { emit }) {
+    const isAnimation = ref(false);
     const formatType = (type: string) => {
       let typeImg = iconImage;
       switch (type) {
@@ -73,7 +74,13 @@ export default defineComponent({
     return () => (
       <div
         onClick={() => emit('click', props.item)}
-        class={[styles['card-section']]}>
+        class={[styles['card-section']]}
+        onMouseenter={() => {
+          isAnimation.value = true;
+        }}
+        onMouseleave={() => {
+          isAnimation.value = false;
+        }}>
         <NCard
           class={[
             styles['card-section'],
@@ -99,7 +106,10 @@ export default defineComponent({
                     objectFit="cover"
                   />
                   <span class={styles.titleContent}>
-                    <TheNoticeBar text={props.item.title} />
+                    <TheNoticeBar
+                      isAnimation={isAnimation.value}
+                      text={props.item.title}
+                    />
                   </span>
                 </div>
                 {/* 收藏 */}

+ 1 - 1
src/views/attend-class/index.module.less

@@ -266,7 +266,7 @@
 
   :global {
     .n-drawer-body-content-wrapper {
-      padding: 0px !important;
+      padding: 8px 0px 0px !important;
       text-align: center;
 
       &>div {

+ 38 - 23
src/views/attend-class/index.tsx

@@ -26,7 +26,8 @@ import {
   NDrawerContent,
   NModal,
   NSpace,
-  NButton
+  NButton,
+  NTooltip
 } from 'naive-ui';
 import CardType from '@/components/card-type';
 import Pen from './component/tools/pen';
@@ -718,28 +719,42 @@ export default defineComponent({
             styles.switchDisplaySection,
             activeData.model ? '' : styles.sectionAnimate
           ]}>
-          <div
-            class={styles.displayBtn}
-            onClick={() =>
-              openStudyTool({
-                type: 'pen',
-                icon: iconNote,
-                name: '批注'
-              })
-            }>
-            <img src={iconNote} />
-          </div>
-          <div
-            class={styles.displayBtn}
-            onClick={() =>
-              openStudyTool({
-                type: 'whiteboard',
-                icon: iconWhiteboard,
-                name: '白板'
-              })
-            }>
-            <img src={iconWhiteboard} />
-          </div>
+          <NTooltip trigger="hover">
+            {{
+              trigger: () => (
+                <div
+                  class={styles.displayBtn}
+                  onClick={() =>
+                    openStudyTool({
+                      type: 'pen',
+                      icon: iconNote,
+                      name: '批注'
+                    })
+                  }>
+                  <img src={iconNote} />
+                </div>
+              ),
+              default: () => '批注'
+            }}
+          </NTooltip>
+          <NTooltip trigger="hover">
+            {{
+              trigger: () => (
+                <div
+                  class={styles.displayBtn}
+                  onClick={() =>
+                    openStudyTool({
+                      type: 'whiteboard',
+                      icon: iconWhiteboard,
+                      name: '白板'
+                    })
+                  }>
+                  <img src={iconWhiteboard} />
+                </div>
+              ),
+              default: () => '白板'
+            }}
+          </NTooltip>
         </div>
 
         {/* 显示列表 */}

+ 35 - 4
src/views/natural-resources/index.tsx

@@ -13,7 +13,7 @@ export default defineComponent({
       loading: false,
       pagination: {
         page: 1,
-        rows: 10,
+        rows: 50,
         pageTotal: 0
       },
       tableList: [] as any
@@ -22,10 +22,8 @@ export default defineComponent({
       list: [],
       height: '100%' as any
     });
-
     const formatData = () => {
       const rows = listData.rows || [];
-      console.log(rows);
       const tempList: any = [];
       rows.forEach((row: any, i: number) => {
         tempList.push({
@@ -36,10 +34,43 @@ export default defineComponent({
           isCollect: i % 3 ? false : true,
           isSelected: i % 4 ? false : true
         });
+
+        if (i === 2 || i === 12) {
+          tempList.push({
+            id: i + 3,
+            type: 'VIDEO',
+            title: '其多列',
+            url: 'https://gyt.ks3-cn-beijing.ksyuncs.com/courseware/1687844640957.png',
+            isCollect: i % 3 ? false : true,
+            isSelected: i % 4 ? false : true
+          });
+        }
+
+        if (i === 0 || i === 6) {
+          tempList.push({
+            id: i + 3,
+            type: 'AUDIO',
+            title: '歌曲表演 大鹿',
+            url: 'https://gyt.ks3-cn-beijing.ksyuncs.com/courseware/1687916228530.png',
+            isCollect: i % 3 ? false : true,
+            isSelected: i % 4 ? false : true
+          });
+        }
+
+        if (i === 5 || i === 15) {
+          tempList.push({
+            id: i + 3,
+            type: 'IMG',
+            title: '其多列',
+            url: 'https://gyt.ks3-cn-beijing.ksyuncs.com/courseware/1688007481564.jpg',
+            isCollect: i % 3 ? false : true,
+            isSelected: i % 4 ? false : true
+          });
+        }
       });
 
       forms.list = tempList || [];
-      state.pagination.pageTotal = tempList.length;
+      // state.pagination.pageTotal = tempList.length;
       state.pagination.rows = tempList.length;
     };
     const getList = () => {

Some files were not shown because too many files changed in this diff