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:
parent
3de5daccbc
commit
2ba7a24f95
@ -1,5 +1,3 @@
|
|||||||
import { number } from 'echarts'
|
|
||||||
|
|
||||||
export function toThousands(num: any) {
|
export function toThousands(num: any) {
|
||||||
return num?.toString().replace(/\d+/, function (n: any) {
|
return num?.toString().replace(/\d+/, function (n: any) {
|
||||||
return n.replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
|
return n.replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
@change="addProblemHandle"
|
@change="addProblemHandle"
|
||||||
@blur="isAddProblem = false"
|
@blur="isAddProblem = false"
|
||||||
ref="inputRef"
|
ref="inputRef"
|
||||||
|
class="mb-8"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<template v-for="(item, index) in detail.problem_list" :key="index">
|
<template v-for="(item, index) in detail.problem_list" :key="index">
|
||||||
|
|||||||
@ -76,6 +76,15 @@ const next = () => {
|
|||||||
|
|
||||||
const updateContent = (data: any) => {
|
const updateContent = (data: any) => {
|
||||||
const new_value = [...props.modelValue]
|
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)
|
new_value[currentCIndex.value] = cloneDeep(data)
|
||||||
emit('update:modelValue', new_value)
|
emit('update:modelValue', new_value)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user