mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-09 08:57:14 +08:00
fix: 仅生产环境检查版本更新
This commit is contained in:
@@ -11,7 +11,7 @@ export default function appInfo(): Plugin {
|
|||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(
|
console.log(
|
||||||
boxen(
|
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,
|
padding: 1,
|
||||||
margin: 1,
|
margin: 1,
|
||||||
|
@@ -65,13 +65,18 @@ const compareTag = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isProd = import.meta.env.PROD
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (isProd) {
|
||||||
// 每60秒检查一次是否有新的 ETag 或 Last-Modified 值
|
// 每60秒检查一次是否有新的 ETag 或 Last-Modified 值
|
||||||
timer = setInterval(compareTag, 6000)
|
timer = setInterval(compareTag, 6000)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
if (isProd) {
|
||||||
// 清除定时器
|
// 清除定时器
|
||||||
clearInterval(timer)
|
clearInterval(timer)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user