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
cacf650f
Commit
cacf650f
authored
Oct 25, 2023
by
KesaubeEire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 重构参数调整.
parent
a766f18f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
src/Content.svelte
src/Content.svelte
+5
-4
src/components/card.svelte
src/components/card.svelte
+8
-6
No files found.
src/Content.svelte
View file @
cacf650f
...
...
@@ -434,10 +434,11 @@
{#if List.length}
<div class="cardContainer justify-evenly gap-4 my-3" transition:fade={{ delay: 0, duration: 300 }}>
<!-- 示例卡片, 留着 -->
<!-- <Card raw_tags="|示例1|示例2|" cover="123"/> -->
<!-- <Card raw_tags="|示例1|示例2|" /> -->
<!-- <Card raw_tags="|示例1|示例2|" /> -->
<!-- <Card raw_tags="|示例1|示例2|" /> -->
<!-- <Card info={{ cn_name: 'aaaaa', tags: '|示例1|示例2|' }} /> -->
<!-- <Card info={{ cn_name: 'bbbbb', tags: '|示例1|示例2|' }} /> -->
<!-- <Card info={{ cn_name: 'ccccc', tags: '|示例1|示例2|' }} /> -->
<!-- <Card info={{ cn_name: 'ddddd', tags: '|示例1|示例2|' }} /> -->
<!-- <Card info={{ cn_name: 'eeeee', tags: '' }} /> -->
{#each List as info}
<Card {info} p_searchTag={searchTag} p_searchCategory={searchCategory} />
...
...
src/components/card.svelte
View file @
cacf650f
...
...
@@ -6,19 +6,21 @@
export let info;
/**主标题*/
const title = info.cn_name;
const title = info.cn_name
?? ''
;
/**副标题*/
const sub_title = info.jp_name;
const sub_title = info.jp_name
?? ''
;
/**路径*/
const folder = $_env + '/' +
info.folder.substring(2
);
const folder = $_env + '/' +
(info.folder ? info.folder.substring(2) : ''
);
/**封面图片链接*/
let cover = folder + '/rpg_info/1.jpg';
/**语言分类*/
const category = info.category;
const category = info.category
?? 1
;
/**语言分类文本*/
const language = $_category[
info.
category - 1].category_name;
const language = $_category[category - 1].category_name;
/**TAG文本*/
const raw_tags = info.tags ?? '';
/**游戏ID*/
const id = info.id ?? '00';
/**父方法: 搜索 tag*/
export let p_searchTag;
...
...
@@ -83,7 +85,7 @@
.catch(err => {
cover = '/favicon.ico';
console.log(err);
toast.push(`
Error
报错:\t[${err.toString()}]`);
toast.push(`
${id} ${title.substring(0, 5)}${title.length > 5 ? '...' : ''}
报错:\t[${err.toString()}]`);
});
}
</script>
...
...
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