Skip to content

Commit ae5a587

Browse files
committed
cr anchor & avatar
1 parent 8de01cf commit ae5a587

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

components/anchor/AnchorLink.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ export default {
2121
},
2222
watch: {
2323
href(val, oldVal) {
24-
this.antAnchor.unregisterLink(oldVal);
25-
this.antAnchor.registerLink(val);
24+
this.$nextTick(() => {
25+
this.antAnchor.unregisterLink(oldVal);
26+
this.antAnchor.registerLink(val);
27+
});
2628
},
2729
},
2830

components/avatar/Avatar.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
props: {
77
prefixCls: {
88
type: String,
9-
default: 'ant-avatar',
9+
default: undefined,
1010
},
1111
shape: {
1212
validator: val => ['circle', 'square'].includes(val),
@@ -36,8 +36,12 @@ export default {
3636
},
3737
watch: {
3838
src() {
39-
this.isImgExist = true;
40-
this.scale = 1;
39+
this.$nextTick(() => {
40+
this.isImgExist = true;
41+
this.scale = 1;
42+
// force uodate for position
43+
this.$forceUpdate();
44+
});
4145
},
4246
},
4347
mounted() {

0 commit comments

Comments
 (0)