Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/runtime/components/ChangelogVersions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const props = withDefaults(defineProps<ChangelogVersionsProps<T>>(), {
})
const slots = defineSlots<ChangelogVersionsSlots<T>>()

const proxySlots = omit(slots, ['default', 'indicator'])
const getProxySlots = () => omit(slots, ['default', 'indicator'])

const appConfig = useAppConfig() as ChangelogVersions['AppConfig']

Expand Down Expand Up @@ -93,7 +93,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.changelogVer
:indicator="!!props.indicator"
v-bind="(version as ChangelogVersionProps)"
>
<template v-for="(_, name) in proxySlots" #[name]>
<template v-for="(_, name) in getProxySlots()" #[name]>
<slot :name="name" v-bind="{ version }" />
</template>
</UChangelogVersion>
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/ChatMessages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const props = withDefaults(defineProps<ChatMessagesProps>(), {
})
const slots = defineSlots<ChatMessagesSlots>()

const proxySlots = omit(slots, ['default', 'indicator', 'viewport'])
const getProxySlots = () => omit(slots, ['default', 'indicator', 'viewport'])

const appConfig = useAppConfig() as ChatMessages['AppConfig']

Expand Down Expand Up @@ -268,7 +268,7 @@ onMounted(() => {
:ref="(el) => registerMessageRef(message.id, el as ComponentPublicInstance)"
:compact="compact"
>
<template v-for="(_, name) in proxySlots" #[name]>
<template v-for="(_, name) in getProxySlots()" #[name]>
<slot :name="name" v-bind="{ message }" />
</template>
</UChatMessage>
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/ChatPrompt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const appConfig = useAppConfig() as ChatPrompt['AppConfig']

const textareaProps = useForwardProps(reactivePick(props, 'autofocus', 'autoresize', 'rows'))

const proxySlots = omit(slots, ['header', 'footer'])
const getProxySlots = () => omit(slots, ['header', 'footer'])

const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.chatPrompt || {}) })({
variant: props.variant
Expand Down Expand Up @@ -113,7 +113,7 @@ defineExpose({
@keydown.enter.exact.prevent="submit"
@keydown.esc="blur"
>
<template v-for="(_, name) in proxySlots" #[name]="slotData">
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
<slot :name="name" v-bind="slotData" />
</template>
</UTextarea>
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/CheckboxGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const appConfig = useAppConfig() as CheckboxGroup['AppConfig']

const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'orientation', 'loop', 'required'), emits)
const checkboxProps = useForwardProps(reactivePick(props, 'variant', 'indicator', 'icon'))
const proxySlots = omit(slots, ['legend'])
const getProxySlots = () => omit(slots, ['legend'])

const { emitFormChange, emitFormInput, color, name, size, id: _id, disabled, ariaAttrs } = useFormField<CheckboxGroupProps<T>>(props, { bind: false })
const id = _id.value ?? useId()
Expand Down Expand Up @@ -187,7 +187,7 @@ function onUpdate(value: any) {
:ui="{ ...(props.ui ? omit(props.ui, ['root']) : undefined), ...(item.ui || {}) }"
:class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })"
>
<template v-for="(_, name) in proxySlots" #[name]>
<template v-for="(_, name) in getProxySlots()" #[name]>
<slot :name="(name as keyof CheckboxGroupSlots<T>)" :item="item" />
</template>
</UCheckbox>
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/ContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const appConfig = useAppConfig() as ContextMenu['AppConfig']

const rootProps = useForwardPropsEmits(reactivePick(props, 'modal'), emits)
const contentProps = toRef(() => props.content)
const proxySlots = omit(slots, ['default'])
const getProxySlots = () => omit(slots, ['default'])

const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.contextMenu || {}) })({
size: props.size
Expand All @@ -146,7 +146,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.contextMenu
:loading-icon="loadingIcon"
:external-icon="externalIcon"
>
<template v-for="(_, name) in proxySlots" #[name]="slotData">
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
<slot :name="(name as keyof ContextMenuSlots<T>)" v-bind="slotData" />
</template>
</UContextMenuContent>
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/ContextMenuContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const appConfig = useAppConfig()

const portalProps = usePortal(toRef(() => props.portal))
const contentProps = useForwardPropsEmits(reactiveOmit(props, 'sub', 'items', 'portal', 'labelKey', 'checkedIcon', 'loadingIcon', 'externalIcon', 'class', 'ui', 'uiOverride'), emits)
const proxySlots = omit(slots, ['default'])
const getProxySlots = () => omit(slots, ['default'])

const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate<{ item: ContextMenuItem, active?: boolean, index: number }>()

Expand Down Expand Up @@ -141,7 +141,7 @@ const groups = computed<ContextMenuItem[][]>(() =>
:external-icon="externalIcon"
v-bind="item.content"
>
<template v-for="(_, name) in proxySlots" #[name]="slotData">
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
<slot :name="(name as keyof ContextMenuSlots<T>)" v-bind="slotData" />
</template>
</UContextMenuContent>
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/DashboardSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const appConfig = useAppConfig() as DashboardSearch['AppConfig']

const commandPaletteProps = useForwardProps(reactivePick(props, 'icon', 'placeholder', 'autofocus', 'loading', 'loadingIcon', 'close', 'closeIcon'))

const proxySlots = omit(slots, ['content'])
const getProxySlots = () => omit(slots, ['content'])

const fuse = computed(() => defu({}, props.fuse, {
fuseOptions: {
Expand Down Expand Up @@ -196,7 +196,7 @@ defineExpose({
@update:model-value="onSelect"
@update:open="open = $event"
>
<template v-for="(_, name) in proxySlots" #[name]="slotData">
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
<slot :name="name" v-bind="slotData" />
</template>
</UCommandPalette>
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/DashboardSearchButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const slots = defineSlots<ButtonSlots>()

const [DefineButtonTemplate, ReuseButtonTemplate] = createReusableTemplate()

const proxySlots = omit(slots, ['trailing'])
const getProxySlots = () => omit(slots, ['trailing'])

const rootProps = useForwardProps(reactivePick(props, 'color', 'size'))
const tooltipProps = toRef(() => defu(typeof props.tooltip === 'boolean' ? {} : props.tooltip, { delayDuration: 0, content: { side: 'right' } }) as TooltipProps)
Expand Down Expand Up @@ -108,7 +108,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.dashboardSea
:ui="transformUI(ui, props.ui)"
@click="toggleSearch"
>
<template v-for="(_, name) in proxySlots" #[name]="slotData">
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
<slot :name="name" v-bind="slotData" />
</template>

Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/DropdownMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const appConfig = useAppConfig() as DropdownMenu['AppConfig']
const rootProps = useForwardPropsEmits(reactivePick(props, 'defaultOpen', 'open', 'modal'), emits)
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8 }) as DropdownMenuContentProps)
const arrowProps = toRef(() => props.arrow as DropdownMenuArrowProps)
const proxySlots = omit(slots, ['default'])
const getProxySlots = () => omit(slots, ['default'])

const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.dropdownMenu || {}) })({
size: props.size
Expand All @@ -156,7 +156,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.dropdownMenu
:loading-icon="loadingIcon"
:external-icon="externalIcon"
>
<template v-for="(_, name) in proxySlots" #[name]="slotData">
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
<slot :name="(name as keyof DropdownMenuSlots<T>)" v-bind="slotData" />
</template>

Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/DropdownMenuContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const appConfig = useAppConfig()

const portalProps = usePortal(toRef(() => props.portal))
const contentProps = useForwardPropsEmits(reactiveOmit(props, 'sub', 'items', 'portal', 'labelKey', 'checkedIcon', 'loadingIcon', 'externalIcon', 'class', 'ui', 'uiOverride'), emits)
const proxySlots = omit(slots, ['default'])
const getProxySlots = () => omit(slots, ['default'])

const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate<{ item: DropdownMenuItem, active?: boolean, index: number }>()

Expand Down Expand Up @@ -152,7 +152,7 @@ const groups = computed<DropdownMenuItem[][]>(() =>
:external-icon="externalIcon"
v-bind="item.content"
>
<template v-for="(_, name) in proxySlots" #[name]="slotData">
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
<slot :name="(name as keyof DropdownMenuContentSlots<T>)" v-bind="slotData" />
</template>
</UDropdownMenuContent>
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/content/ContentSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const appConfig = useAppConfig() as ContentSearch['AppConfig']

const commandPaletteProps = useForwardProps(reactivePick(props, 'icon', 'placeholder', 'autofocus', 'loading', 'loadingIcon', 'close', 'closeIcon'))

const proxySlots = omit(slots, ['content'])
const getProxySlots = () => omit(slots, ['content'])

const fuse = computed(() => defu({}, props.fuse, {
fuseOptions: {
Expand Down Expand Up @@ -283,7 +283,7 @@ defineExpose({
@update:model-value="onSelect"
@update:open="open = $event"
>
<template v-for="(_, name) in proxySlots" #[name]="slotData">
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
<slot :name="name" v-bind="slotData" />
</template>
</UCommandPalette>
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/content/ContentSearchButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const slots = defineSlots<ButtonSlots>()

const [DefineButtonTemplate, ReuseButtonTemplate] = createReusableTemplate()

const proxySlots = omit(slots, ['trailing'])
const getProxySlots = () => omit(slots, ['trailing'])

const rootProps = useForwardProps(reactivePick(props, 'color', 'size'))
const tooltipProps = toRef(() => defu(typeof props.tooltip === 'boolean' ? {} : props.tooltip, { delayDuration: 0, content: { side: 'right' } }) as TooltipProps)
Expand Down Expand Up @@ -108,7 +108,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.contentSearc
:ui="transformUI(ui, props.ui)"
@click="open = true"
>
<template v-for="(_, name) in proxySlots" #[name]="slotData">
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
<slot :name="name" v-bind="slotData" />
</template>

Expand Down
Loading