SystemInformation.vue
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<template>
<div>
<div class="title">关于系统</div>
<div class="items">
<div class="item" v-for="(item, index) in tips" :key="index">
<div class="name" v-text="item.name" />
<div class="value" v-text="item.value" />
</div>
</div>
</div>
</template>
<script>
export default {
data() {
const os = require("os")
return {
tips: [
{ name: '当前页面路径:', value: this.$route.path },
{ name: '当前页面名称:', value: this.$route.name },
{ name: 'Vue版本:', value: require('vue/package.json').version },
{ name: 'Electron版本:', value: process.versions.electron || '浏览器环境' },
{ name: 'Node版本:', value: process.versions.node || '浏览器环境' },
{ name: '系统平台:', value: os.platform() },
{ name: '系统版本:', value: os.release() },
{ name: '系统文件:', value: os.arch() + '位' }
]
};
},
mounted() {
console.log(this.$route);
}
};
</script>
<style scoped>
.title {
color: #888;
font-size: 18px;
font-weight: initial;
letter-spacing: 0.25px;
margin-top: 10px;
}
.items {
margin-top: 8px;
}
.item {
display: flex;
align-items: center;
margin-bottom: 6px;
line-height: 24px;
}
.item .name {
color: #6a6a6a;
margin-right: 6px;
}
.item .value {
color: #35495e;
font-weight: bold;
}
</style>