mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-15 03:53:16 +08:00
🏷️ 调整参数类型
This commit is contained in:
@@ -43,7 +43,7 @@ import useBBSStore from "@store/bbs.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, ref, shallowRef, useTemplateRef, watch } from "vue";
|
||||
|
||||
type ToPostSearchProps = { gid: string; keyword?: string };
|
||||
type ToPostSearchProps = { gid: number; keyword?: string };
|
||||
type SortSelect = { text: string; value: number };
|
||||
|
||||
const sortOrderList: Array<SortSelect> = [
|
||||
@@ -73,7 +73,7 @@ const label = computed<string>(() => {
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
gameId.value = props.gid;
|
||||
gameId.value = props.gid.toString();
|
||||
if (props.keyword && props.keyword !== "") search.value = props.keyword;
|
||||
if (visible.value) await searchPosts();
|
||||
});
|
||||
@@ -124,8 +124,8 @@ watch(
|
||||
watch(
|
||||
() => props.gid,
|
||||
async () => {
|
||||
if (gameId.value !== props.gid) {
|
||||
gameId.value = props.gid;
|
||||
if (gameId.value !== props.gid.toString()) {
|
||||
gameId.value = props.gid.toString();
|
||||
results.value = [];
|
||||
lastId.value = "";
|
||||
isLast.value = false;
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<TPostCard :model-value="post" :user-click="true" @onUserClick="handleUserClick" />
|
||||
</div>
|
||||
</div>
|
||||
<VpOverlaySearch v-model="showSearch" :gid="curGid.toString()" :keyword="search" />
|
||||
<VpOverlaySearch v-model="showSearch" :gid="curGid" :keyword="search" />
|
||||
<VpOverlayUser v-model="showUser" :gid="curGid" :uid="curUid" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
|
||||
Reference in New Issue
Block a user