Merge pull request #598 from jaw52/master

feat(背景图): 增加切换时间设置
This commit is contained in:
Evan Xu 2022-05-31 09:48:08 +08:00 committed by GitHub
commit 9f5a20eb28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

2
.gitignore vendored
View File

@ -5,6 +5,8 @@ node_modules
# yarn
yarn.lock
pnpm-lock.yaml
# vscode
.vscode

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