fix: tool store bugs
parent
1dcca7fcc7
commit
219bc20f26
|
|
@ -100,7 +100,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onBeforeMount, ref } from 'vue'
|
import { onBeforeMount, ref, watch } from 'vue'
|
||||||
import ToolStoreApi from '@/api/tool/store'
|
import ToolStoreApi from '@/api/tool/store'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
import ToolCard from './ToolCard.vue'
|
import ToolCard from './ToolCard.vue'
|
||||||
|
|
@ -127,7 +127,7 @@ const dialogVisible = ref(false)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const searchValue = ref('')
|
const searchValue = ref('')
|
||||||
const folderId = ref('')
|
const folderId = ref('')
|
||||||
const toolType = ref('INTERNAL')
|
const toolType = ref('APPSTORE')
|
||||||
const defaultCategories = ref<ToolCategory[]>([
|
const defaultCategories = ref<ToolCategory[]>([
|
||||||
// 第一版不上
|
// 第一版不上
|
||||||
// {
|
// {
|
||||||
|
|
@ -165,6 +165,12 @@ const categories = ref<ToolCategory[]>([...defaultCategories.value])
|
||||||
|
|
||||||
const filterList = ref<any>(null)
|
const filterList = ref<any>(null)
|
||||||
|
|
||||||
|
watch(dialogVisible, (bool) => {
|
||||||
|
if (!bool) {
|
||||||
|
toolType.value = 'APPSTORE'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
function getSubTitle(tool: any) {
|
function getSubTitle(tool: any) {
|
||||||
return categories.value.find((i) => i.id === tool.label)?.title ?? ''
|
return categories.value.find((i) => i.id === tool.label)?.title ?? ''
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue