Commit 2263ac7e authored by wuwangwolihui's avatar wuwangwolihui

修改-ActiveInfo-anchorSkip

parent ad44e183
This diff is collapsed.
...@@ -198,7 +198,6 @@ ...@@ -198,7 +198,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
...@@ -277,7 +276,7 @@ ...@@ -277,7 +276,7 @@
}, },
// 锚点跳转方法 // 锚点跳转方法
anchorSkip(id) { anchorSkip(id) {
document.querySelector(id).scrollIntoView({ document.querySelector(`[id="${id}"]`).scrollIntoView({
behavior: 'smooth', behavior: 'smooth',
block: 'center' block: 'center'
}); });
...@@ -305,7 +304,7 @@ ...@@ -305,7 +304,7 @@
let value = father.innerHTML.replace(/<(.*?)>/g, '').replace(/<\/(.*?)>/g, ''); let value = father.innerHTML.replace(/<(.*?)>/g, '').replace(/<\/(.*?)>/g, '');
if (value && value.length < 30) { if (value && value.length < 30) {
anchorList.push({ anchorList.push({
id: '#' + item, id: item,
name: value, name: value,
}) })
} }
...@@ -565,12 +564,14 @@ ...@@ -565,12 +564,14 @@
display: inline-block; display: inline-block;
text-decoration: none; text-decoration: none;
color: #333333; color: #333333;
width: 100%;
font-size: 18px; font-size: 18px;
/*height: 44px;*/ /*width: 100%;*/
line-height: 44px; /*line-height: 44px;*/
margin: 10px 0;
text-align: center; text-align: center;
width: calc(100% - 10px);
line-height: 24px;
padding: 10px 5px;
margin: 10px 0;
border-bottom: 1px solid #cccccc; border-bottom: 1px solid #cccccc;
cursor: pointer; cursor: pointer;
border-left: 4px solid transparent; border-left: 4px solid transparent;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment