mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-22 01:39:18 +08:00
84 lines
2.5 KiB
Vue
84 lines
2.5 KiB
Vue
<template>
|
|
<div>
|
|
<el-card class="topCard">
|
|
<el-radio-group v-model="active">
|
|
<el-radio-button class="topButton" size="large" @click="routerTo('/setting')" label="panel">
|
|
{{ $t('setting.panel') }}
|
|
</el-radio-button>
|
|
<el-radio-button class="topButton" size="large" @click="routerTo('/setting/safe')" label="safe">
|
|
{{ $t('setting.safe') }}
|
|
</el-radio-button>
|
|
<el-radio-button
|
|
class="topButton"
|
|
@click="routerTo('/setting/backupaccount')"
|
|
size="large"
|
|
label="backupaccount"
|
|
>
|
|
{{ $t('setting.backupAccount') }}
|
|
</el-radio-button>
|
|
<el-radio-button class="topButton" size="large" @click="routerTo('/setting/monitor')" label="monitor">
|
|
{{ $t('menu.monitor') }}
|
|
</el-radio-button>
|
|
<el-radio-button class="topButton" size="large" @click="routerTo('/setting/about')" label="about">
|
|
{{ $t('setting.about') }}
|
|
</el-radio-button>
|
|
</el-radio-group>
|
|
</el-card>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref, onMounted } from 'vue';
|
|
import router from '@/routers';
|
|
|
|
interface MenuProps {
|
|
activeName: string;
|
|
}
|
|
const props = withDefaults(defineProps<MenuProps>(), {
|
|
activeName: 'all',
|
|
});
|
|
|
|
const active = ref('all');
|
|
const routerTo = (path: string) => {
|
|
router.push({ path: path });
|
|
};
|
|
|
|
onMounted(() => {
|
|
if (props.activeName) {
|
|
active.value = props.activeName;
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style>
|
|
.topCard {
|
|
--el-card-border-color: var(--el-border-color-light);
|
|
--el-card-border-radius: 4px;
|
|
--el-card-padding: 0px;
|
|
--el-card-bg-color: var(--el-fill-color-blank);
|
|
}
|
|
.topButton .el-radio-button__inner {
|
|
display: inline-block;
|
|
line-height: 1;
|
|
white-space: nowrap;
|
|
vertical-align: middle;
|
|
background: var(--el-button-bg-color, var(--el-fill-color-blank));
|
|
border: 0;
|
|
font-weight: 350;
|
|
border-left: 0;
|
|
color: var(--el-button-text-color, var(--el-text-color-regular));
|
|
text-align: center;
|
|
box-sizing: border-box;
|
|
outline: 0;
|
|
margin: 0;
|
|
position: relative;
|
|
cursor: pointer;
|
|
transition: var(--el-transition-all);
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
padding: 8px 15px;
|
|
font-size: var(--el-font-size-base);
|
|
border-radius: 0;
|
|
}
|
|
</style>
|