perf: format code with better style (#5283)

This commit is contained in:
Vben
2025-01-01 11:39:49 +08:00
committed by GitHub
parent 4d81b9d18d
commit 081d2aed23
288 changed files with 1805 additions and 2164 deletions

View File

@@ -1,4 +1,4 @@
import { type ComputedRef, type MaybeRef } from 'vue';
import type { ComputedRef, MaybeRef } from 'vue';
/**
* 深层递归所有属性为可选

View File

@@ -1,15 +1,14 @@
import type { RouteRecordRaw } from 'vue-router';
import type { Component } from 'vue';
import type { RouteRecordRaw } from 'vue-router';
/**
* 扩展路由原始对象
*/
type ExRouteRecordRaw = {
type ExRouteRecordRaw = RouteRecordRaw & {
parent?: string;
parents?: string[];
path?: any;
} & RouteRecordRaw;
};
interface MenuRecordBadgeRaw {
/**

View File

@@ -1,6 +1,5 @@
import type { Router, RouteRecordRaw } from 'vue-router';
import type { Component } from 'vue';
import type { Router, RouteRecordRaw } from 'vue-router';
interface RouteMeta {
/**
@@ -117,10 +116,13 @@ interface RouteMeta {
}
// 定义递归类型以将 RouteRecordRaw 的 component 属性更改为 string
type RouteRecordStringComponent<T = string> = {
type RouteRecordStringComponent<T = string> = Omit<
RouteRecordRaw,
'children' | 'component'
> & {
children?: RouteRecordStringComponent<T>[];
component: T;
} & Omit<RouteRecordRaw, 'children' | 'component'>;
};
type ComponentRecordType = Record<string, () => Promise<Component>>;