fix: 加载优化、vip状态优化、apikey优化
This commit is contained in:
@@ -17,9 +17,27 @@ const designStore = useDesignStore();
|
||||
/** 获取布局格式 */
|
||||
const layout = computed((): LayoutType => designStore.layout);
|
||||
onMounted(() => {
|
||||
console.log('111--');
|
||||
// 通知 index.html 的 loading 动画进度拉满并淡出
|
||||
(window as any)?.finishLoading();
|
||||
// 更好的做法是等待所有资源加载
|
||||
window.addEventListener('load', () => {
|
||||
const loader = document.getElementById('yixinai-loader');
|
||||
if (loader) {
|
||||
loader.style.opacity = '0';
|
||||
setTimeout(() => {
|
||||
loader.style.display = 'none';
|
||||
}, 500); // 匹配过渡时间
|
||||
}
|
||||
});
|
||||
|
||||
// 设置超时作为兜底
|
||||
setTimeout(() => {
|
||||
const loader = document.getElementById('yixinai-loader');
|
||||
if (loader) {
|
||||
loader.style.opacity = '0';
|
||||
setTimeout(() => {
|
||||
loader.style.display = 'none';
|
||||
}, 500);
|
||||
}
|
||||
}, 500); // 最多显示0.5秒
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user