mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-10 14:13:16 +08:00
chore: 移除开发环境的上传提示功能
该提示用于提醒从低版本升级到后端5.4.0+的用户执行升级SQL,现已不再需要。删除相关钩子函数及导入,简化应用初始化逻辑。
This commit is contained in:
@@ -8,7 +8,6 @@ import { App, ConfigProvider, theme } from 'antdv-next';
|
|||||||
|
|
||||||
import { antdLocale } from '#/locales';
|
import { antdLocale } from '#/locales';
|
||||||
|
|
||||||
import { useUploadTip } from './upload-tip';
|
|
||||||
import { PopupContext } from './utils/context';
|
import { PopupContext } from './utils/context';
|
||||||
|
|
||||||
defineOptions({ name: 'App' });
|
defineOptions({ name: 'App' });
|
||||||
@@ -31,8 +30,6 @@ const tokenTheme = computed(() => {
|
|||||||
token: tokens,
|
token: tokens,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
useUploadTip();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -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);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user