From b48125494b806b84924150bbcff111f3613a458d Mon Sep 17 00:00:00 2001 From: bianxuerui <407955981@qq.com> Date: Fri, 11 Oct 2024 12:54:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BD=93=E5=9C=A8URL=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E8=BE=93=E5=85=A5=E6=90=9C=E7=B4=A2=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E9=87=8D=E5=AE=9A=E5=90=91=E5=88=B0=E9=A6=96?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Results.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Results.vue b/src/components/Results.vue index 2b19e79..00dc615 100644 --- a/src/components/Results.vue +++ b/src/components/Results.vue @@ -26,7 +26,7 @@ export default { this.loadGoogleCSE(); this.setupResultsRenderedCallback(); // 注册渲染结果回调函数 if (!this.query) { - history.back(); + this.goHome(); } }, methods: { @@ -48,7 +48,7 @@ export default { // 定义一个渲染回调函数,用于移除不需要的属性 const myWebResultsRenderedCallback = () => { const links = document.querySelectorAll('a.gs-title'); - + links.forEach((anchor) => { // 移除 'data-cturl' 和 'data-ctorig' 属性 anchor.removeAttribute('data-cturl'); @@ -96,7 +96,8 @@ export default { color: #58636f; margin-right: 20px; white-space: nowrap; - user-select: none; /* 防止标题文字被选中 */ + user-select: none; + /* 防止标题文字被选中 */ } /* 针对小屏幕的样式 */