feat: add copyright components to enable preferences to configure copyright more accurately

This commit is contained in:
vben
2024-07-06 16:19:37 +08:00
parent 826907f6c3
commit 13f3af96b7
13 changed files with 116 additions and 8 deletions

View File

@@ -9,7 +9,6 @@ const defaultPreferences: Preferences = {
colorWeakMode: false,
compact: false,
contentCompact: 'wide',
copyright: 'Copyright © 2024 Vben Admin Pro',
defaultAvatar:
'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.0/source/avatar-v1.webp',
dynamicTitle: true,
@@ -27,6 +26,14 @@ const defaultPreferences: Preferences = {
showIcon: true,
styleType: 'normal',
},
copyright: {
companyName: 'Vben Admin Pro',
companySiteLink: 'https://www.vben.pro',
date: '2024',
enable: true,
icp: '',
icpLink: '',
},
footer: {
enable: true,
fixed: false,

View File

@@ -32,8 +32,6 @@ interface AppPreferences {
compact: boolean;
/** 是否开启内容紧凑模式 */
contentCompact: ContentCompactType;
/** 页脚Copyright */
copyright: string;
// /** 应用默认头像 */
defaultAvatar: string;
// /** 开启动态标题 */
@@ -65,6 +63,21 @@ interface BreadcrumbPreferences {
styleType: BreadcrumbStyleType;
}
interface CopyrightPreferences {
/** 版权公司名 */
companyName: string;
/** 版权公司名链接 */
companySiteLink: string;
/** 版权日期 */
date: string;
/** 版权是否可见 */
enable: boolean;
/** 备案号 */
icp: string;
/** 备案号链接 */
icpLink: string;
}
interface FooterPreferences {
/** 底栏是否可见 */
enable: boolean;
@@ -167,6 +180,8 @@ interface Preferences {
app: AppPreferences;
/** 顶栏配置 */
breadcrumb: BreadcrumbPreferences;
/** 版权配置 */
copyright: CopyrightPreferences;
/** 底栏配置 */
footer: FooterPreferences;
/** 面包屑配置 */

View File

@@ -32,7 +32,7 @@ const { handleClick, visible } = useBackTop(props);
<VbenButton
v-if="visible"
:style="backTopStyle"
class="bg-accent hover:bg-heavy data fixed bottom-10 right-5 z-10 h-10 w-10 rounded-full"
class="bg-accent hover:bg-heavy data fixed bottom-10 right-5 z-[1000] h-10 w-10 rounded-full"
size="icon"
variant="icon"
@click="handleClick"