better cValue logic in shadow-control

This commit is contained in:
Henry Jameson 2024-10-07 01:31:22 +03:00
commit f75ea738ca
2 changed files with 10 additions and 13 deletions

View file

@ -82,9 +82,7 @@ const moveDn = () => {
}
const add = () => {
const newModel = [...props.modelValue]
newModel.push(props.getAddValue())
console.log(newModel)
const newModel = [...props.modelValue, props.getAddValue()]
emit('update:modelValue', newModel)
emit('update:selectedId', Math.max(newModel.length - 1, 0))