<script>
export default {
setup () {
const store = useStore()
const responseField = reactive([])
const handlerLink = async (value) => {
try {
const { child } = await getManualId(value.item.id)
responseField.push(...child)
} catch (e) {
await store.dispatch('setAlert', {
type: 'error',
description: 'Не удалось загрузить данные о справочнике'
})
}
}
return {
...useManualForm(responseField)
}
}
}
</script>
export function useManualForm (field) {
const formData = reactive({
name: ''
})
const rules = {
}
const serverErrors = reactive({})
const formAction = async () => {
}
return {
...useForm(rules, formData, formAction),
serverErrors
}
}
По изменению responseFields хочу добавить поля в formData