From 26a833cdd0319c1820ffb5d5267bae6d8e80d1ea Mon Sep 17 00:00:00 2001 From: xuyiming Date: Mon, 2 Nov 2020 12:45:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/doc-width-nav.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/doc-width-nav.vue b/src/components/doc-width-nav.vue index 76c1cd4..c0e416e 100644 --- a/src/components/doc-width-nav.vue +++ b/src/components/doc-width-nav.vue @@ -87,22 +87,22 @@ export default { pre_h2_index = 0; pre_h3_index = 0; level = 1; - id = `nav_${pre_h1_index}` + "_" + time; + id = `nav_${pre_h1_index}_${time}`; newTitle = title.replace(/

/g)) { pre_h2_index++; pre_h3_index = 0; level = 2; - id = `nav_${pre_h1_index}_${pre_h2_index}` + "_" + time; + id = `nav_${pre_h1_index}_${pre_h2_index}_${time}`; newTitle = title.replace(/

/g)) { pre_h3_index++; level = 3; - id = `nav_${pre_h1_index}_${pre_h2_index}_${pre_h3_index}`; + id = `nav_${pre_h1_index}_${pre_h2_index}_${pre_h3_index}_${time}`; - newTitle = title.replace(/