mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
fix cell
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<a class="zan-cell" :href="url" @click="handleClick">
|
||||
<div :class="{ 'zan-cell__title': true, 'zan-cell__required': required }">
|
||||
<div :class="{ 'zan-cell__title': true, 'zan-cell__required': required }" v-if="this.$slots.title || title || label">
|
||||
<slot name="icon">
|
||||
<i v-if="icon" class="zan-icon" :class="'zan-icon-' + icon"></i>
|
||||
</slot>
|
||||
|
@@ -16,6 +16,7 @@
|
||||
ref="textareaElement"
|
||||
class="zan-field__control"
|
||||
v-model="currentValue"
|
||||
@focus="handleInputFocus"
|
||||
:placeholder="placeholder"
|
||||
:maxlength="maxlength"
|
||||
:disabled="disabled"
|
||||
@@ -28,6 +29,7 @@
|
||||
class="zan-field__control"
|
||||
:value="currentValue"
|
||||
@input="handleInput"
|
||||
@focus="handleInputFocus"
|
||||
:type="type"
|
||||
:placeholder="placeholder"
|
||||
:maxlength="maxlength"
|
||||
@@ -104,6 +106,10 @@ export default {
|
||||
// 需要先设为0, 才可以让scrollHeight正确计算。
|
||||
textareaElement.style.height = 0 + 'px';
|
||||
textareaElement.style.height = (textareaElement.scrollHeight - textAreaDiff) + 'px';
|
||||
},
|
||||
|
||||
handleInputFocus() {
|
||||
this.$emit('focus');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@@ -65,7 +65,7 @@
|
||||
}
|
||||
|
||||
@when alone {
|
||||
float: left;
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user