From bdaf1546445d05f743d1f93eec9761b723c18479 Mon Sep 17 00:00:00 2001 From: "Timber.Wang" Date: Tue, 18 Jan 2022 01:13:41 +0800 Subject: [PATCH] =?UTF-8?q?add:=20smallEggs=20*=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E4=B8=AA=E5=B0=8F=E5=BD=A9=E8=9B=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 5fa93f0..5d0cfc8 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@ @@ -118,7 +117,9 @@ // 抽屉弹出方向 direction: 'rtl', // 动态背景启用 - dynamicBg: true + dynamicBg: true, + // 小彩蛋 + smallEggs: 0 } }, // 生命周期函数 @@ -156,6 +157,29 @@ // 搜索输入框回车键监听 searchEnterFun() { + this.smallEggs = this.smallEggs + 1 + // console.log(this.smallEggs) + // 小彩蛋 + if (this.smallEggs === 10) { + this.$confirm('即将为你导航到神秘网页,是否继续?', '恭喜你发现了一个彩蛋!', { + confirmButtonText: '去瞧瞧', + cancelButtonText: '算了吧', + roundButton: true, + type: 'success' + }) + .then(() => { + window.open('https://github.com/Elijah-0616/bdLite') + return + }) + .catch(() => { + this.$notify.warning({ + title: '你已取消前往神秘网页', + message: '若想再次激活此彩蛋,请刷新网页!' + }) + return + }) + } + // 搜索功能 this.bottomForm() }, @@ -165,7 +189,7 @@ const a = this.input // 输入框判空 if (a === null || a === '' || typeof a === 'undefined') { - console.log('输入框空!') + // console.log('输入框空!') this.$notify.info({ title: '输入框为空', message: '您还没有输入搜索内容(~ ̄▽ ̄)~'