1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-22 01:39:18 +08:00

65 lines
2.0 KiB
Vue
Raw Normal View History

2022-09-15 10:44:43 +08:00
<template>
<div>
2023-01-06 12:17:50 +08:00
<el-card class="topRouterCard">
<el-radio-group :model-value="props.activeName" @change="handleChange">
2023-01-06 12:17:50 +08:00
<el-radio-button class="topRouterButton" size="default" label="panel">
2022-09-19 19:42:06 +08:00
{{ $t('setting.panel') }}
</el-radio-button>
2023-01-06 12:17:50 +08:00
<el-radio-button class="topRouterButton" size="default" label="safe">
{{ $t('setting.safe') }}
2022-09-19 19:42:06 +08:00
</el-radio-button>
2023-01-06 12:17:50 +08:00
<el-radio-button class="topRouterButton" size="default" label="backupaccount">
{{ $t('setting.backupAccount') }}
</el-radio-button>
2023-01-06 18:53:25 +08:00
<el-radio-button class="topRouterButton" size="default" label="snapshot">
{{ $t('setting.snapshot') }}
</el-radio-button>
2023-01-06 12:17:50 +08:00
<el-radio-button class="topRouterButton" size="default" label="monitor">
2022-09-19 19:42:06 +08:00
{{ $t('menu.monitor') }}
</el-radio-button>
2023-01-06 12:17:50 +08:00
<el-radio-button class="topRouterButton" size="default" label="about">
2022-09-19 19:42:06 +08:00
{{ $t('setting.about') }}
</el-radio-button>
2022-09-15 10:44:43 +08:00
</el-radio-group>
</el-card>
</div>
</template>
<script lang="ts" setup>
import router from '@/routers';
2022-09-15 10:44:43 +08:00
interface MenuProps {
activeName: string;
}
const props = withDefaults(defineProps<MenuProps>(), {
activeName: 'all',
2022-09-15 10:44:43 +08:00
});
const routerTo = (path: string) => {
router.push({ path: path });
2022-09-15 10:44:43 +08:00
};
const handleChange = (val: string) => {
switch (val) {
case 'panel':
routerTo('/setting');
break;
case 'safe':
routerTo('/setting/safe');
break;
case 'backupaccount':
routerTo('/setting/backupaccount');
break;
case 'monitor':
routerTo('/setting/monitor');
break;
case 'about':
routerTo('/setting/about');
break;
2023-01-06 18:53:25 +08:00
case 'snapshot':
routerTo('/setting/snapshot');
break;
}
};
2022-09-15 10:44:43 +08:00
</script>