feat: station card layout of DashboardPage is adjustable
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user