menu, main 로딩 콘솔 주석처리
This commit is contained in:
parent
9bc34a02fc
commit
334aa3e22a
@ -24,32 +24,31 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import TheTop from './TheTop.vue';
|
import TheTop from './TheTop.vue';
|
||||||
import TheFooter from './TheFooter.vue';
|
import TheFooter from './TheFooter.vue';
|
||||||
import TheMenu from './TheMenu.vue';
|
import TheMenu from './TheMenu.vue';
|
||||||
import { nextTick } from 'vue';
|
import { nextTick } from 'vue';
|
||||||
import { wait } from '@/common/utils';
|
import { wait } from '@/common/utils';
|
||||||
|
|
||||||
window.isDarkStyle = window.Helpers.isDarkStyle();
|
window.isDarkStyle = window.Helpers.isDarkStyle();
|
||||||
|
|
||||||
const loadScript = src => {
|
const loadScript = src => {
|
||||||
const script = document.createElement('script');
|
const script = document.createElement('script');
|
||||||
script.src = src;
|
script.src = src;
|
||||||
script.type = 'text/javascript';
|
script.type = 'text/javascript';
|
||||||
script.async = true;
|
script.async = true;
|
||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
script.onload = () => {
|
// script.onload = () => {
|
||||||
console.log(`${src} loaded successfully.`);
|
// console.log(`${src} loaded successfully.`);
|
||||||
};
|
// };
|
||||||
script.onerror = () => {
|
script.onerror = () => {
|
||||||
console.error(`Failed to load script: ${src}`);
|
console.error(`Failed to load script: ${src}`);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
await wait(200);
|
await wait(200);
|
||||||
loadScript('/vendor/js/menu.js');
|
loadScript('/vendor/js/menu.js');
|
||||||
loadScript('/js/main.js');
|
loadScript('/js/main.js');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style></style>
|
||||||
</style>
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user