Skip to content

Commit 6ca6c5b

Browse files
fix: application add knowledge
1 parent 390faf2 commit 6ca6c5b

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

ui/src/locales/lang/zh-CN/layout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ export default {
2929
expiringSoon: '即将到期'
3030
},
3131
copyright: '版权所有 © 2014-2025 杭州飞致云信息科技有限公司',
32-
userManualUrl: 'https://maxkb.cn/docs/',
32+
userManualUrl: 'https://maxkb.cn/docs/v2/',
3333
forumUrl: 'https://bbs.fit2cloud.com/c/mk/11'
3434
}

ui/src/locales/lang/zh-Hant/layout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ export default {
3030
expiringSoon: '即將到期'
3131
},
3232
copyright: '版權所有 © 2014-2025 杭州飛致雲信息科技有限公司',
33-
userManualUrl:'https://maxkb.cn/docs/',
33+
userManualUrl:'https://maxkb.cn/docs/v2/',
3434
forumUrl: 'https://github.com/1Panel-dev/MaxKB/discussions'
3535
}

ui/src/views/application/component/AddKnowledgeDialog.vue

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@
2121
</div>
2222

2323
<div class="flex align-center mr-8">
24-
<el-input
25-
v-model="searchValue"
26-
:placeholder="$t('common.search')"
27-
prefix-icon="Search"
28-
class="w-240 mr-8"
29-
clearable
30-
/>
31-
<el-divider direction="vertical" />
3224
<el-button link class="mr-16" @click="refresh">
3325
<el-icon class="mr-4" :size="18"><Refresh /></el-icon>
3426
</el-button>
@@ -49,9 +41,20 @@
4941
:treeStyle="{ height: 'calc(100vh - 320px)' }"
5042
/>
5143
</template>
52-
<div class="layout-bg" style="height: calc(100vh - 160px)">
44+
<div class="layout-bg">
45+
<div class="flex-between p-16 ml-8">
46+
<h4>{{ currentFolder?.name }}</h4>
47+
<el-input
48+
v-model="searchValue"
49+
:placeholder="$t('common.search')"
50+
prefix-icon="Search"
51+
class="w-240 mr-8"
52+
clearable
53+
/>
54+
</div>
55+
5356
<el-scrollbar>
54-
<div class="p-16-24">
57+
<div class="p-16-24 pt-0" style="height: calc(100vh - 200px)">
5558
<el-row :gutter="12" v-loading="loading" v-if="filterData.length">
5659
<el-col
5760
:span="12"
@@ -150,9 +153,11 @@ watch(dialogVisible, (bool) => {
150153
151154
watch(searchValue, (val) => {
152155
if (val) {
153-
searchData.value = knowledgeList.value.filter((v) => v.name.includes(val))
156+
searchData.value = knowledgeList.value.filter(
157+
(v) => v.name.includes(val) && v.folder_id === currentFolder.value?.id,
158+
)
154159
} else {
155-
searchData.value = knowledgeList.value
160+
searchData.value = knowledgeList.value.filter((v) => v.folder_id === currentFolder.value?.id)
156161
}
157162
})
158163
@@ -191,6 +196,8 @@ const submitHandle = () => {
191196
}
192197
193198
const refresh = () => {
199+
searchValue.value = ''
200+
knowledgeList.value= []
194201
getList()
195202
}
196203

0 commit comments

Comments
 (0)