mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-12 15:20:43 +08:00
40 lines
780 B
Vue
40 lines
780 B
Vue
<template>
|
|
<div class="system-os-content">
|
|
<span class="system-icon">
|
|
<span :class="platformLogoIconClassName" />
|
|
</span>
|
|
<span class="system-label">
|
|
{{ systemOSLabel }}
|
|
</span>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
/**
|
|
* 系统信息
|
|
*/
|
|
|
|
import {
|
|
computed,
|
|
} from 'vue';
|
|
import * as hostUtils from '@/utils/host';
|
|
|
|
const props = defineProps({
|
|
info: {
|
|
type: Object,
|
|
default: () => ({}),
|
|
},
|
|
});
|
|
|
|
const platformLogoIconClassName = computed(() => hostUtils.getPlatformLogoIconClassName(props.info?.Host?.Platform));
|
|
const systemOSLabel = computed(() => hostUtils.getSystemOSLabel(props.info?.Host?.Platform, true));
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.system-os-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
}
|
|
</style>
|