🏷️ 调整参数类型

This commit is contained in:
BTMuli
2025-12-27 15:09:36 +08:00
parent 8b2a7f2dd3
commit 600149f99b
2 changed files with 5 additions and 5 deletions

View File

@@ -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;

View File

@@ -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>