liushengqiang %!s(int64=2) %!d(string=hai) anos
pai
achega
33917d40f3

+ 3 - 3
src/components/TheNoticeBar/index.tsx

@@ -23,7 +23,7 @@ export default defineComponent({
       time: null as any
     });
     const init = () => {
-      if (notiData.isActive) return;
+      if (notiData.isActive || !contentRef.value || !wrapRef.value) return;
       notiData.isActive = true;
       notiData.contentWidth = contentRef.value.getBoundingClientRect().width;
       notiData.wrapWidth = wrapRef.value.getBoundingClientRect().width;
@@ -43,8 +43,8 @@ export default defineComponent({
         notiData.contentStyle.transitionDuration = '0s';
         notiData.contentStyle.transform = `translateX(${notiData.wrapWidth}px)`;
         requestAnimationFrame(() => {
-            startAnimate();
-        })
+          startAnimate();
+        });
       }, 5 * 1000);
     };
     const stopAnimate = () => {

+ 2 - 1
src/components/layout/layoutSilder.tsx

@@ -62,6 +62,7 @@ export default defineComponent({
         normalIcon: kuNormal,
         isActive: false,
         id: 5,
+        lightList:[ '/xiaoku-music'],//小酷AI的灯光列表
         path: '/xiaoku-ai'
       },
       {
@@ -100,7 +101,7 @@ export default defineComponent({
     const checkPathChange = (path: string) => {
       itemInfoList.forEach((now: any) => {
         now.isActive = false;
-        if (now.path === path) {
+        if (now.path === path || now.lightList?.includes(path)) {
           now.isActive = true;
         }
       });