docs: update themeConfig lastUpdated doc

This commit is contained in:
pengzhanbo 2024-03-25 14:16:18 +08:00
parent c3d9a4e6de
commit be7de7bdbd

View File

@ -438,15 +438,29 @@ type NavItem = string | {
### lastUpdated
- 类型: `boolean`
- 默认值: `true`
- 详情: 是否显示最后更新时间
- 类型: `false | LastUpdatedOptions`
- 默认值: `{ text: 'Last Updated', formatOptions: { dateStyle: 'short', timeStyle: 'short' } }`
- 详情: 最后更新时间
### lastUpdatedText
```ts
interface LastUpdatedOptions {
/**
* 设置 最后更新时间 的文本
*
* @default 'Last updated'
*/
text?: string
- 类型: `string`
- 默认值: `'Last Updated'`
- 详情: 最后更新时间的文字
/**
* 设置最后更新时间格式的选项。
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options
*
* @default
* { dateStyle: 'short', timeStyle: 'short' }
*/
formatOptions?: Intl.DateTimeFormatOptions & { forceLocale?: boolean }
}
```
### contributors