Re-organize webcfg structure

This commit is contained in:
JustArchi
2018-04-27 04:50:21 +02:00
parent a624927b8a
commit 0ca1fbd4ff
107 changed files with 17 additions and 100 deletions

View File

@@ -0,0 +1,31 @@
<template>
<div class="form-item">
<label :for="schema.field">
{{ schema.label }}
<span v-if="schema.required" class="req">*</span>
<span v-if="schema.description" class="desc">{{ $t(schema.description) }}</span>
</label>
<input type="password" :name="schema.field" :id="schema.field" :placeholder="schema.placeholder" :required="schema.required" :class="{ error: invalid }" v-model="value">
<span v-if="invalid" class="error">{{ errors.join(' ') }}</span>
</div>
</template>
<script>
import Input from '../mixin/Input.vue';
export default {
mixins: [Input],
name: 'InputPassword',
computed: {
errors() {
return this.validate(this.value);
},
valid() {
return this.errors.length === 0;
},
invalid() {
return this.errors.length !== 0;
}
}
};
</script>