From 7dcedcfa75b6a41b208a39d99305e053aa9a5bf2 Mon Sep 17 00:00:00 2001 From: jaw52 <2135326728@qq.com> Date: Mon, 30 May 2022 18:01:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(=E8=83=8C=E6=99=AF=E5=9B=BE):=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=87=E6=8D=A2=E6=97=B6=E9=97=B4=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vdoing/components/BodyBgImg.vue | 4 ++-- vdoing/types/index.ts | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/vdoing/components/BodyBgImg.vue b/vdoing/components/BodyBgImg.vue index 15186e62e3..88633c7a34 100644 --- a/vdoing/components/BodyBgImg.vue +++ b/vdoing/components/BodyBgImg.vue @@ -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) { diff --git a/vdoing/types/index.ts b/vdoing/types/index.ts index 581cdf9638..e02a69bd92 100644 --- a/vdoing/types/index.ts +++ b/vdoing/types/index.ts @@ -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 From 053051ec07f1665ccc4dad094789a36d240fb50a Mon Sep 17 00:00:00 2001 From: jaw52 <2135326728@qq.com> Date: Tue, 31 May 2022 09:16:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=E5=BF=BD?= =?UTF-8?q?=E7=95=A5=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 84e173ca4c..ab50af3cfa 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ node_modules # yarn yarn.lock +pnpm-lock.yaml + # vscode .vscode