perf(vite.config | view/sidebar): CI/CD 支持 | 构建信息显示

+ 适配Jenkins 持续集成功能。
    + 当版本库中出现新版本将自动构建并部署,以保证服务器版本为最新
+ 侧边栏下显示当前构建版本 和 构建时间
This commit is contained in:
2026-02-11 20:56:08 +08:00
parent 5eab7c7b82
commit e7a59de3ae
2 changed files with 57 additions and 2 deletions

View File

@@ -21,6 +21,10 @@
/>
</el-menu>
</el-scrollbar>
<div class="sidebar-version">
构建版本: {{ commitId }}<br/>
<div>构建时间: {{ formatTime(buildTime) }}</div>
</div>
</div>
</template>
@@ -32,6 +36,21 @@ import useAppStore from '@/store/modules/app'
import useSettingsStore from '@/store/modules/settings'
import usePermissionStore from '@/store/modules/permission'
const buildTime = __BUILD_TIME__
const commitId = __COMMIT_ID__
const formatTime = (time) => {
return new Intl.DateTimeFormat('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
hour12: false,
timeZone: 'Asia/Shanghai'
}).format(new Date(time))
}
const route = useRoute()
const appStore = useAppStore()
const settingsStore = useSettingsStore()
@@ -101,4 +120,22 @@ const activeMenu = computed(() => {
}
}
}
.sidebar-container {
display: flex;
flex-direction: column;
height: 100%;
}
.menu-wrapper {
flex: 1;
}
.sidebar-version {
padding: 10px;
font-size: 12px;
color: #999;
text-align: left;
border-top: 1px solid #eee;
}
</style>