chore: 移除开发环境的上传提示功能

该提示用于提醒从低版本升级到后端5.4.0+的用户执行升级SQL,现已不再需要。删除相关钩子函数及导入,简化应用初始化逻辑。
This commit is contained in:
dap
2026-01-27 20:15:58 +08:00
parent 154c8b664b
commit 0636c5f4a6
2 changed files with 0 additions and 38 deletions

View File

@@ -8,7 +8,6 @@ import { App, ConfigProvider, theme } from 'antdv-next';
import { antdLocale } from '#/locales';
import { useUploadTip } from './upload-tip';
import { PopupContext } from './utils/context';
defineOptions({ name: 'App' });
@@ -31,8 +30,6 @@ const tokenTheme = computed(() => {
token: tokens,
};
});
useUploadTip();
</script>
<template>

View File

@@ -1,35 +0,0 @@
import { onMounted } from 'vue';
import { useLocalStorage } from '@vueuse/core';
export function useUploadTip() {
const readTip = useLocalStorage<boolean>('__upload_tip_read_5.4.0', false);
onMounted(() => {
if (readTip.value || !import.meta.env.DEV) {
return;
}
const modalInstance = window.modal.info({
title: '提示',
centered: true,
content:
'如果你的版本是从低版本升级到后端>5.4.0, 记得执行升级sql, 否则跳转页面(如oss 代码生成配置)等会404',
okButtonProps: { disabled: true },
onOk() {
modalInstance.destroy();
readTip.value = true;
},
});
let time = 3;
const interval = setInterval(() => {
modalInstance.update({
okText: time === 0 ? '我知道了, 不再弹出' : `${time}秒后关闭`,
okButtonProps: { disabled: time > 0 },
});
if (time <= 0) {
clearInterval(interval);
}
time--;
}, 1000);
});
}