Browse Source

cr anchor & avatar

pull/1225/head
tanjinzhou 5 years ago
parent
commit
ae5a5878d5
  1. 6
      components/anchor/AnchorLink.jsx
  2. 10
      components/avatar/Avatar.jsx

6
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);
});
},
},

10
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() {

Loading…
Cancel
Save