1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

TextField: display div with label if label passed

This commit is contained in:
lana-k
2021-04-29 20:47:09 +02:00
parent a991b02a20
commit 5ded99e89f

View File

@@ -1,6 +1,6 @@
<template>
<div>
<div :class="['text-field-label', { error: errorMsg }, {'disabled': disabled}]">
<div v-if="label" :class="['text-field-label', { error: errorMsg }, {'disabled': disabled}]">
{{ label }}
<hint-icon class="hint" v-if="hint" :hint="hint" :max-width="maxHintWidth || '149px'"/>
</div>
@@ -11,7 +11,7 @@
:style="{ width: width }"
:value="value"
:disabled="disabled"
@input="$emit('input', $event.target.value)"
@input="$emit('input', $event.target.value)"
/>
<div v-show="errorMsg" class="text-field-error">{{ errorMsg }}</div>
</div>