diff --git a/packages/vuetify/src/components/VCard/VCard.tsx b/packages/vuetify/src/components/VCard/VCard.tsx index 053071376cc..ba0d8303f07 100644 --- a/packages/vuetify/src/components/VCard/VCard.tsx +++ b/packages/vuetify/src/components/VCard/VCard.tsx @@ -56,9 +56,9 @@ export const makeVCardProps = propsFactory({ type: [Boolean, Object] as PropType, default: true, }, - subtitle: String, - text: String, - title: String, + subtitle: [String, Number], + text: [String, Number], + title: [String, Number], ...makeBorderProps(), ...makeComponentProps(), @@ -113,14 +113,14 @@ export const VCard = genericComponent()({ useRender(() => { const Tag = isLink.value ? 'a' : props.tag - const hasTitle = !!(slots.title || props.title) - const hasSubtitle = !!(slots.subtitle || props.subtitle) + const hasTitle = !!(slots.title || props.title != null) + const hasSubtitle = !!(slots.subtitle || props.subtitle != null) const hasHeader = hasTitle || hasSubtitle const hasAppend = !!(slots.append || props.appendAvatar || props.appendIcon) const hasPrepend = !!(slots.prepend || props.prependAvatar || props.prependIcon) const hasImage = !!(slots.image || props.image) const hasCardItem = hasHeader || hasPrepend || hasAppend - const hasText = !!(slots.text || props.text) + const hasText = !!(slots.text || props.text != null) return ( ()({ const hasPrepend = !!(hasPrependMedia || slots.prepend) const hasAppendMedia = !!(props.appendAvatar || props.appendIcon) const hasAppend = !!(hasAppendMedia || slots.append) - const hasTitle = !!(props.title || slots.title) - const hasSubtitle = !!(props.subtitle || slots.subtitle) + const hasTitle = !!(props.title != null || slots.title) + const hasSubtitle = !!(props.subtitle != null || slots.subtitle) return (
(), @@ -179,8 +179,8 @@ export const VListItem = genericComponent()({ useRender(() => { const Tag = isLink.value ? 'a' : props.tag - const hasTitle = (slots.title || props.title) - const hasSubtitle = (slots.subtitle || props.subtitle) + const hasTitle = (slots.title || props.title != null) + const hasSubtitle = (slots.subtitle || props.subtitle != null) const hasAppendMedia = !!(props.appendAvatar || props.appendIcon) const hasAppend = !!(hasAppendMedia || slots.append) const hasPrependMedia = !!(props.prependAvatar || props.prependIcon) diff --git a/packages/vuetify/src/components/VStepper/VStepperItem.tsx b/packages/vuetify/src/components/VStepper/VStepperItem.tsx index 73de1cdb013..7f7b5757742 100644 --- a/packages/vuetify/src/components/VStepper/VStepperItem.tsx +++ b/packages/vuetify/src/components/VStepper/VStepperItem.tsx @@ -24,8 +24,8 @@ export type StepperItemSlot = { canEdit: boolean hasError: boolean hasCompleted: boolean - title?: string - subtitle?: string + title?: string | number + subtitle?: string | number step: any } @@ -115,8 +115,8 @@ export const VStepperItem = genericComponent()({ !hasError.value && !props.disabled ) - const hasTitle = !!(props.title || slots.title) - const hasSubtitle = !!(props.subtitle || slots.subtitle) + const hasTitle = !!(props.title != null || slots.title) + const hasSubtitle = !!(props.subtitle != null || slots.subtitle) function onClick () { group?.toggle()