lyc-dev #135

Merged
lyc merged 3 commits from lyc-dev into main 2024-12-16 09:51:00 +08:00
1 changed files with 15 additions and 13 deletions
Showing only changes of commit a3079a87d0 - Show all commits

View File

@ -40,7 +40,7 @@ const props = defineProps({
type: Number,
default: 1
},
item: { //
item: { //
type: Object,
default: () => {
return { ex3: '' }
@ -73,23 +73,25 @@ const loading = ref(false)
const saveAdd = async () => {
loading.value = true
if (props.item.ex3 == '1') {
let id; // id id
if (props.item.isAdd) {
try {
// copy
const { msg } = await addKeyWords({ name: form.name, id: props.item.id })
emitter.emit('onGetMain')
ElMessage.success(msg)
mode.value = false
} finally {
loading.value = false
}
id = props.item.id
}
else{
onAddChildTemp(props.item.parentId)
// item item.parentId
id = props.item.parentId
}
try {
// copy
const { msg } = await addKeyWords({ name: form.name, id })
emitter.emit('onGetMain')
ElMessage.success(msg)
mode.value = false
} finally {
loading.value = false
}
} else {
if (props.item.isAdd) {
onAddChildTemp(props.item.id)
}