Merge pull request #34 from cmath10/formulario-field-html-tag
feat: Possibility to change html tag used by FormularioField
This commit is contained in:
commit
5d9991e880
@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-bind="$attrs">
|
<component
|
||||||
|
:is="tag"
|
||||||
|
v-bind="$attrs"
|
||||||
|
>
|
||||||
<slot :context="context" />
|
<slot :context="context" />
|
||||||
</div>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<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: () => <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: () => <T, U>(value: U|T): U|T => value }) modelSetConverter!: ModelSetConverter
|
||||||
|
|
||||||
|
@Prop({ default: 'div' }) tag!: string
|
||||||
|
|
||||||
public proxy: unknown = this.hasModel ? this.value : ''
|
public proxy: unknown = this.hasModel ? this.value : ''
|
||||||
|
|
||||||
private localErrors: string[] = []
|
private localErrors: string[] = []
|
||||||
|
Loading…
Reference in New Issue
Block a user