mo 1 年之前
父節點
當前提交
e3314123ef

二進制
src/components/layout/images/beatIcon.png


二進制
src/components/layout/images/setTimeIcon.png


二進制
src/components/layout/images/toneIcon.png


二進制
src/components/layout/images/toolbox.png


+ 10 - 2
src/components/layout/index.tsx

@@ -1,4 +1,4 @@
-import { Transition, defineComponent, onMounted, ref, reactive,onUnmounted } from 'vue';
+import { Transition, defineComponent, onMounted, ref, reactive,onUnmounted,watch } from 'vue';
 import LayoutSilder from './layoutSilder';
 import LayoutTop from './layoutTop';
 import styles from './index.module.less';
@@ -321,6 +321,14 @@ export default defineComponent({
           });
       }
     };
+
+    watch(()=>route.path,(val:any)=>{
+      const elDoc = document.getElementById('WrapcoreViewWrap') as any
+      if(elDoc){
+        elDoc.scrollTo(0, 0)
+        window.scrollTo(0, 0)
+      }
+    })
     onMounted(() => {
       initMoveable();
       // // initMoveableClass();
@@ -509,7 +517,7 @@ export default defineComponent({
         </div>
         <div class={styles.Wrapcore}>
           <LayoutTop></LayoutTop>
-          <div class={styles.WrapcoreView}>
+          <div class={styles.WrapcoreView} id='WrapcoreViewWrap'>
             {/* <div class={styles.WrapcoreViewInfo}> */}
             <router-view>
               {(obj: any) => (

二進制
src/custom-plugins/guide-page/images/attent4.png


+ 1 - 8
src/router/index.ts

@@ -92,14 +92,7 @@ const router: Router = createRouter({
   routes: [...constantRoutes],
   stringifyQuery,
   parseQuery,
-  scrollBehavior(to) {
-    if (to.hash) {
-      return {
-        el: to.hash,
-        behavior: 'smooth'
-      };
-    }
-  }
+  scrollBehavior: () => ({ top: 0 })
 });
 
 export function setupRouter(app: App) {

+ 1 - 0
src/views/natural-resources/components/share-resources/index.module.less

@@ -5,6 +5,7 @@
   justify-content: flex-start;
   gap: 22px;
   min-height: 220px;
+  overflow-y: auto;
 }
 
 .searchGroup {

+ 3 - 1
src/views/prepare-lessons/index.tsx

@@ -16,8 +16,9 @@ export default defineComponent({
     console.log(prepareStore, 'prepareStore');
     const { treeList, coursewareList } = storeToRefs(prepareStore);
     const showGuide = computed(() => {
-      return treeList.value.length > 0 && coursewareList.value.length > 0;
+      return treeList.value.length > 0 && coursewareList.value.length > 0 && isEndMounted.value;
     });
+    const isEndMounted = ref(false)
     const directroyRef = ref();
     onMounted(() => {
       useResizeObserver(
@@ -31,6 +32,7 @@ export default defineComponent({
           );
         }
       );
+      isEndMounted.value = true
     });
 
     // 当前页面离开时