refactor: standardize app property names and improve TypeScript definitions

- Updated property names in AppCard.vue, AppDetailModal.vue, AppGrid.vue, and other components to use camelCase for consistency.
- Enhanced TypeScript definitions for props and emits in various components to improve type safety.
- Refactored download status handling in processInstall.ts to align with updated App interface.
- Improved error handling and type definitions in DownloadDetail.vue and related components.
- Added optional properties and refined existing interfaces in typedefinition.ts for better clarity and usability.
This commit is contained in:
Elysia
2026-01-31 17:16:02 +08:00
parent f89b9ebfd9
commit 3221cb6d5e
18 changed files with 433 additions and 360 deletions

View File

@@ -18,28 +18,26 @@
</div>
</template>
<script setup>
import { ref, watch, defineProps, defineEmits } from 'vue';
<script setup lang="ts">
import { ref, watch } from 'vue';
import TopActions from './TopActions.vue';
const props = defineProps({
searchQuery: {
type: String,
required: true
},
appsCount: {
type: Number,
required: true
}
});
const props = defineProps<{
searchQuery: string;
appsCount: number;
}>();
const emit = defineEmits(['update-search', 'update', 'list']);
const emit = defineEmits<{
(e: 'update-search', query: string): void;
(e: 'update'): void;
(e: 'list'): void;
}>();
const localSearchQuery = ref(props.searchQuery || '');
const timeoutId = ref(null);
const timeoutId = ref<ReturnType<typeof setTimeout> | null>(null);
const debounceSearch = () => {
clearTimeout(timeoutId.value);
if (timeoutId.value) clearTimeout(timeoutId.value);
timeoutId.value = setTimeout(() => {
emit('update-search', localSearchQuery.value);
}, 220);