mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
⚡️ 添加观测枢跳转入口
This commit is contained in:
@@ -4,8 +4,12 @@
|
|||||||
<TItembox :model-value="box" />
|
<TItembox :model-value="box" />
|
||||||
<div class="twc-brief-info">
|
<div class="twc-brief-info">
|
||||||
<div class="twc-bi-top">
|
<div class="twc-bi-top">
|
||||||
<span>{{ data.name }} {{ data.title }}</span>
|
<div class="twc-bi-title">
|
||||||
<span>{{ data.description }}</span>
|
<span>{{ data.name }}</span>
|
||||||
|
<span>{{ data.title }}</span>
|
||||||
|
<span @click="toWiki()"><v-icon>mdi-link</v-icon></span>
|
||||||
|
</div>
|
||||||
|
<div class="twc-bi-desc">{{ data.description }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="twc-bi-grid1">
|
<div class="twc-bi-grid1">
|
||||||
<div class="twc-big-item">
|
<div class="twc-big-item">
|
||||||
@@ -93,6 +97,8 @@ import TwcConstellations from "./twc-constellations.vue";
|
|||||||
import TwcMaterials from "./twc-materials.vue";
|
import TwcMaterials from "./twc-materials.vue";
|
||||||
import TwcSkills from "./twc-skills.vue";
|
import TwcSkills from "./twc-skills.vue";
|
||||||
import { getWikiData } from "../../data";
|
import { getWikiData } from "../../data";
|
||||||
|
import Mys from "../../plugins/Mys";
|
||||||
|
import { createTGWindow } from "../../utils/TGWindow";
|
||||||
import showSnackbar from "../func/snackbar";
|
import showSnackbar from "../func/snackbar";
|
||||||
import TItembox, { TItemBoxData } from "../main/t-itembox.vue";
|
import TItembox, { TItemBoxData } from "../main/t-itembox.vue";
|
||||||
|
|
||||||
@@ -154,6 +160,25 @@ watch(
|
|||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await loadData();
|
await loadData();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
async function toWiki(): Promise<void> {
|
||||||
|
if (props.item.contentId === 0) {
|
||||||
|
showSnackbar({
|
||||||
|
text: `角色 ${props.item.name} 暂无详情`,
|
||||||
|
color: "warn",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const url = Mys.Api.Obc.replace("{contentId}", props.item.contentId.toString());
|
||||||
|
createTGWindow(
|
||||||
|
url,
|
||||||
|
"Sub_window",
|
||||||
|
`Content_${props.item.contentId} ${props.item.name}`,
|
||||||
|
1200,
|
||||||
|
800,
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
.twc-box {
|
.twc-box {
|
||||||
@@ -180,13 +205,20 @@ onMounted(async () => {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.twc-bi-top :nth-child(1) {
|
.twc-bi-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
color: var(--common-text-title);
|
color: var(--common-text-title);
|
||||||
|
column-gap: 10px;
|
||||||
font-family: var(--font-title);
|
font-family: var(--font-title);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.twc-bi-top :nth-child(2) {
|
.twc-bi-title :last-child {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.twc-bi-desc {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|||||||
@@ -3,7 +3,10 @@
|
|||||||
<div class="tww-brief">
|
<div class="tww-brief">
|
||||||
<TItembox :model-value="box" />
|
<TItembox :model-value="box" />
|
||||||
<div class="tww-brief-info">
|
<div class="tww-brief-info">
|
||||||
<div class="tww-brief-title">{{ data.name }}</div>
|
<div class="tww-brief-title">
|
||||||
|
<span>{{ data.name }}</span>
|
||||||
|
<span @click="toWiki()"><v-icon>mdi-link</v-icon></span>
|
||||||
|
</div>
|
||||||
<v-rating
|
<v-rating
|
||||||
class="tww-brief-rating"
|
class="tww-brief-rating"
|
||||||
v-model="select"
|
v-model="select"
|
||||||
@@ -51,6 +54,8 @@ import { computed, onMounted, ref, watch } from "vue";
|
|||||||
|
|
||||||
import TwcMaterials from "./twc-materials.vue";
|
import TwcMaterials from "./twc-materials.vue";
|
||||||
import { getWikiData } from "../../data";
|
import { getWikiData } from "../../data";
|
||||||
|
import Mys from "../../plugins/Mys";
|
||||||
|
import { createTGWindow } from "../../utils/TGWindow";
|
||||||
import { parseHtmlText } from "../../utils/toolFunc";
|
import { parseHtmlText } from "../../utils/toolFunc";
|
||||||
import showSnackbar from "../func/snackbar";
|
import showSnackbar from "../func/snackbar";
|
||||||
import TItembox, { TItemBoxData } from "../main/t-itembox.vue";
|
import TItembox, { TItemBoxData } from "../main/t-itembox.vue";
|
||||||
@@ -104,6 +109,25 @@ watch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
onMounted(async () => await loadData());
|
onMounted(async () => await loadData());
|
||||||
|
|
||||||
|
async function toWiki(): Promise<void> {
|
||||||
|
if (props.item.contentId === 0) {
|
||||||
|
showSnackbar({
|
||||||
|
text: `武器 ${props.item.name} 暂无详情`,
|
||||||
|
color: "warn",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const url = Mys.Api.Obc.replace("{contentId}", props.item.contentId.toString());
|
||||||
|
createTGWindow(
|
||||||
|
url,
|
||||||
|
"Sub_window",
|
||||||
|
`Content_${props.item.contentId} ${props.item.name}`,
|
||||||
|
1200,
|
||||||
|
800,
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
.tww-box {
|
.tww-box {
|
||||||
@@ -126,11 +150,18 @@ onMounted(async () => await loadData());
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tww-brief-title {
|
.tww-brief-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
color: var(--common-text-title);
|
color: var(--common-text-title);
|
||||||
|
column-gap: 10px;
|
||||||
font-family: var(--font-title);
|
font-family: var(--font-title);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tww-brief-info :last-child {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.tww-brief-rating {
|
.tww-brief-rating {
|
||||||
color: var(--common-text-title);
|
color: var(--common-text-title);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user