@ederzeel/nuxt-schema-form-nightly 0.1.0-29162168.04d859a → 0.1.0-29162277.41a79d0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -184,15 +184,14 @@ const options = computed(() => {
|
|
|
184
184
|
})
|
|
185
185
|
|
|
186
186
|
const open = (index: number) => {
|
|
187
|
-
console.log('click')
|
|
188
|
-
console.log(values.value[index])
|
|
189
187
|
if (props.setHidden) props.setHidden(true)
|
|
190
|
-
model.value = {
|
|
188
|
+
model.value = { index: index, value: structuredClone(values.value[index]) }
|
|
191
189
|
}
|
|
192
190
|
|
|
193
191
|
const onInput = (value: Record<string, unknown>, index: number) => {
|
|
194
|
-
props.modelValue
|
|
195
|
-
|
|
192
|
+
const res = JSON.parse(JSON.stringify(props.modelValue))
|
|
193
|
+
res[index] = value
|
|
194
|
+
emit('update:modelValue', res)
|
|
196
195
|
}
|
|
197
196
|
|
|
198
197
|
const add = () => {
|
|
@@ -279,12 +278,12 @@ const hidden = ref(false)
|
|
|
279
278
|
<UButton
|
|
280
279
|
@click="
|
|
281
280
|
() => {
|
|
282
|
-
onInput(model.value, model.index)
|
|
281
|
+
if (model.value) onInput(model.value, model.index)
|
|
283
282
|
if (props.setHidden) props.setHidden(false)
|
|
284
283
|
model.value = undefined
|
|
285
284
|
}
|
|
286
285
|
"
|
|
287
|
-
>
|
|
286
|
+
>Save</UButton
|
|
288
287
|
>
|
|
289
288
|
<UButton
|
|
290
289
|
variant="outline"
|
|
@@ -294,7 +293,7 @@ const hidden = ref(false)
|
|
|
294
293
|
model.value = undefined
|
|
295
294
|
}
|
|
296
295
|
"
|
|
297
|
-
>
|
|
296
|
+
>Cancle</UButton
|
|
298
297
|
>
|
|
299
298
|
</div>
|
|
300
299
|
</div>
|