I am creating a small Vue webapp, I want to create an anchor tag in this.
I have given an id
to one of the div
I wanted to have anchor tags like this:
<div id="for-home">
....
</div>
And here is my router configuration:
export default new Router({
abstract: true,
mode: 'history',
scrollBehavior: () => ({ y: 0 }),
routes: [
{ path: '/', component: abcView}
]
})
But with this anchor tags are sometimes working and sometimes not working, Have I missed something in this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…