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