fix(core): fix types

This commit is contained in:
HerringtonDarkholme 2020-08-03 11:18:13 +08:00 committed by zazzaz
parent a3e2cf6c6f
commit 2760994026

View File

@ -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(() => {