From 2ebe2041e86f83e31d17f1d81ea969ec52584cd2 Mon Sep 17 00:00:00 2001 From: tangwei Date: Wed, 13 Oct 2021 14:39:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E5=8E=BB=E9=99=A4log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- devui/anchor/src/d-anchor.ts | 4 ++-- devui/anchor/src/util.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/devui/anchor/src/d-anchor.ts b/devui/anchor/src/d-anchor.ts index 5f76e8ce..84e555f0 100644 --- a/devui/anchor/src/d-anchor.ts +++ b/devui/anchor/src/d-anchor.ts @@ -21,8 +21,8 @@ export default { el.onclick = e => { hightLightFn(binding.value); - const classList = document.getElementById((e.target as HTMLElement).getAttribute('name')).classList; - console.log(classList) + // const classList = document.getElementById((e.target as HTMLElement).getAttribute('name')).classList; + // console.log(classList) } } diff --git a/devui/anchor/src/util.ts b/devui/anchor/src/util.ts index 868446b3..3ddbbece 100644 --- a/devui/anchor/src/util.ts +++ b/devui/anchor/src/util.ts @@ -129,7 +129,7 @@ function activateLink(hash:string | boolean):void { } if (!scollFlag) { - hash ? hightLightFn((hash as string).split('#')[1] ) : console.log(hash) + hash && hightLightFn((hash as string).split('#')[1] ) }else { hightLightFn(hashName) } -- Gitee From ff3542ea28e826cbbe7a1642cd822e42574c7bff Mon Sep 17 00:00:00 2001 From: tangwei Date: Wed, 13 Oct 2021 16:47:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20md=E6=96=87=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/components/anchor/index.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/components/anchor/index.md b/docs/components/anchor/index.md index 1a3ad44a..e27cbb48 100644 --- a/docs/components/anchor/index.md +++ b/docs/components/anchor/index.md @@ -2,21 +2,6 @@ 跳转到页面指定位置的组件。 -### 何时使用 - -需要在页面的各个部分之间实现快速跳转时。 - - - - ### 基本用法 @@ -48,6 +33,21 @@ ``` +### 何时使用 + +需要在页面的各个部分之间实现快速跳转时。 + + + + ### dAnchor 定义一个锚点。 -- Gitee From 25b4a7400b7a3f530e5ea9974a1af422068a3e0a Mon Sep 17 00:00:00 2001 From: tangwei Date: Wed, 13 Oct 2021 20:45:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20md=E6=96=87=E4=BB=B6=E6=94=B9?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- devui/anchor/src/d-anchor.ts | 3 --- docs/components/anchor/index.md | 30 +++++++++++++++--------------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/devui/anchor/src/d-anchor.ts b/devui/anchor/src/d-anchor.ts index 84e555f0..c594a452 100644 --- a/devui/anchor/src/d-anchor.ts +++ b/devui/anchor/src/d-anchor.ts @@ -20,9 +20,6 @@ export default { el.setAttribute('name',binding.value); el.onclick = e => { hightLightFn(binding.value); - - // const classList = document.getElementById((e.target as HTMLElement).getAttribute('name')).classList; - // console.log(classList) } } diff --git a/docs/components/anchor/index.md b/docs/components/anchor/index.md index e27cbb48..1a3ad44a 100644 --- a/docs/components/anchor/index.md +++ b/docs/components/anchor/index.md @@ -2,6 +2,21 @@ 跳转到页面指定位置的组件。 +### 何时使用 + +需要在页面的各个部分之间实现快速跳转时。 + + + + ### 基本用法 @@ -33,21 +48,6 @@ ``` -### 何时使用 - -需要在页面的各个部分之间实现快速跳转时。 - - - - ### dAnchor 定义一个锚点。 -- Gitee