Files
speckle-connectors-dui/components/config/Dialog.vue
T
Kristaps Fabians Geikins f2d7493c2a chore: move package over from speckle-server (#2)
* stuff copied over, but aint workin

* various fixes

* vscode settings

* trigger deploy

* trigger deploy
2025-05-13 16:18:45 +03:00

34 lines
836 B
Vue

<template>
<!-- ONLY FOR TEST FOR NOW-->
<form class="flex flex-col space-y-4 form-json-form">
<span>Settings</span>
<FormJsonForm :schema="jsonSchema" @change="onParamsFormChange"></FormJsonForm>
</form>
</template>
<script setup lang="ts">
import type { JsonFormsChangeEvent } from '@jsonforms/vue'
const jsonSchema = {
type: 'object',
properties: {
acceptTerms: {
type: 'boolean',
title: 'I accept the terms and conditions'
},
username: { type: 'string', title: 'Username', default: 'a' },
color: {
type: 'string',
title: 'Favorite Color',
enum: ['red', 'green', 'blue']
}
}
}
const paramsFormState = ref<JsonFormsChangeEvent>()
const onParamsFormChange = (e: JsonFormsChangeEvent) => {
paramsFormState.value = e
console.log(JSON.stringify(e))
}
</script>