feat(背景图): 增加切换时间设置

This commit is contained in:
jaw52 2022-05-30 18:01:22 +08:00
parent 877ff2b05a
commit 7dcedcfa75
2 changed files with 9 additions and 2 deletions

View File

@ -15,7 +15,7 @@ export default {
}
},
mounted () {
let { bodyBgImg, bodyBgImgOpacity } = this.$themeConfig
let { bodyBgImg, bodyBgImgOpacity,bodyBgImgInterval = 15 } = this.$themeConfig
if (type(bodyBgImg) === 'string') {
this.bgImg = bodyBgImg
@ -30,7 +30,7 @@ export default {
count = 0
}
this.bgImg = bodyBgImg[count]
}, 15000);
}, bodyBgImgInterval * 1000);
}
if (bodyBgImgOpacity !== undefined) {

View File

@ -43,6 +43,13 @@ export interface VdoingThemeConfig extends NoSidebar4DefaultThemeConfig {
*/
bodyBgImgOpacity?: 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
/**
* body当多张背景图时15s
* @default 15
*/
bodyBgImgInterval?: number;
/**
*
* @default true