🎨 规范化代码

This commit is contained in:
BTMuli
2025-12-24 02:46:28 +08:00
parent 8500668213
commit 651a89145f
199 changed files with 5067 additions and 5390 deletions

View File

@@ -103,7 +103,7 @@ function miniImgUrl(): string {
}
function getImageTitle(): string {
const res: string[] = [];
const res: Array<string> = [];
if (props.data.attributes) {
res.push(`宽度:${props.data.attributes.width}px`);
res.push(`高度:${props.data.attributes.height}px`);

View File

@@ -57,11 +57,11 @@ type TpVillaCard = {
owner_nickname: string;
owner_avatar_url: string;
villa_introduce?: string;
tag_list?: string[];
tag_list?: Array<string>;
villa_member_num: string;
is_official?: boolean;
is_available: boolean;
hot_member_avatar?: string[];
hot_member_avatar?: Array<string>;
hot_room?: VillaRoom;
};
};

View File

@@ -78,7 +78,7 @@ onMounted(async () => {
const voteInfo = await ApiHubReq.vote.info(vote.id, vote.uid);
console.log(`[${props.data.insert.vote.id}]voteInfo:`, voteInfo);
const voteResult = await ApiHubReq.vote.result(vote.id, vote.uid);
console.log("[${props.data.insert.vote.id}]voteResult:", voteResult);
console.log(`[${props.data.insert.vote.id}]voteResult:`, voteResult);
votes.value = {
title: voteInfo.title,
count: voteResult.user_cnt,

View File

@@ -26,7 +26,7 @@ type TbCollectProps = { modelValue: number; data?: TGApp.BBS.Post.FullData };
const props = defineProps<TbCollectProps>();
const isCollected = ref<boolean>(false);
const showEdit = ref<boolean>(false);
const collect = shallowRef<Array<TGApp.Sqlite.UserCollection.UFMap>>([]);
const collect = shallowRef<Array<TGApp.Sqlite.Collection.PcMap>>([]);
onBeforeMount(async () => await refresh());

View File

@@ -46,8 +46,8 @@ const props = defineProps<ToPostCollectProps>();
const emits = defineEmits<ToPostCollectEmits>();
const visible = defineModel<boolean>();
const submit = ref<boolean>(false);
const collectList = shallowRef<Array<TGApp.Sqlite.UserCollection.UFCollection>>([]);
const postCollect = shallowRef<Array<TGApp.Sqlite.UserCollection.UFMap>>([]);
const collectList = shallowRef<Array<TGApp.Sqlite.Collection.Collection>>([]);
const postCollect = shallowRef<Array<TGApp.Sqlite.Collection.PcMap>>([]);
const selectList = shallowRef<Array<string>>([]);
watch(
@@ -72,7 +72,7 @@ async function freshData(): Promise<void> {
}
}
async function deleteCollect(item: TGApp.Sqlite.UserCollection.UFCollection): Promise<void> {
async function deleteCollect(item: TGApp.Sqlite.Collection.Collection): Promise<void> {
const delCheck = await showDialog.check("确定删除分类?", "该分类若有帖子,则会变为未分类");
if (!delCheck) {
showSnackbar.cancel("取消删除");