diff --git a/components/anchor/AnchorLink.jsx b/components/anchor/AnchorLink.jsx index 6410a2a28..f1e3836fa 100644 --- a/components/anchor/AnchorLink.jsx +++ b/components/anchor/AnchorLink.jsx @@ -21,8 +21,10 @@ export default { }, watch: { href(val, oldVal) { - this.antAnchor.unregisterLink(oldVal); - this.antAnchor.registerLink(val); + this.$nextTick(() => { + this.antAnchor.unregisterLink(oldVal); + this.antAnchor.registerLink(val); + }); }, }, diff --git a/components/avatar/Avatar.jsx b/components/avatar/Avatar.jsx index e02abe4d8..a40aa1aa5 100644 --- a/components/avatar/Avatar.jsx +++ b/components/avatar/Avatar.jsx @@ -6,7 +6,7 @@ export default { props: { prefixCls: { type: String, - default: 'ant-avatar', + default: undefined, }, shape: { validator: val => ['circle', 'square'].includes(val), @@ -36,8 +36,12 @@ export default { }, watch: { src() { - this.isImgExist = true; - this.scale = 1; + this.$nextTick(() => { + this.isImgExist = true; + this.scale = 1; + // force uodate for position + this.$forceUpdate(); + }); }, }, mounted() {