mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: rename categories to defaultCategories and initialize categories from it
This commit is contained in:
parent
d1fd625972
commit
408e79ff12
|
|
@ -128,8 +128,7 @@ const loading = ref(false)
|
|||
const searchValue = ref('')
|
||||
const folderId = ref('')
|
||||
const toolType = ref('INTERNAL')
|
||||
|
||||
const categories = ref<ToolCategory[]>([
|
||||
const defaultCategories = ref<ToolCategory[]>([
|
||||
// 第一版不上
|
||||
// {
|
||||
// id: 'recommend',
|
||||
|
|
@ -162,6 +161,8 @@ const categories = ref<ToolCategory[]>([
|
|||
// tools: []
|
||||
// }
|
||||
])
|
||||
const categories = ref<ToolCategory[]>([...defaultCategories.value])
|
||||
|
||||
const filterList = ref<any>(null)
|
||||
|
||||
function getSubTitle(tool: any) {
|
||||
|
|
@ -188,6 +189,7 @@ async function getList() {
|
|||
|
||||
async function getInternalToolList() {
|
||||
try {
|
||||
categories.value = defaultCategories.value
|
||||
const res = await ToolStoreApi.getInternalToolList({ name: searchValue.value }, loading)
|
||||
if (searchValue.value.length) {
|
||||
filterList.value = res.data
|
||||
|
|
|
|||
Loading…
Reference in New Issue