更新代码

This commit is contained in:
hero920103 committed 2026-09-15 10:44:31 +08:00
1 parent 9875832019
commit 943c3708b0
125 files changed
+2009 -1728

No files matched your search

@@ -139,11 +139,12 @@
import { ref, computed, onMounted, onUnmounted } from 'vue';
import { ElMessage } from 'element-plus';
import { InfoFilled, Refresh, DocumentCopy } from '@element-plus/icons-vue';
import { formatDateTime } from '@/utils/datetime';
// 系统信息数据
const loading = ref(false);
const systemInfo = ref<any>({});
const currentTime = ref(new Date().toLocaleString('zh-CN'));
const currentTime = ref(formatDateTime(new Date()));
// API基础地址
const apiBaseUrl = computed(() => {
@@ -251,7 +252,7 @@ async function fetchSystemInfo() {
// 刷新信息
function refreshInfo() {
fetchSystemInfo();
currentTime.value = new Date().toLocaleString('zh-CN');
currentTime.value = formatDateTime(new Date());
ElMessage.success('信息已刷新');
}
@@ -285,7 +286,7 @@ function copySystemInfo() {
- 屏幕分辨率:${clientInfo.value.screenResolution}
- 设备类型:${clientInfo.value.isMobile ? '移动设备' : '桌面设备'}
生成时间:${new Date().toLocaleString('zh-CN')}`;
生成时间:${formatDateTime(new Date())}`;
if (navigator.clipboard) {
navigator.clipboard.writeText(infoText).then(() => {
@@ -315,7 +316,7 @@ onMounted(() => {
fetchSystemInfo();
// 每秒更新时间
timeInterval = setInterval(() => {
currentTime.value = new Date().toLocaleString('zh-CN');
currentTime.value = formatDateTime(new Date());
}, 1000);
});