Files
mixtape/zero.Web.UI/App/editor/fields/text.vue
T

29 lines
604 B
Vue
Raw Normal View History

2020-04-30 14:21:43 +02:00
<template>
2020-08-18 15:12:35 +02:00
<div class="ui-box">
2020-09-17 11:26:23 +02:00
<input :value="value" @input="$emit('input', $event.target.value)" type="text" class="ui-input" v-localize:placeholder="config.placeholder" :maxlength="maxLength" :disabled="disabled" />
2020-08-18 15:12:35 +02:00
</div>
2020-04-30 14:21:43 +02:00
</template>
<script>
export default {
props: {
2020-04-30 15:35:09 +02:00
value: {
type: String,
default: null
},
2020-09-17 11:26:23 +02:00
config: Object,
disabled: {
type: Boolean,
default: false
}
},
computed: {
maxLength()
{
2020-06-23 12:23:23 +02:00
return this.config.maxLength > 0 ? this.config.maxLength : null;
2020-04-30 15:35:09 +02:00
}
2020-04-30 14:21:43 +02:00
}
}
</script>