review: 重构代码.

This commit is contained in:
lijiahang
2023-11-24 19:19:05 +08:00
parent a9658b57dd
commit 550366e929
11 changed files with 58 additions and 24 deletions

View File

@@ -1,5 +1,6 @@
import type { AppState } from './types';
import { defineStore } from 'pinia';
import { CardPageSizeOptions, TablePageSizeOptions } from '@/types/const';
const defaultConfig: AppState = {
// 应用设置
@@ -16,8 +17,8 @@ const defaultConfig: AppState = {
menuWidth: 220,
colorWeak: false,
// 用户偏好-数据设置
defaultPageSize: 10,
defaultCardSize: 12,
defaultTablePageSize: TablePageSizeOptions[0],
defaultCardPageSize: CardPageSizeOptions[0],
// 用户偏好-页面视图
hostView: 'table',
hostKeyView: 'table',

View File

@@ -36,8 +36,8 @@ export interface UserPreferenceLayout {
* 用户偏好 - 数据设置
*/
export interface UserPreferenceData {
defaultPageSize: number;
defaultCardSize: number;
defaultTablePageSize: number;
defaultCardPageSize: number;
}
/**