🚨 修复 qodana 报错

This commit is contained in:
BTMuli
2023-12-03 18:02:45 +08:00
parent cab0c9a9c8
commit 7ba2011b35
5 changed files with 5 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div v-if="props.modelValue === undefined">暂无数据</div>
<div v-if="!props.modelValue">暂无数据</div>
<div v-else class="tur-ag-box">
<TibUrAvatar v-for="avatar in data" :key="avatar.id" :model-value="avatar" />
</div>

View File

@@ -1,5 +1,5 @@
<template>
<div v-if="props.modelValue === undefined">暂无数据</div>
<div v-if="!props.modelValue">暂无数据</div>
<div v-else class="tur-hg-box">
<TurHomeSub v-for="(home, index) in homes" :key="index" :data="home" />
</div>

View File

@@ -1,5 +1,5 @@
<template>
<div v-if="props.modelValue === undefined">暂无数据</div>
<div v-if="!props.modelValue">暂无数据</div>
<div v-else class="tur-og-box">
<TurOverviewSub title="活跃天数" :text="data.activeDays" />
<TurOverviewSub title="成就达成数" :text="data.achievementNumber" />

View File

@@ -1,5 +1,5 @@
<template>
<div v-if="props.modelValue === undefined">暂无数据</div>
<div v-if="!props.modelValue">暂无数据</div>
<div v-else class="tur-wg-box">
<TurWorldSub v-for="(area, index) in getData()" :key="index" :data="area" :theme="theme" />
</div>

View File

@@ -181,7 +181,6 @@ watch(loadShare, (value) => {
});
function getRenderPost(data: TGApp.Plugins.Mys.Post.FullData): TGApp.Plugins.Mys.SctPost.Base[] {
let parseData: TGApp.Plugins.Mys.SctPost.Base[] = [];
const postContent = data.post.content;
let jsonParse: string;
if (postContent.startsWith("<")) {
@@ -193,8 +192,7 @@ function getRenderPost(data: TGApp.Plugins.Mys.Post.FullData): TGApp.Plugins.Mys
jsonParse = data.post.structured_content;
}
}
parseData = JSON.parse(jsonParse);
return parseData;
return JSON.parse(jsonParse);
}
function switchRender() {