diff --git a/ui/src/views/dataset/component/SetRules.vue b/ui/src/views/dataset/component/SetRules.vue
index 847a7216f..a377af44e 100644
--- a/ui/src/views/dataset/component/SetRules.vue
+++ b/ui/src/views/dataset/component/SetRules.vue
@@ -101,7 +101,9 @@
- {{ $t('views.document.buttons.preview') }}
+
+ {{ $t('views.document.buttons.preview') }}
@@ -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
}
}