This commit is contained in:
zpc 2026-02-08 11:48:03 +08:00
parent 7fdc73939a
commit 051c778155

View File

@ -77,11 +77,10 @@ watch(() => props.modelValue, (newVal) => {
}
}, { immediate: true, deep: true })
//
// - amount=0
const handleChange = () => {
// 0
const validList = rewardList.value.filter(item => item.amount > 0)
emit('update:modelValue', validList)
//
emit('update:modelValue', rewardList.value.map(item => ({ ...item })))
}
//
@ -92,7 +91,7 @@ const addItem = () => {
//
const removeItem = (index: number) => {
rewardList.value.splice(index, 1)
handleChange()
emit('update:modelValue', rewardList.value.map(item => ({ ...item })))
}
onMounted(() => {