# 命令面板页脚

## 使用方法

`CommandPalette` 会自己渲染 `CommandPaletteFooter`，平时不用管。只有想换掉默认提示时，才需要往 `footer` 插槽里再放一个 `CommandPaletteFooter`。

```ts
import { CommandPaletteFooter } from '@astryx-vue/core/CommandPalette'
```

### 结构

- **页脚**: 承载默认提示或使用方内容的支撑区域。
- **快捷键**: 默认画出来的导航、选中和关闭按键徽章。

## 示例

常见的用法和不同的状态。

### 基础

什么内容都不放的页脚，显示组件自带的键盘提示。不给 CommandPaletteFooter 传内容，结果列表下面就还是方向键、Enter 和 Esc 那三行提示。

```vue
<script setup lang="ts">
import { createStaticSource } from '@astryx-vue/core'
import { CommandPalette, CommandPaletteFooter } from '@astryx-vue/core/CommandPalette'

const source = createStaticSource([
  { id: 'new-file', label: 'New File' },
  { id: 'open-recent', label: 'Open Recent' },
  { id: 'save-all', label: 'Save All' },
])
</script>

<template>
  <CommandPalette is-inline is-open :search-source="source">
    <template #footer>
      <CommandPaletteFooter />
    </template>
  </CommandPalette>
</template>
```

## 属性

`CommandPaletteFooter` 没有属性。

## 插槽

- `default`：换掉默认的三组提示。不传内容时，页脚显示「Navigate」「Select」「Close」三组提示，配 `↑` `↓`、`↵`、`Esc` 键帽。这些文字来自语言包，会自动跟随当前语言。
