style(Field): adjust field placeholder color to gray-5 (#6304)

This commit is contained in:
neverland 2020-05-19 11:04:16 +08:00 committed by GitHub
parent 8317fe70ee
commit ee599ddcbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 5 deletions

View File

@ -17,7 +17,7 @@ The value of field is bound with v-model.
```html
<van-cell-group>
<van-field v-model="value" placeholder="Text" />
<van-field v-model="value" label="Label" placeholder="Text" />
</van-cell-group>
```

View File

@ -22,7 +22,7 @@ Vue.use(Field);
```html
<!-- Field 是基于 Cell 实现的,可以使用 CellGroup 作为容器来提供外边框。 -->
<van-cell-group>
<van-field v-model="value" placeholder="请输入用户名" />
<van-field v-model="value" label="文本" placeholder="请输入用户名" />
</van-cell-group>
```

View File

@ -1,7 +1,11 @@
<template>
<demo-block :title="t('basicUsage')">
<van-cell-group>
<van-field v-model="value" :placeholder="t('placeholder')" />
<van-field
v-model="value"
:label="t('label')"
:placeholder="t('placeholder')"
/>
</van-cell-group>
</demo-block>
</template>
@ -10,9 +14,11 @@
export default {
i18n: {
'zh-CN': {
label: '文本',
placeholder: '请输入文本',
},
'en-US': {
label: 'Label',
placeholder: 'Text',
},
},

View File

@ -5,7 +5,8 @@ exports[`renders demo correctly 1`] = `
<div>
<div class="van-cell-group van-hairline--top-bottom">
<div class="van-cell van-field">
<div class="van-cell__value van-cell__value--alone van-field__value">
<div class="van-cell__title van-field__label"><span>文本</span></div>
<div class="van-cell__value van-field__value">
<div class="van-field__body"><input type="text" placeholder="请输入文本" class="van-field__control"></div>
</div>
</div>

View File

@ -349,7 +349,7 @@
@field-input-text-color: @text-color;
@field-input-error-text-color: @red;
@field-input-disabled-text-color: @gray-6;
@field-placeholder-text-color: @gray-6;
@field-placeholder-text-color: @gray-5;
@field-icon-size: 16px;
@field-clear-icon-size: 16px;
@field-clear-icon-color: @gray-5;