소스 검색

中文提示

xiaochan 2 년 전
부모
커밋
2a905a758a
2개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      src/layout/MenuV2/MenuV2.vue
  2. 3 0
      src/layout/index.vue

+ 5 - 2
src/layout/MenuV2/MenuV2.vue

@@ -35,6 +35,7 @@ import {useRoute} from "vue-router";
 import Logo from '../HeaderV2/Logo.vue'
 import XEUtils from "xe-utils";
 import router from '@/router'
+import sleep from "@/utils/sleep";
 
 const menuText: Ref<string> = ref('')
 const menuRef = ref()
@@ -112,7 +113,7 @@ const menuLaunch = async path => {
     const li = document.getElementById(path)
     const div = li.children[0]
     const icon = div.getElementsByClassName('el-icon el-sub-menu__icon-arrow')
-    if (icon[0].style.transform === 'none') {
+    if (icon.item(0).style.transform === 'none') {
       div.click()
     }
   } catch (e) {
@@ -163,8 +164,8 @@ const smoothScrolling = () => {
 watch(() => router.currentRoute.value, async () => {
   menuText.value = ''
   isSearch.value = false
-  await menuRef.value.handleResize()
   await nextTick()
+  await menuRef.value.handleResize()
   smoothScrolling()
 })
 
@@ -172,6 +173,8 @@ watch(() => router.currentRoute.value, async () => {
 onMounted(async () => {
   await nextTick()
   barHeight.height = (floatingRef.value.clientHeight - logoRef.value.clientHeight - 36) + 'px'
+  await sleep(500)
+  smoothScrolling()
 })
 
 </script>

+ 3 - 0
src/layout/index.vue

@@ -77,6 +77,9 @@ const basicTutorial = async () => {
     showProgress: true,
     showButtons: true,
     allowClose: false,
+    nextBtnText: '下一步',
+    prevBtnText: '上一步',
+    doneBtnText: '关闭',
     onDestroyStarted: () => {
       userInfoConfig.value.systemBoot = false
       setUserConfigByCode()