docs: 添加更新日志链接并优化CHANGELOG格式

在文档配置中添加了更新日志的导航链接,并优化了CHANGELOG.md的格式,使其更易读
This commit is contained in:
feige996 2025-05-20 20:56:39 +08:00
parent 0bc535a02b
commit 2b3273d87e
2 changed files with 27 additions and 17 deletions

View File

@ -113,6 +113,10 @@ export default defineConfig({
text: '🥤 打赏', text: '🥤 打赏',
link: '/advanced/rewards/rewards', link: '/advanced/rewards/rewards',
}, },
{
text: '更新日志',
link: '/CHANGELOG',
},
{ {
text: '相关链接', text: '相关链接',
link: '/other/links/links', link: '/other/links/links',
@ -150,6 +154,10 @@ export default defineConfig({
{ text: '最佳实践', link: '20-best' }, { text: '最佳实践', link: '20-best' },
], ],
}, },
{
text: '更新日志',
link: '/CHANGELOG',
},
{ {
text: '社交', text: '社交',
base: '/advanced/', base: '/advanced/',

View File

@ -16,24 +16,26 @@
- 支持 `无 TabBar` 模式,用户只需删除 `pages.config.ts` 中的 `tabBar` 配置即可。 - 支持 `无 TabBar` 模式,用户只需删除 `pages.config.ts` 中的 `tabBar` 配置即可。
> 对于 `v2.7.0` 以下版本,需按以下步骤操作: ::: details 对于 `v2.7.0` 以下版本,需按以下步骤操作:
- 执行 `pnpm uvm` 升级 `@dcloudio/uni-app` - 执行 `pnpm uvm` 升级 `@dcloudio/uni-app`
- 修改 `src/utils/index.ts` 部分代码: - 修改 `src/utils/index.ts` 部分代码:
```ts ```ts
import pagesConfig from '@/pages.json' import pagesConfig from '@/pages.json'
const { pages, subPackages, tabBar = { list: [] } } = { ...pagesConfig } const { pages, subPackages, tabBar = { list: [] } } = { ...pagesConfig }
/** 判断当前页面是否是 tabbar 页 */ /** 判断当前页面是否是 tabbar 页 */
export const getIsTabbar = () => { export const getIsTabbar = () => {
try { try {
const lastPage = getLastPage() const lastPage = getLastPage()
const currPath = lastPage?.route const currPath = lastPage?.route
return Boolean(tabBar?.list?.some((item) => item.pagePath === currPath)) return Boolean(tabBar?.list?.some((item) => item.pagePath === currPath))
} catch { } catch {
return false return false
} }
} }
``` ```
:::