mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
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) {
|
||||
return num?.toString().replace(/\d+/, function (n: any) {
|
||||
return n.replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue