mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix cell
This commit is contained in:
parent
6280c694ae
commit
1c0d395841
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<a class="zan-cell" :href="url" @click="handleClick">
|
<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">
|
<slot name="icon">
|
||||||
<i v-if="icon" class="zan-icon" :class="'zan-icon-' + icon"></i>
|
<i v-if="icon" class="zan-icon" :class="'zan-icon-' + icon"></i>
|
||||||
</slot>
|
</slot>
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
ref="textareaElement"
|
ref="textareaElement"
|
||||||
class="zan-field__control"
|
class="zan-field__control"
|
||||||
v-model="currentValue"
|
v-model="currentValue"
|
||||||
|
@focus="handleInputFocus"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:maxlength="maxlength"
|
:maxlength="maxlength"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@ -28,6 +29,7 @@
|
|||||||
class="zan-field__control"
|
class="zan-field__control"
|
||||||
:value="currentValue"
|
:value="currentValue"
|
||||||
@input="handleInput"
|
@input="handleInput"
|
||||||
|
@focus="handleInputFocus"
|
||||||
:type="type"
|
:type="type"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:maxlength="maxlength"
|
:maxlength="maxlength"
|
||||||
@ -104,6 +106,10 @@ export default {
|
|||||||
// 需要先设为0, 才可以让scrollHeight正确计算。
|
// 需要先设为0, 才可以让scrollHeight正确计算。
|
||||||
textareaElement.style.height = 0 + 'px';
|
textareaElement.style.height = 0 + 'px';
|
||||||
textareaElement.style.height = (textareaElement.scrollHeight - textAreaDiff) + 'px';
|
textareaElement.style.height = (textareaElement.scrollHeight - textAreaDiff) + 'px';
|
||||||
|
},
|
||||||
|
|
||||||
|
handleInputFocus() {
|
||||||
|
this.$emit('focus');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@when alone {
|
@when alone {
|
||||||
float: left;
|
float: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user