fix: anchorlink not update links
parent
fdd9c3fda8
commit
fd0790695f
|
@ -225,7 +225,7 @@ export default {
|
|||
|
||||
const wrapperStyle = {
|
||||
maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : '100vh',
|
||||
...getStyle(this, true),
|
||||
// ...getStyle(this, true),
|
||||
}
|
||||
|
||||
const anchorContent = (
|
||||
|
|
|
@ -25,6 +25,12 @@ export default {
|
|||
beforeDestroy () {
|
||||
this.antAnchor.unregisterLink(this.href)
|
||||
},
|
||||
watch: {
|
||||
href (val) {
|
||||
this.antAnchor.unregisterLink(val)
|
||||
this.antAnchor.registerLink(val)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleClick () {
|
||||
this.antAnchor.scrollTo(this.href)
|
||||
|
|
Loading…
Reference in New Issue