fix filed and step

This commit is contained in:
cookfront
2017-03-09 17:32:44 +08:00
parent c17a4261ec
commit 5387aaae29
7 changed files with 118 additions and 14 deletions
+6 -6
View File
@@ -3,14 +3,15 @@
class="zan-field"
:title="label"
:class="{
'is-textarea': type === 'textarea',
'is-nolabel': !label
'zan-field--hastextarea': type === 'textarea',
'zan-field--nolabel': !label,
'zan-field--disabled': disabled,
'zan-field--error': error
}">
<textarea
v-if="type === 'textarea'"
class="zan-field__control"
v-model="currentValue"
@change="$emit('change', currentValue)"
:placeholder="placeholder"
:maxlength="maxlength"
:disabled="disabled"
@@ -20,7 +21,6 @@
v-else
class="zan-field__control"
:value="currentValue"
@change="$emit('change', currentValue)"
@input="handleInput"
:type="type"
:placeholder="placeholder"
@@ -46,9 +46,10 @@ export default {
default: 'text'
},
placeholder: String,
value: String,
value: {},
label: String,
disabled: Boolean,
error: Boolean,
readonly: Boolean,
maxlength: [String, Number]
},
@@ -66,7 +67,6 @@ export default {
currentValue(val) {
this.$emit('input', val);
console.log(val);
}
},
+15 -2
View File
@@ -6,13 +6,13 @@
width: 100%;
overflow: hidden;
@when textarea {
@m hastextarea {
.zan-field__control {
min-height: 60px;
}
}
@when nolabel {
@m nolabel {
.zan-cell__title {
display: none;
}
@@ -23,6 +23,19 @@
}
}
@m disabled {
.zan-field__control {
color: $c-gray-dark;
}
}
@m error {
.zan-field__control,
.zan-cell__title {
color: $c-red;
}
}
.zan-cell__title,
.zan-cell__value {
float: none;
+1 -1
View File
@@ -106,7 +106,7 @@
.zan-step__circle-container {
left: auto;
right: -8px;
right: -9px;
}
.zan-step__line {