Skip to content

Commit 3801d48

Browse files
committed
fix: 1051957
--bug=1051957 --user=王孝刚 【知识库】在预览时修改添加标题,勾选导入时添加分段标题为关联问题,问题未和分段关联 https://www.tapd.cn/57709429/s/1650244
1 parent 2732323 commit 3801d48

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

ui/src/views/dataset/component/SetRules.vue

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@
101101
</el-checkbox>
102102
</div>
103103
<div class="text-right mt-8">
104-
<el-button @click="splitDocument"> {{ $t('views.document.buttons.preview') }}</el-button>
104+
<el-button @click="splitDocument">
105+
{{ $t('views.document.buttons.preview') }}</el-button
106+
>
105107
</div>
106108
</div>
107109
</el-col>
@@ -147,19 +149,19 @@ const form = reactive<{
147149
148150
function changeHandle(val: boolean) {
149151
if (val && firstChecked.value) {
150-
const list = paragraphList.value
151-
list.map((item: any) => {
152-
item.content.map((v: any) => {
153-
v['problem_list'] = v.title.trim()
152+
paragraphList.value = paragraphList.value.map((item: any) => ({
153+
...item,
154+
content: item.content.map((v: any) => ({
155+
...v,
156+
problem_list: v.title.trim()
154157
? [
155158
{
156159
content: v.title.trim()
157160
}
158161
]
159162
: []
160-
})
161-
})
162-
paragraphList.value = list
163+
}))
164+
}))
163165
firstChecked.value = false
164166
}
165167
}

0 commit comments

Comments
 (0)