feat: station card layout of DashboardPage is adjustable

This commit is contained in:
yangsy
2025-09-11 12:07:53 +08:00
parent 2ac9bbdd37
commit 630ad21b4b
3 changed files with 30 additions and 2 deletions

View File

@@ -1,8 +1,13 @@
<script setup lang="ts">
import { NDivider, NDrawer, NDrawerContent, NFlex } from 'naive-ui';
import { NDivider, NDrawer, NDrawerContent, NFlex, NFormItem, NInputNumber } from 'naive-ui';
import ThemeSwitch from './theme-switch.vue';
import { useLayoutStore } from '@/stores/layout';
import { storeToRefs } from 'pinia';
const show = defineModel<boolean>('show');
const layoutStore = useLayoutStore();
const { stationLayoutGridCols } = storeToRefs(layoutStore);
</script>
<template>
@@ -11,6 +16,10 @@ const show = defineModel<boolean>('show');
<NFlex vertical justify="center">
<NDivider>主题</NDivider>
<ThemeSwitch />
<NDivider>布局</NDivider>
<NFormItem label="车站列数" label-placement="left">
<NInputNumber v-model:value="stationLayoutGridCols" :min="1" :max="10" />
</NFormItem>
</NFlex>
</NDrawerContent>
</NDrawer>