From 2b749d9588a9c4af1d6e8f214fa1888ee8a50f42 Mon Sep 17 00:00:00 2001 From: "zhigang.li" Date: Fri, 29 Jun 2018 17:15:39 +0800 Subject: [PATCH 1/6] commit --- examples/routers/anchor.vue | 5 +++++ src/components/anchor/anchor-link.vue | 2 +- src/styles/components/index.less | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/routers/anchor.vue b/examples/routers/anchor.vue index e53f2941..f99e3fbc 100644 --- a/examples/routers/anchor.vue +++ b/examples/routers/anchor.vue @@ -7,6 +7,7 @@ + @@ -32,6 +33,8 @@ +

李氏专跳

+

这是信息司大是大非胜多负少的{{i}}

@@ -58,6 +61,8 @@

这是新添加的哦哦哦哦哦 哦

这是信息司大是大非胜多负少的{{i}}

+

李氏专跳

+

这是信息司大是大非胜多负少的{{i}}

diff --git a/src/components/anchor/anchor-link.vue b/src/components/anchor/anchor-link.vue index a009e1f7..d7a68df4 100644 --- a/src/components/anchor/anchor-link.vue +++ b/src/components/anchor/anchor-link.vue @@ -1,6 +1,6 @@ diff --git a/src/styles/components/index.less b/src/styles/components/index.less index 754fc291..2e1b46e9 100644 --- a/src/styles/components/index.less +++ b/src/styles/components/index.less @@ -45,4 +45,3 @@ @import "color-picker"; @import "auto-complete"; @import "anchor"; -@import "time"; From 252573372993e2909079add2279953aee347338e Mon Sep 17 00:00:00 2001 From: "zhigang.li" Date: Fri, 29 Jun 2018 17:31:05 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=A7=A3=E5=86=B3anchor=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=9C=A8=E9=A1=B5=E9=9D=A2=E6=B2=A1=E6=9C=89=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E9=94=9A=E7=82=B9=E6=97=B6=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/anchor/anchor.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/anchor/anchor.vue b/src/components/anchor/anchor.vue index 0e273d20..c86a8aff 100644 --- a/src/components/anchor/anchor.vue +++ b/src/components/anchor/anchor.vue @@ -93,6 +93,7 @@ export default { handleHashChange () { const url = window.location.href; const sharpLinkMatch = sharpMatcherRegx.exec(url); + if (!sharpLinkMatch) return; this.currentLink = sharpLinkMatch[0]; this.currentId = sharpLinkMatch[1]; }, From 576329cc63bfd6f32d7f176d177cf4a7199fc436 Mon Sep 17 00:00:00 2001 From: "zhigang.li" Date: Fri, 29 Jun 2018 18:10:14 +0800 Subject: [PATCH 3/6] use link.js for anchor --- src/components/anchor/anchor-link.vue | 8 ++++++-- src/components/anchor/anchor.vue | 15 ++++----------- src/mixins/link.js | 9 +++++---- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/components/anchor/anchor-link.vue b/src/components/anchor/anchor-link.vue index 4b480209..3c9eab2d 100644 --- a/src/components/anchor/anchor-link.vue +++ b/src/components/anchor/anchor-link.vue @@ -5,9 +5,11 @@