fix: Check the option to add segment title as related questions during import, and related questions after modifying the title (#2255)

This commit is contained in:
wangdan-fit2cloud 2025-02-12 15:13:40 +08:00 committed by GitHub
parent 3de5daccbc
commit 2ba7a24f95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,3 @@
import { number } from 'echarts'
export function toThousands(num: any) {
return num?.toString().replace(/\d+/, function (n: any) {
return n.replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')

View File

@ -31,6 +31,7 @@
@change="addProblemHandle"
@blur="isAddProblem = false"
ref="inputRef"
class="mb-8"
/>
<template v-for="(item, index) in detail.problem_list" :key="index">

View File

@ -76,6 +76,15 @@ const next = () => {
const updateContent = (data: any) => {
const new_value = [...props.modelValue]
if (
props.isConnect &&
data.title &&
!data?.problem_list.some((item: any) => item.content === data.title.trim())
) {
data['problem_list'].push({
content: data.title.trim()
})
}
new_value[currentCIndex.value] = cloneDeep(data)
emit('update:modelValue', new_value)
}