@@ -71,6 +71,12 @@ export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandP
7171 * @IconifyIcon
7272 */
7373 icon? : IconProps [' name' ]
74+ /**
75+ * The icon displayed on the right side of the input.
76+ * @defaultValue appConfig.ui.icons.search
77+ * @IconifyIcon
78+ */
79+ trailingIcon? : IconProps [' name' ]
7480 /**
7581 * The icon displayed when an item is selected.
7682 * @defaultValue appConfig.ui.icons.check
@@ -82,7 +88,7 @@ export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandP
8288 * @defaultValue appConfig.ui.icons.chevronRight
8389 * @IconifyIcon
8490 */
85- trailingIcon ? : IconProps [' name' ]
91+ childrenIcon ? : IconProps [' name' ]
8692 /**
8793 * The placeholder text for the input.
8894 * @defaultValue t('commandPalette.placeholder')
@@ -450,7 +456,7 @@ function onSelect(e: Event, item: T) {
450456 <slot :name =" ((item.slot ? `${item.slot}-trailing` : group?.slot ? `${group.slot}-trailing` : `item-trailing`) as keyof CommandPaletteSlots<G, T>)" :item =" (item as any)" :index =" index" :ui =" ui" >
451457 <UIcon
452458 v-if =" item.children && item.children.length > 0"
453- :name =" trailingIcon || appConfig.ui.icons.chevronRight"
459+ :name =" childrenIcon || appConfig.ui.icons.chevronRight"
454460 :class =" ui.itemTrailingIcon({ class: [props.ui?.itemTrailingIcon, item.ui?.itemTrailingIcon] })"
455461 />
456462
@@ -479,6 +485,7 @@ function onSelect(e: Event, item: T) {
479485 :autofocus =" autofocus"
480486 v-bind =" inputProps"
481487 :loading-icon =" loadingIcon"
488+ :trailing-icon =" trailingIcon"
482489 :icon =" icon || appConfig.ui.icons.search"
483490 :class =" ui.input({ class: props.ui?.input })"
484491 @keydown.backspace =" onBackspace"
0 commit comments