feat(project): support dynamic title

This commit is contained in:
vben
2024-05-22 22:03:41 +08:00
parent e83adf0697
commit d1cdea430e
15 changed files with 44 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
.dark {
:root.dark {
/* 基础背景颜色颜色 */
/* --color-background: 240 6% 18%; */

View File

@@ -55,6 +55,8 @@ interface Preference {
copyright: string;
/** 应用默认头像 */
defaultAvatar: string;
/** 开启动态标题 */
dynamicTitle: boolean;
/** 页脚是否固定 */
footerFixed: boolean;
/** 页脚是否可见 */

View File

@@ -1,7 +1,7 @@
import { type ComputedRef, type MaybeRef } from 'vue';
/**
* 深度部分类型
* 深层递归所有属性为可选
*/
type DeepPartial<T> = T extends object
? {
@@ -9,6 +9,13 @@ type DeepPartial<T> = T extends object
}
: T;
/**
* 深层递归所有属性为只读
*/
type DeepReadonly<T> = {
readonly [P in keyof T]: T[P] extends object ? DeepReadonly<T[P]> : T[P];
};
/**
* 任意类型的异步函数
*/
@@ -78,6 +85,7 @@ export {
type AnyNormalFunction,
type AnyPromiseFunction,
type DeepPartial,
type DeepReadonly,
type IntervalHandle,
type MaybeComputedRef,
type MaybeReadonlyRef,

View File

@@ -69,6 +69,7 @@ const logoClass = computed(() => {
/>
<span v-if="!collapse" class="truncate text-nowrap">
{{ text }}
<!-- <span class="text-primary ml-1 align-super text-[smaller]">Pro</span> -->
</span>
</a>
</div>