refactor: migrate demo applications to playground (#4116)

* chore: detail adjustment

* refactor: Migrate demo applications to playground

* perf: logic optimization

* chore: update docs

* chore: update docs
This commit is contained in:
Vben
2024-08-11 16:09:32 +08:00
committed by GitHub
parent 654bf90c0d
commit b464b87ac5
138 changed files with 3197 additions and 682 deletions

View File

@@ -35,7 +35,9 @@
min-height: 100vh;
/* overflow: overlay; */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
a,

View File

@@ -8,7 +8,7 @@
/* 主体区域背景色 */
--background-deep: 210 11.11% 96.47%;
--foreground: 210 6% 21%;
--foreground: 222 84% 5%;
/* Background color for <Card /> */
--card: 0 0% 100%;

View File

@@ -22,3 +22,5 @@ export const VBEN_PREVIEW_URL = 'https://www.vben.pro';
export const VBEN_ELE_PREVIEW_URL = 'https://ele.vben.pro';
export const VBEN_NAIVE_PREVIEW_URL = 'https://naive.vben.pro';
export const VBEN_ANT_PREVIEW_URL = 'https://ant.vben.pro';

View File

@@ -125,7 +125,7 @@ const devDependenciesItems = Object.keys(devDependencies).map((key) => ({
<h3 class="text-foreground text-2xl font-semibold leading-7">
{{ title }}
</h3>
<p class="text-foreground/80 mt-3 text-sm leading-6">
<p class="text-foreground mt-3 text-sm leading-6">
<VbenLink :href="VBEN_GITHUB_URL">
{{ name }}
</VbenLink>
@@ -139,7 +139,7 @@ const devDependenciesItems = Object.keys(devDependencies).map((key) => ({
<dt class="text-foreground text-sm font-medium leading-6">
{{ item.title }}
</dt>
<dd class="text-foreground/80 mt-1 text-sm leading-6 sm:mt-2">
<dd class="text-foreground mt-1 text-sm leading-6 sm:mt-2">
<VbenRenderContent :content="item.content" />
</dd>
</div>
@@ -159,7 +159,7 @@ const devDependenciesItems = Object.keys(devDependencies).map((key) => ({
<dt class="text-foreground text-sm">
{{ item.title }}
</dt>
<dd class="text-foreground/60 mt-1 text-sm sm:mt-2">
<dd class="text-foreground/80 mt-1 text-sm sm:mt-2">
<VbenRenderContent :content="item.content" />
</dd>
</div>
@@ -178,7 +178,7 @@ const devDependenciesItems = Object.keys(devDependencies).map((key) => ({
<dt class="text-foreground text-sm">
{{ item.title }}
</dt>
<dd class="text-foreground/60 mt-1 text-sm sm:mt-2">
<dd class="text-foreground/80 mt-1 text-sm sm:mt-2">
<VbenRenderContent :content="item.content" />
</dd>
</div>

View File

@@ -100,15 +100,11 @@ export function useTabbar() {
watch(
() => route.path,
() => {
// 这里不能用route用route时vue-router会自动将父级meta进行合并
const routes = router.getRoutes();
const currentRoute = routes.find((item) => item.path === route.path);
if (currentRoute) {
tabbarStore.addTab({
...route,
meta: currentRoute.meta,
} as unknown as RouteLocationNormalizedGeneric);
}
const meta = route.matched?.[route.matched.length - 1]?.meta;
tabbarStore.addTab({
...route,
meta: meta || route.meta,
});
},
{ immediate: true },
);