refactor(project): @vben/vite-connect is reconfigured to support synchronization

This commit is contained in:
vben
2024-07-13 21:00:31 +08:00
parent c81ac5684c
commit e441d14fa2
20 changed files with 175 additions and 126 deletions

View File

@@ -2,7 +2,7 @@
`effects` 目录专门用于存放与副作用相关的代码和逻辑。如果你的包具有以下特点,建议将其放置在 `effects` 目录下:
- 使用状态管理框架 Pinia并包含处理副作用如异步操作、API 调用)的部分。
- 使用状态管理框架 `pinia`并包含处理副作用如异步操作、API 调用)的部分。
- 使用 `@vben-core/preferences` 处理用户偏好设置,涉及本地存储或浏览器缓存逻辑(如使用 `localStorage`)。
- 处理导航、页面跳转等场景,需要管理路由变化的逻辑。
- 包含与特定组件库紧密耦合或依赖大型仓库的部分。

View File

@@ -3,6 +3,11 @@ import type { AboutProps, DescriptionItem } from './about';
import { h } from 'vue';
import {
VBEN_DOC_URL,
VBEN_GITHUB_URL,
VBEN_PREVIEW_URL,
} from '@vben/constants';
import { VbenLink, VbenRenderContent } from '@vben-core/shadcn-ui';
interface Props extends AboutProps {}
@@ -27,7 +32,6 @@ const {
devDependencies = {},
homepage,
license,
repositoryUrl,
version,
// vite inject-metadata 插件注入的全局变量
// eslint-disable-next-line no-undef
@@ -47,24 +51,17 @@ const vbenDescriptionItems: DescriptionItem[] = [
title: '最后构建时间',
},
{
// TODO:
content: h(VbenLink, { href: homepage }, { default: () => '点击查看' }),
title: '主页',
},
{
// TODO:
content: h(
VbenLink,
{ href: repositoryUrl },
{ default: () => '点击查看' },
),
content: h(VbenLink, { href: VBEN_DOC_URL }, { default: () => '点击查看' }),
title: '文档地址',
},
{
// TODO:
content: h(
VbenLink,
{ href: repositoryUrl },
{ href: VBEN_PREVIEW_URL },
{ default: () => '点击查看' },
),
title: '预览地址',
@@ -72,7 +69,7 @@ const vbenDescriptionItems: DescriptionItem[] = [
{
content: h(
VbenLink,
{ href: repositoryUrl },
{ href: VBEN_GITHUB_URL },
{ default: () => '点击查看' },
),
title: 'Github',
@@ -113,7 +110,7 @@ const devDependenciesItems = Object.keys(devDependencies).map((key) => ({
{{ title }}
</h3>
<p class="text-foreground/80 mt-3 text-sm leading-6">
<VbenLink :href="repositoryUrl">
<VbenLink :href="VBEN_GITHUB_URL">
{{ name }}
</VbenLink>
{{ description }}