cr anchor & avatar

pull/1225/head
tanjinzhou 2019-09-06 19:01:49 +08:00
parent 8de01cf07e
commit ae5a5878d5
2 changed files with 11 additions and 5 deletions

View File

@ -21,8 +21,10 @@ export default {
}, },
watch: { watch: {
href(val, oldVal) { href(val, oldVal) {
this.$nextTick(() => {
this.antAnchor.unregisterLink(oldVal); this.antAnchor.unregisterLink(oldVal);
this.antAnchor.registerLink(val); this.antAnchor.registerLink(val);
});
}, },
}, },

View File

@ -6,7 +6,7 @@ export default {
props: { props: {
prefixCls: { prefixCls: {
type: String, type: String,
default: 'ant-avatar', default: undefined,
}, },
shape: { shape: {
validator: val => ['circle', 'square'].includes(val), validator: val => ['circle', 'square'].includes(val),
@ -36,8 +36,12 @@ export default {
}, },
watch: { watch: {
src() { src() {
this.$nextTick(() => {
this.isImgExist = true; this.isImgExist = true;
this.scale = 1; this.scale = 1;
// force uodate for position
this.$forceUpdate();
});
}, },
}, },
mounted() { mounted() {