mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
feat(ContextMenu/DropdownMenu/NavigationMenu): add external-icon prop
Resolves #2996
This commit is contained in:
@@ -51,6 +51,12 @@ export interface DropdownMenuProps<T> extends Omit<DropdownMenuRootProps, 'dir'>
|
||||
* @defaultValue appConfig.ui.icons.loading
|
||||
*/
|
||||
loadingIcon?: string
|
||||
/**
|
||||
* The icon displayed when the item is an external link.
|
||||
* Set to `false` to hide the external icon.
|
||||
* @defaultValue appConfig.ui.icons.external
|
||||
*/
|
||||
externalIcon?: boolean | string
|
||||
/**
|
||||
* The content of the menu.
|
||||
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
||||
@@ -149,6 +155,7 @@ import UDropdownMenuContent from './DropdownMenuContent.vue'
|
||||
const props = withDefaults(defineProps<DropdownMenuProps<T>>(), {
|
||||
portal: true,
|
||||
modal: true,
|
||||
externalIcon: true,
|
||||
labelKey: 'label'
|
||||
})
|
||||
const emits = defineEmits<DropdownMenuEmits>()
|
||||
@@ -180,6 +187,7 @@ const ui = computed(() => dropdownMenu({
|
||||
:label-key="labelKey"
|
||||
:checked-icon="checkedIcon"
|
||||
:loading-icon="loadingIcon"
|
||||
:external-icon="externalIcon"
|
||||
>
|
||||
<template v-for="(_, name) in proxySlots" #[name]="slotData: any">
|
||||
<slot :name="name" v-bind="slotData" />
|
||||
|
||||
Reference in New Issue
Block a user