mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-08 12:57:11 +08:00
fix: 仅生产环境检查版本更新
This commit is contained in:
@@ -11,7 +11,7 @@ export default function appInfo(): Plugin {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
boxen(
|
||||
`${bold(green(`${bgGreen('ContiNew Admin v3.1.0-SNAPSHOT')}`))}\n${cyan('在线文档:')}${underline('https://continew.top')}\n${cyan('持续迭代优化的前后端分离中后台管理系统框架。')}`,
|
||||
`${bold(green(`${bgGreen('ContiNew Admin v3.2.0-SNAPSHOT')}`))}\n${cyan('在线文档:')}${underline('https://continew.top')}\n${cyan('持续迭代优化的前后端分离中后台管理系统框架。')}`,
|
||||
{
|
||||
padding: 1,
|
||||
margin: 1,
|
||||
|
@@ -65,13 +65,18 @@ const compareTag = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const isProd = import.meta.env.PROD
|
||||
onMounted(() => {
|
||||
// 每60秒检查一次是否有新的 ETag 或 Last-Modified 值
|
||||
timer = setInterval(compareTag, 6000)
|
||||
if (isProd) {
|
||||
// 每60秒检查一次是否有新的 ETag 或 Last-Modified 值
|
||||
timer = setInterval(compareTag, 6000)
|
||||
}
|
||||
})
|
||||
onUnmounted(() => {
|
||||
// 清除定时器
|
||||
clearInterval(timer)
|
||||
if (isProd) {
|
||||
// 清除定时器
|
||||
clearInterval(timer)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user