fix: application add knowledge
This commit is contained in:
parent
390faf2bf5
commit
6ca6c5b6d3
@ -29,6 +29,6 @@ export default {
|
||||
expiringSoon: '即将到期'
|
||||
},
|
||||
copyright: '版权所有 © 2014-2025 杭州飞致云信息科技有限公司',
|
||||
userManualUrl: 'https://maxkb.cn/docs/',
|
||||
userManualUrl: 'https://maxkb.cn/docs/v2/',
|
||||
forumUrl: 'https://bbs.fit2cloud.com/c/mk/11'
|
||||
}
|
||||
|
||||
@ -30,6 +30,6 @@ export default {
|
||||
expiringSoon: '即將到期'
|
||||
},
|
||||
copyright: '版權所有 © 2014-2025 杭州飛致雲信息科技有限公司',
|
||||
userManualUrl:'https://maxkb.cn/docs/',
|
||||
userManualUrl:'https://maxkb.cn/docs/v2/',
|
||||
forumUrl: 'https://github.com/1Panel-dev/MaxKB/discussions'
|
||||
}
|
||||
|
||||
@ -21,14 +21,6 @@
|
||||
</div>
|
||||
|
||||
<div class="flex align-center mr-8">
|
||||
<el-input
|
||||
v-model="searchValue"
|
||||
:placeholder="$t('common.search')"
|
||||
prefix-icon="Search"
|
||||
class="w-240 mr-8"
|
||||
clearable
|
||||
/>
|
||||
<el-divider direction="vertical" />
|
||||
<el-button link class="mr-16" @click="refresh">
|
||||
<el-icon class="mr-4" :size="18"><Refresh /></el-icon>
|
||||
</el-button>
|
||||
@ -49,9 +41,20 @@
|
||||
:treeStyle="{ height: 'calc(100vh - 320px)' }"
|
||||
/>
|
||||
</template>
|
||||
<div class="layout-bg" style="height: calc(100vh - 160px)">
|
||||
<div class="layout-bg">
|
||||
<div class="flex-between p-16 ml-8">
|
||||
<h4>{{ currentFolder?.name }}</h4>
|
||||
<el-input
|
||||
v-model="searchValue"
|
||||
:placeholder="$t('common.search')"
|
||||
prefix-icon="Search"
|
||||
class="w-240 mr-8"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
|
||||
<el-scrollbar>
|
||||
<div class="p-16-24">
|
||||
<div class="p-16-24 pt-0" style="height: calc(100vh - 200px)">
|
||||
<el-row :gutter="12" v-loading="loading" v-if="filterData.length">
|
||||
<el-col
|
||||
:span="12"
|
||||
@ -150,9 +153,11 @@ watch(dialogVisible, (bool) => {
|
||||
|
||||
watch(searchValue, (val) => {
|
||||
if (val) {
|
||||
searchData.value = knowledgeList.value.filter((v) => v.name.includes(val))
|
||||
searchData.value = knowledgeList.value.filter(
|
||||
(v) => v.name.includes(val) && v.folder_id === currentFolder.value?.id,
|
||||
)
|
||||
} else {
|
||||
searchData.value = knowledgeList.value
|
||||
searchData.value = knowledgeList.value.filter((v) => v.folder_id === currentFolder.value?.id)
|
||||
}
|
||||
})
|
||||
|
||||
@ -191,6 +196,8 @@ const submitHandle = () => {
|
||||
}
|
||||
|
||||
const refresh = () => {
|
||||
searchValue.value = ''
|
||||
knowledgeList.value= []
|
||||
getList()
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user