mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 1051957
--bug=1051957 --user=王孝刚 【知识库】在预览时修改添加标题,勾选导入时添加分段标题为关联问题,问题未和分段关联 https://www.tapd.cn/57709429/s/1650244
This commit is contained in:
parent
2732323c6d
commit
3801d482cd
|
|
@ -101,7 +101,9 @@
|
|||
</el-checkbox>
|
||||
</div>
|
||||
<div class="text-right mt-8">
|
||||
<el-button @click="splitDocument"> {{ $t('views.document.buttons.preview') }}</el-button>
|
||||
<el-button @click="splitDocument">
|
||||
{{ $t('views.document.buttons.preview') }}</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
|
@ -147,19 +149,19 @@ const form = reactive<{
|
|||
|
||||
function changeHandle(val: boolean) {
|
||||
if (val && firstChecked.value) {
|
||||
const list = paragraphList.value
|
||||
list.map((item: any) => {
|
||||
item.content.map((v: any) => {
|
||||
v['problem_list'] = v.title.trim()
|
||||
paragraphList.value = paragraphList.value.map((item: any) => ({
|
||||
...item,
|
||||
content: item.content.map((v: any) => ({
|
||||
...v,
|
||||
problem_list: v.title.trim()
|
||||
? [
|
||||
{
|
||||
content: v.title.trim()
|
||||
}
|
||||
]
|
||||
: []
|
||||
})
|
||||
})
|
||||
paragraphList.value = list
|
||||
}))
|
||||
}))
|
||||
firstChecked.value = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue