CyCraft / CyCraft/blitzar

Use VueUse composable useVModel to update all props

Open
#147 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
126
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Hi! Thank you for the work put in Blitzar.

I'm using Blitzar to create a dynamic form creator where user selects form-components and then modify properties on the form components. Change schema values.
I would like to use VueUse composable to achieve this change props and then updating through emits the schema and not just form data. Is this possible could you give some hints best way to change schema from component? here is an example only works for formData modeValue but not schema props:

```html

import { ref } from 'vue';
import { useVModel } from '@vueuse/core';

const emits = defineEmits([
'update:modelValue',
'update:required',
'update:text',
]);
const props = defineProps([
'modelValue',
'name',
'placeholder',
'text',
'required',
'readonly',
]);

const modelValue = useVModel(props, 'modelValue', emits);
const required = useVModel(props, 'required', emits);
const text = useVModel(props, 'text', emits);
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.