From 75dcf2a7ebc35cf72603d444df8d4b7c8994dd96 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Fri, 30 Jun 2023 20:46:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B1=20=E5=9F=BA=E6=9C=AC=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E8=A7=92=E8=89=B2=E4=BD=BF=E7=94=A8=E7=8E=87=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C1/4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/hutaoAbyss/hta-tab-use.vue | 76 +++++++++++++++++++++- src/components/itembox/tib-wiki-abyss.vue | 60 +++++++++++++++++ src/components/itembox/tib-wiki-avatar.vue | 7 +- src/pages/WIKI/Abyss.vue | 22 ++++--- src/plugins/Sqlite/index.ts | 13 ---- 5 files changed, 150 insertions(+), 28 deletions(-) create mode 100644 src/components/itembox/tib-wiki-abyss.vue diff --git a/src/components/hutaoAbyss/hta-tab-use.vue b/src/components/hutaoAbyss/hta-tab-use.vue index fbaff7a2..d8fa6fd3 100644 --- a/src/components/hutaoAbyss/hta-tab-use.vue +++ b/src/components/hutaoAbyss/hta-tab-use.vue @@ -1,11 +1,83 @@ + diff --git a/src/components/itembox/tib-wiki-abyss.vue b/src/components/itembox/tib-wiki-abyss.vue new file mode 100644 index 00000000..b9bcd88e --- /dev/null +++ b/src/components/itembox/tib-wiki-abyss.vue @@ -0,0 +1,60 @@ + + diff --git a/src/components/itembox/tib-wiki-avatar.vue b/src/components/itembox/tib-wiki-avatar.vue index 82b2e6d1..9a626526 100644 --- a/src/components/itembox/tib-wiki-avatar.vue +++ b/src/components/itembox/tib-wiki-avatar.vue @@ -1,5 +1,5 @@ diff --git a/src/pages/WIKI/Abyss.vue b/src/pages/WIKI/Abyss.vue index 2080e99b..00cbe146 100644 --- a/src/pages/WIKI/Abyss.vue +++ b/src/pages/WIKI/Abyss.vue @@ -13,18 +13,18 @@ 更新于 {{ getUpdated() }} - + - + - + - + - + @@ -41,7 +41,6 @@ import HtaTabTeam from "../../components/hutaoAbyss/hta-tab-team.vue"; import HtaTabHold from "../../components/hutaoAbyss/hta-tab-hold.vue"; // plugins import Hutao from "../../plugins/Hutao"; -import TGSqlite from "../../plugins/Sqlite"; // loading const loading = ref(false); @@ -52,14 +51,13 @@ const showDialog = ref(false); // data const overview = ref( - {} as TGApp.Plugins.Hutao.Abyss.OverviewData, + {}, ); const tab = ref("use"); const avatarUse = ref>([]); const avatarUp = ref>([]); const teamCombination = ref>([]); const avatarHold = ref>([]); -const avatarData = ref>([]); onMounted(async () => { loadingTitle.value = "正在获取深渊数据"; @@ -74,8 +72,6 @@ onMounted(async () => { teamCombination.value = await Hutao.Abyss.getTeamCollect(); loadingTitle.value = "正在获取深渊角色持有"; avatarHold.value = await Hutao.Abyss.avatar.getHoldRate(); - loadingTitle.value = "正在获取角色数据"; - avatarData.value = await TGSqlite.getAllAppCharacter(); loading.value = false; }); @@ -106,6 +102,7 @@ function getUpdated() { .hta-tab { margin-bottom: 10px; + height: 50px; } .hta-title { @@ -124,4 +121,9 @@ function getUpdated() { cursor: pointer; text-decoration: underline; } + +.hta-tab-item { + width: 100%; + height: calc(100% - 60px); +} diff --git a/src/plugins/Sqlite/index.ts b/src/plugins/Sqlite/index.ts index 236a5c8a..3de66bba 100644 --- a/src/plugins/Sqlite/index.ts +++ b/src/plugins/Sqlite/index.ts @@ -416,19 +416,6 @@ class Sqlite { return res[0]; } - /** - * @description 获取所有角色数据 - * @since Alpha v0.2.1 - * @returns {Promise} 角色数据 - */ - public async getAllAppCharacter(): Promise { - const db = await Database.load(this.dbPath); - const sql = "SELECT * FROM AppCharacters"; - const res: TGApp.Sqlite.Character.AppData[] = await db.select(sql); - await db.close(); - return res; - } - /** * @description 保存用户角色数据 * @since Alpha v0.2.0