fix: tool store bugs

This commit is contained in:
wangdan-fit2cloud 2025-09-29 16:21:05 +08:00
parent 1dcca7fcc7
commit 219bc20f26

View File

@ -100,7 +100,7 @@
</template>
<script setup lang="ts">
import { onBeforeMount, ref } from 'vue'
import { onBeforeMount, ref, watch } from 'vue'
import ToolStoreApi from '@/api/tool/store'
import { t } from '@/locales'
import ToolCard from './ToolCard.vue'
@ -127,7 +127,7 @@ const dialogVisible = ref(false)
const loading = ref(false)
const searchValue = ref('')
const folderId = ref('')
const toolType = ref('INTERNAL')
const toolType = ref('APPSTORE')
const defaultCategories = ref<ToolCategory[]>([
//
// {
@ -165,6 +165,12 @@ const categories = ref<ToolCategory[]>([...defaultCategories.value])
const filterList = ref<any>(null)
watch(dialogVisible, (bool) => {
if (!bool) {
toolType.value = 'APPSTORE'
}
})
function getSubTitle(tool: any) {
return categories.value.find((i) => i.id === tool.label)?.title ?? ''
}