Skip to content

Commit

Permalink
✏️ itemType 收束
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Nov 6, 2023
1 parent db36d18 commit 349bab1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/overlay/to-calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const onCancel = (): void => {
function toDetail(item: TGApp.App.Calendar.Item): void {
if (item.contentId === 0) {
const itemType = item.itemType === "avatar" ? "角色" : "武器";
const itemType = item.itemType === "character" ? "角色" : "武器";
showSnackbar({
text: `[${itemType}] ${item.name} 暂无详情`,
color: "warn",
Expand Down
15 changes: 7 additions & 8 deletions src/types/App/Calendar.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/**
* @file types App Calendar.d.ts
* @file types/App/Calendar.d.ts
* @description 应用素材日历相关类型定义文件
* @author BTMuli <[email protected]>
* @since Alpha v0.2.2
* @since Beta v0.3.5
*/

declare namespace TGApp.App.Calendar {
/**
* @description 素材日历类型
* @since Alpha v0.2.2
* @since Beta v0.3.5
* @interface Item
* @property {number} id - 角色ID/武器ID
* @property {number} contentId - 观测枢的 content_id
Expand All @@ -24,12 +23,12 @@ declare namespace TGApp.App.Calendar {
* @property {Source} source - 日历项来源
* @return Item
*/
export interface Item {
interface Item {
id: number;
contentId: number;
dropDays: number[];
name: string;
itemType: string;
itemType: "character" | "weapon";
star: number;
bg: string;
icon: string;
Expand All @@ -51,7 +50,7 @@ declare namespace TGApp.App.Calendar {
* @property {string} icon - 素材图标
* @return Material
*/
export interface Material {
interface Material {
id: number;
name: string;
star: number;
Expand All @@ -69,7 +68,7 @@ declare namespace TGApp.App.Calendar {
* @property {string} name - 来源名称
* @return Source
*/
export interface Source {
interface Source {
area: string;
icon: string;
name: string;
Expand Down

0 comments on commit 349bab1

Please sign in to comment.