mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
⚡️ 帖子解析&祈愿记录微调
*优化链接样式 *饼图加上集录祈愿 *祈愿刷新后刷新页面
This commit is contained in:
@@ -156,6 +156,10 @@ function getPoolData(): EChartsOption {
|
||||
value: props.modelValue.filter((item) => item.uigfType === "302").length,
|
||||
name: "武器活动祈愿",
|
||||
},
|
||||
{
|
||||
value: props.modelValue.filter((item) => item.uigfType === "500").length,
|
||||
name: "集录祈愿",
|
||||
},
|
||||
];
|
||||
data.series[1].data = [
|
||||
{ value: props.modelValue.filter((item) => item.rank === "3").length, name: "3星" },
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<template>
|
||||
<span
|
||||
<div
|
||||
v-if="mode == 'link'"
|
||||
class="tp-text-link"
|
||||
@click="toLink()"
|
||||
:title="props.data.attributes?.link"
|
||||
:style="getTextStyle()"
|
||||
>
|
||||
<v-icon size="small">mdi-link-variant</v-icon>{{ props.data.insert }}
|
||||
</span>
|
||||
<v-icon size="small">mdi-link-variant</v-icon>
|
||||
<span>{{ props.data.insert }}</span>
|
||||
</div>
|
||||
<span v-else-if="mode == 'emoji'" class="tp-text-emoji">
|
||||
<img :src="getEmojiUrl()" :alt="getEmojiName()" :title="getEmojiName()" />
|
||||
</span>
|
||||
@@ -102,12 +104,9 @@ function getTextStyle(): StyleValue {
|
||||
const style = <Array<StyleValue>>[];
|
||||
let data: TpText;
|
||||
if (props.data.insert === "\n") {
|
||||
if (props.data.attributes?.align || props.data.attributes?.header) {
|
||||
return "display: none";
|
||||
}
|
||||
return "display: inline";
|
||||
}
|
||||
if (props.next?.insert === "\n") {
|
||||
if (typeof props.next?.insert === "string" && props.next.insert.includes("\n")) {
|
||||
data = {
|
||||
insert: props.data.insert,
|
||||
attributes: {
|
||||
@@ -134,7 +133,8 @@ function getTextStyle(): StyleValue {
|
||||
}
|
||||
if (data.attributes.align) {
|
||||
const ruleAlign: StyleValue = `textAlign: ${data.attributes.align}`;
|
||||
style.push(ruleAlign);
|
||||
if (data.attributes.align !== "center") style.push("display: inline");
|
||||
else style.push(ruleAlign);
|
||||
}
|
||||
if (data.attributes.header) {
|
||||
const ruleHeader: StyleValue = `fontSize: ${headerFontSizes[data.attributes.header - 1]}`;
|
||||
@@ -211,7 +211,7 @@ function getEmojiName() {
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
.tp-text-link {
|
||||
display: inline-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #00c3ff;
|
||||
|
||||
@@ -187,7 +187,7 @@ async function confirmRefresh(force: boolean = false): Promise<void> {
|
||||
}, 1000);
|
||||
});
|
||||
await TGLogger.Info(`[UserGacha][${account.gameUid}][confirmRefresh] 刷新祈愿数据完成`);
|
||||
// window.location.reload();
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
// 获取祈愿数据并写入数据库
|
||||
|
||||
Reference in New Issue
Block a user