mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
✏️ 修正数据类型
This commit is contained in:
@@ -112,8 +112,8 @@ function transStat (data: TGApp.Game.Record.Stats): string {
|
|||||||
function transWorld (data: TGApp.Game.Record.WorldExplore[]): string {
|
function transWorld (data: TGApp.Game.Record.WorldExplore[]): string {
|
||||||
const worlds: TGApp.Sqlite.Record.WorldExplore[] = data.map(item => {
|
const worlds: TGApp.Sqlite.Record.WorldExplore[] = data.map(item => {
|
||||||
let offerings;
|
let offerings;
|
||||||
if (item.Offerings !== undefined) {
|
if (item.offerings !== undefined) {
|
||||||
offerings = item.Offerings.map(offering => {
|
offerings = item.offerings.map(offering => {
|
||||||
return {
|
return {
|
||||||
name: offering.name,
|
name: offering.name,
|
||||||
icon: offering.icon,
|
icon: offering.icon,
|
||||||
|
|||||||
4
src/types/Game/Record.d.ts
vendored
4
src/types/Game/Record.d.ts
vendored
@@ -133,7 +133,7 @@ declare namespace TGApp.Game.Record {
|
|||||||
* @property {string} icon - 图标
|
* @property {string} icon - 图标
|
||||||
* @property {string} name - 名称
|
* @property {string} name - 名称
|
||||||
* @property {string} type - 类型 // Reputation: 声望,Offering: 奉献
|
* @property {string} type - 类型 // Reputation: 声望,Offering: 奉献
|
||||||
* @property {WorldOffering[]} Offerings - 奉献物品
|
* @property {WorldOffering[]} offerings - 奉献物品
|
||||||
* @property {number} id - ID
|
* @property {number} id - ID
|
||||||
* @property {number} parent_id - 父级 ID
|
* @property {number} parent_id - 父级 ID
|
||||||
* @property {string} map_url - 地图 URL
|
* @property {string} map_url - 地图 URL
|
||||||
@@ -149,7 +149,7 @@ declare namespace TGApp.Game.Record {
|
|||||||
icon: string
|
icon: string
|
||||||
name: string
|
name: string
|
||||||
type: string
|
type: string
|
||||||
Offerings: WorldOffering[]
|
offerings: WorldOffering[]
|
||||||
id: number
|
id: number
|
||||||
parent_id: number
|
parent_id: number
|
||||||
map_url: string
|
map_url: string
|
||||||
|
|||||||
Reference in New Issue
Block a user