Skip to content

Commit

Permalink
style(VFileUpload): fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Apr 27, 2024
1 parent 0510ede commit 242d497
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/vuetify/src/labs/VFileUpload/VFileUpload.tsx
Expand Up @@ -24,6 +24,13 @@ import { genericComponent, humanReadableFileSize, only, propsFactory, useRender,
// Types
import type { PropType } from 'vue'

export type VFileUploadSlots = {
default: never
icon: never
title: never
divider: never
}

export const makeVFileUploadProps = propsFactory({
browseText: {
type: String,
Expand Down Expand Up @@ -60,7 +67,7 @@ export const makeVFileUploadProps = propsFactory({
...makeVSheetProps(),
}, 'VFileUpload')

export const VFileUpload = genericComponent()({
export const VFileUpload = genericComponent<VFileUploadSlots>()({
name: 'VFileUpload',

props: makeVFileUploadProps(),
Expand Down Expand Up @@ -123,7 +130,10 @@ export const VFileUpload = genericComponent()({

for (const file of files) {
if (!model.value.some(f => f.name === file.name)) {
model.value.push(file)
model.value = [
...model.value,
file,
]
}
}
}
Expand Down

0 comments on commit 242d497

Please sign in to comment.