Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
rrpgLink_FrontEnd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kesaubeeire
rrpgLink_FrontEnd
Commits
2c0f85a6
Commit
2c0f85a6
authored
Oct 22, 2023
by
KesaubeEire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 搜索后的视图渐变效果
parent
0af1634c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
22 deletions
+33
-22
src/Content.svelte
src/Content.svelte
+33
-22
No files found.
src/Content.svelte
View file @
2c0f85a6
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import Card from './components/card.svelte';
import Card from './components/card.svelte';
import { SvelteToast, toast } from '@zerodevx/svelte-toast';
import { SvelteToast, toast } from '@zerodevx/svelte-toast';
import { _category, _env, _tagTrans } from './stores';
import { _category, _env, _tagTrans } from './stores';
import { fade } from 'svelte/transition';
// -----------------------------
// -----------------------------
// 各种请求封装头 & 请求函数
// 各种请求封装头 & 请求函数
...
@@ -99,7 +100,12 @@
...
@@ -99,7 +100,12 @@
*/
*/
function showList(data) {
function showList(data) {
// List = [...List, ...data];
// List = [...List, ...data];
List = [...data];
List = [];
// <!-- FIXME: 暂时以这种略微丑陋的方式做切换动画, 可能这就是唯一方案了 -->
setTimeout(() => {
List = [...data];
}, 400);
}
}
/**根据 TAG 搜索游戏
/**根据 TAG 搜索游戏
...
@@ -199,24 +205,29 @@
...
@@ -199,24 +205,29 @@
<!-- ----------------------------------------------- DOM ----------------------------------------------- -->
<!-- ----------------------------------------------- DOM ----------------------------------------------- -->
<div class="cardContainer flex flex-wrap justify-evenly gap-4 my-3">
<!-- NOTE: svelte 绑定 window -> 关闭详情面板 -->
{#each List as item}
<svelte:window on:keydown|capture={key_closePanels} />
<Card
title={item.cn_name}
{#if List.length}
sub_title={item.jp_name}
<div class="cardContainer flex flex-wrap justify-evenly gap-4 my-3" transition:fade={{ delay: 0, duration: 300 }}>
cover={getCover(item.folder)}
{#each List as item}
folder={getFolder(item.folder)}
<Card
category={item.category}
title={item.cn_name}
language={$_category[item.category - 1].category_name}
sub_title={item.jp_name}
raw_tags={item.tags}
cover={getCover(item.folder)}
p_searchTag={searchTag}
folder={getFolder(item.folder)}
p_searchCategory={searchCategory}
category={item.category}
/>
language={$_category[item.category - 1].category_name}
{/each}
raw_tags={item.tags}
p_searchTag={searchTag}
<!-- 示例卡片, 留着 -->
p_searchCategory={searchCategory}
<!-- <Card raw_tags="|示例1|示例2|" /> -->
/>
<!-- <Card raw_tags="|示例1|示例2|" /> -->
{/each}
<!-- <Card raw_tags="|示例1|示例2|" /> -->
<!-- <Card raw_tags="|示例1|示例2|" /> -->
<!-- 示例卡片, 留着 -->
</div>
<!-- <Card raw_tags="|示例1|示例2|" /> -->
<!-- <Card raw_tags="|示例1|示例2|" /> -->
<!-- <Card raw_tags="|示例1|示例2|" /> -->
<!-- <Card raw_tags="|示例1|示例2|" /> -->
</div>
{/if}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment