Browse Source

修改样式

lex 1 năm trước cách đây
mục cha
commit
11578d873f

+ 6 - 2
src/components/TheNoticeBar/index.tsx

@@ -19,6 +19,10 @@ export default defineComponent({
     isAnimation: {
       type: Boolean,
       default: false
+    },
+    time: {
+      type: Number,
+      default: 5
     }
   },
   setup(props) {
@@ -48,7 +52,7 @@ export default defineComponent({
         return;
       }
 
-      notiData.contentStyle.transitionDuration = '5s';
+      notiData.contentStyle.transitionDuration = props.time + 's';
       notiData.contentStyle.transform = 'translateX(-100%)';
 
       notiData.time = setTimeout(() => {
@@ -78,7 +82,7 @@ export default defineComponent({
       <div
         ref={wrapRef}
         class={[styles.wrap, props.isAnimation ? styles.isAnitaion : '']}
-        onMouseenter={() =>  !props.isAnimation && init()}
+        onMouseenter={() => !props.isAnimation && init()}
         onMouseleave={() => !props.isAnimation && stopAnimate()}>
         <div
           ref={contentRef}

+ 7 - 2
src/views/attend-class/model/chapter/index.module.less

@@ -22,8 +22,13 @@
   font-size: max(17px, 12Px);
   margin-bottom: 8px;
 
-  &:hover {
-    background: #E8F4FF;
+  &.childItem:hover {
+
+    // background: #E8F4FF;
+
+    .title {
+      color: #198CFE;
+    }
   }
 
   .title {

+ 4 - 1
src/views/prepare-lessons/components/directory-main/index.tsx

@@ -220,7 +220,10 @@ export default defineComponent({
                   <TheNoticeBar text={prepareStore.getBaseCourseware.name} />
                 </h2>
                 <div class={styles.subjects}>
-                  <TheNoticeBar text={formatSubjectNames.value} />
+                  <TheNoticeBar
+                    text={formatSubjectNames.value}
+                    time={formatSubjectNames.value.length > 15 ? 10 : 5}
+                  />
                 </div>
                 <div
                   class={styles.changeDir}