2022-09-15 10:44:43 +08:00
|
|
|
<template>
|
2022-09-16 18:53:45 +08:00
|
|
|
<div>
|
2023-01-06 12:17:50 +08:00
|
|
|
<el-card class="topRouterCard">
|
2022-12-28 11:54:26 +08:00
|
|
|
<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">
|
2022-12-22 15:03:43 +08:00
|
|
|
{{ $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">
|
2022-12-22 15:03:43 +08:00
|
|
|
{{ $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>
|
2022-12-22 15:03:43 +08:00
|
|
|
import router from '@/routers';
|
2022-09-15 10:44:43 +08:00
|
|
|
|
2022-12-22 15:03:43 +08:00
|
|
|
interface MenuProps {
|
|
|
|
activeName: string;
|
|
|
|
}
|
|
|
|
const props = withDefaults(defineProps<MenuProps>(), {
|
|
|
|
activeName: 'all',
|
2022-09-15 10:44:43 +08:00
|
|
|
});
|
|
|
|
|
2022-12-22 15:03:43 +08:00
|
|
|
const routerTo = (path: string) => {
|
|
|
|
router.push({ path: path });
|
2022-09-15 10:44:43 +08:00
|
|
|
};
|
2022-09-09 17:17:02 +08:00
|
|
|
|
2022-12-28 11:54:26 +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');
|
2023-01-09 22:55:10 +08:00
|
|
|
break;
|
2022-12-22 15:03:43 +08:00
|
|
|
}
|
2022-12-28 11:54:26 +08:00
|
|
|
};
|
2022-09-15 10:44:43 +08:00
|
|
|
</script>
|