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

feat: Possibility to change html tag used by FormularioField

This commit is contained in:
Zaytsev Kirill 2021-09-29 11:15:32 +03:00
parent f1094bb6c9
commit c7d3e833a4

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[] = []