1
0
mirror of synced 2024-11-21 21:06:04 +03:00

Merge pull request #34 from cmath10/formulario-field-html-tag

feat: Possibility to change html tag used by FormularioField
This commit is contained in:
Kruglov Kirill 2021-09-29 11:37:49 +03:00 committed by GitHub
commit 5d9991e880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,10 @@
<template>
<div v-bind="$attrs">
<component
:is="tag"
v-bind="$attrs"
>
<slot :context="context" />
</div>
</component>
</template>
<script lang="ts">
@ -68,6 +71,8 @@ export default class FormularioField extends Vue {
@Prop({ default: () => <U, T>(value: U|Empty): U|T|Empty => value }) modelGetConverter!: ModelGetConverter
@Prop({ default: () => <T, U>(value: U|T): U|T => value }) modelSetConverter!: ModelSetConverter
@Prop({ default: 'div' }) tag!: string
public proxy: unknown = this.hasModel ? this.value : ''
private localErrors: string[] = []