Skip to content

Commit

Permalink
feat(探索): 调整挑战组件的探索视图,以改善用户界面和用户体验。
Browse files Browse the repository at this point in the history
  • Loading branch information
Encaik committed Sep 25, 2024
1 parent 9a11ec9 commit c529eb5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/app/pages/challenge/challenge.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h5 class="text-xl">{{ item.name }}</h5>
</div>
<div class="flex justify-end gap-2">
<button nz-button (click)="onExploreClick(item, true)">快速探索</button>
<button nz-button class="hidden sm:block" (click)="onExploreClick(item)">探索</button>
<button nz-button class="hidden xl:block" (click)="onExploreClick(item)">探索</button>
</div>
</div>
</nz-card>
Expand Down
22 changes: 12 additions & 10 deletions src/app/pages/challenge/pages/explore/explore.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<div class="flex flex-col h-full">
<div class="flex flex-col h-full overflow-auto">
<div class="flex justify-between items-center mb-2">
<h5 nz-typography class="underline decoration-sky-500">探索</h5>
<button nz-button (click)="onBackClick()">返回</button>
</div>
<table class="w-full aspect-square table-fixed">
@for (map of mapList; track $index) {
<tr>
@for (item of map; track $index) {
<td class="border border-gray-300 aspect-square"> </td>
}
</tr>
}
</table>
<div class="flex-1 h-0 overflow-auto">
<table class="w-full aspect-square table-fixed">
@for (map of mapList; track $index) {
<tr>
@for (item of map; track $index) {
<td class="border border-gray-300 aspect-square"> </td>
}
</tr>
}
</table>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
:host {
flex: 1;
height: 0;
overflow: auto;
}
2 changes: 1 addition & 1 deletion src/app/pages/challenge/pages/explore/explore.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { NzTypographyModule } from 'ng-zorro-antd/typography';
export class ExploreComponent {
private router = inject(Router);

mapList = Array.from({ length: 100 }, (_, i) => Array.from({ length: 100 }, (_, j) => `${i}-${j}`));
mapList = Array.from({ length: 50 }, (_, i) => Array.from({ length: 50 }, (_, j) => `${i}-${j}`));

onBackClick() {
this.router.navigate(['/challenge']);
Expand Down

1 comment on commit c529eb5

@vercel
Copy link

@vercel vercel bot commented on c529eb5 Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wanjie – ./

wanjie.vercel.app
wanjie-encaiks-projects.vercel.app
wanjie-git-main-encaiks-projects.vercel.app

Please sign in to comment.