add basic frame, basic login page
This commit is contained in:
@@ -1,8 +1,21 @@
|
||||
<template>
|
||||
<div class="My-Input">
|
||||
<label>{{ label }}</label>
|
||||
<input type="text" v-if="type == 'text'" v-model="currentValue" @blur="validate()" @change="() => $emit('change', currentValue)">
|
||||
<input type="password" v-else-if="type == 'password'" v-model="currentValue" @blur="validate()" @change="() => $emit('change', currentValue)">
|
||||
<div class="input_holder">
|
||||
<div class="input_header" v-if="label">
|
||||
<label :for="name">{{ label }}</label>
|
||||
</div>
|
||||
<div class="input_description" v-if="description">{{ description }}</div>
|
||||
<input type="text" v-if="type == 'text'"
|
||||
v-model="currentValue"
|
||||
:name="name"
|
||||
:placeholder="placeholder"
|
||||
@blur="validate()"
|
||||
@change="() => $emit('change', currentValue)">
|
||||
<input type="password" v-else-if="type == 'password'"
|
||||
v-model="currentValue"
|
||||
:name="name"
|
||||
:placeholder="placeholder"
|
||||
@blur="validate()"
|
||||
@change="() => $emit('change', currentValue)">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -10,9 +23,11 @@
|
||||
export default {
|
||||
name: "MyInput",
|
||||
props: [
|
||||
'description',
|
||||
'label',
|
||||
'type',
|
||||
'name',
|
||||
'placeholder',
|
||||
'type',
|
||||
'value'
|
||||
],
|
||||
data() {
|
||||
@@ -31,4 +46,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
Reference in New Issue
Block a user