Commit fc88fa2f by Lin

fix: 文件修改更新

1 parent 89ef67dd
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, onUnmounted, nextTick } from 'vue'; import { nextTick, onMounted, onUnmounted } from "vue";
import { useRoute } from 'vue-router'; import { useRoute } from "vue-router";
import GlobalLoading from '@/components/GlobalLoading.vue'; import GlobalLoading from "@/components/GlobalLoading.vue";
const route = useRoute(); const route = useRoute();
onMounted(async () => { onMounted(async () => {
console.log('[基座] 微应用容器组件已挂载,当前路由:', route.path); console.log("[基座] 微应用容器组件已挂载,当前路由:", route.path);
// 等待 DOM 完全更新 // 等待 DOM 完全更新
await nextTick(); await nextTick();
// 确认容器元素已存在 // 确认容器元素已存在
const container = document.getElementById('subapp-container'); const container = document.querySelector("#subapp-container");
if (container) { if (container) {
console.log('[基座] 微应用容器 DOM 已就绪'); console.log("[基座] 微应用容器 DOM 已就绪");
} else { } else {
console.error('[基座] 微应用容器 DOM 未找到,可能导致微应用加载失败'); console.error("[基座] 微应用容器 DOM 未找到,可能导致微应用加载失败");
} }
}); });
onUnmounted(() => { onUnmounted(() => {
console.log('[基座] 微应用容器已卸载'); console.log("[基座] 微应用容器已卸载");
}); });
</script> </script>
......
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://lefthook.dev/configuration/
#
# pre-push:
# jobs:
# - name: packages audit
# tags:
# - frontend
# - security
# run: yarn audit
#
# - name: gems audit
# tags:
# - backend
# - security
# run: bundle audit
#
# pre-commit:
# parallel: true
# jobs:
# - run: yarn eslint {staged_files}
# glob: "*.{js,ts,jsx,tsx}"
#
# - name: rubocop
# glob: "*.rb"
# exclude:
# - config/application.rb
# - config/routes.rb
# run: bundle exec rubocop --force-exclusion {all_files}
#
# - name: govet
# files: git ls-files -m
# glob: "*.go"
# run: go vet {files}
#
# - script: "hello.js"
# runner: node
#
# - script: "hello.go"
# runner: go run
pre-commit: pre-commit:
parallel: true parallel: true
commands: commands:
code-workspace: code-workspace:
run: pnpm vsh code-workspace --auto-commit run: pnpm vsh code-workspace --auto-commit
# lint-staged: lint-staged:
# run: pnpm lint-staged run: pnpm lint-staged
post-merge: post-merge:
commands: commands:
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!