From 27609940266789a04c104d3b0b08ab9696ae8d88 Mon Sep 17 00:00:00 2001 From: HerringtonDarkholme <2883231+HerringtonDarkholme@users.noreply.github.com> Date: Mon, 3 Aug 2020 11:18:13 +0800 Subject: [PATCH] fix(core): fix types --- packages/avatar/src/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/avatar/src/index.vue b/packages/avatar/src/index.vue index 9c90b08b92..ec52e063f1 100644 --- a/packages/avatar/src/index.vue +++ b/packages/avatar/src/index.vue @@ -22,7 +22,7 @@ export default defineComponent({ props: { size: { type: [Number, String], - validator(val) { + validator(this: never, val: unknown) { if (typeof val === 'string') { return ['large', 'medium', 'small'].includes(val) } @@ -32,7 +32,7 @@ export default defineComponent({ shape: { type: String, default: 'circle', - validator(val: string) { + validator(this: never, val: string) { return ['circle', 'square'].includes(val) } }, @@ -46,7 +46,7 @@ export default defineComponent({ default: 'cover' } }, - setup(props: any, {emit}) { + setup(props, {emit}) { const hasLoadError = ref(false) const avatarClass = computed(() => {