feat(Form): input-align works for input slot

This commit is contained in:
陈嘉涵 2020-02-13 16:49:30 +08:00
parent 2afb8a79c0
commit 5d24a57fee
6 changed files with 13 additions and 11 deletions

View File

@ -47,7 +47,7 @@ exports[`color prop when type is range 1`] = `
</div>
</div>
</div>
<div class="van-calendar__footer van-calendar__footer--safe-area-inset-bottom"><button class="van-button van-button--danger van-button--normal van-button--block van-button--round van-calendar__confirm" style="color: rgb(255, 255, 255); background: blue; border-color: blue;"><span class="van-button__text">确定</span></button></div>
<div class="van-calendar__footer van-calendar__footer--safe-area-inset-bottom"><button type="text" class="van-button van-button--danger van-button--normal van-button--block van-button--round van-calendar__confirm" style="color: rgb(255, 255, 255); background: blue; border-color: blue;"><span class="van-button__text">确定</span></button></div>
</div>
`;
@ -98,7 +98,7 @@ exports[`color prop when type is single 1`] = `
</div>
</div>
</div>
<div class="van-calendar__footer van-calendar__footer--safe-area-inset-bottom"><button class="van-button van-button--danger van-button--normal van-button--block van-button--round van-calendar__confirm" style="color: rgb(255, 255, 255); background: blue; border-color: blue;"><span class="van-button__text">确定</span></button></div>
<div class="van-calendar__footer van-calendar__footer--safe-area-inset-bottom"><button type="text" class="van-button van-button--danger van-button--normal van-button--block van-button--round van-calendar__confirm" style="color: rgb(255, 255, 255); background: blue; border-color: blue;"><span class="van-button__text">确定</span></button></div>
</div>
`;
@ -152,7 +152,7 @@ exports[`formatter prop 1`] = `
</div>
</div>
</div>
<div class="van-calendar__footer van-calendar__footer--safe-area-inset-bottom"><button class="van-button van-button--danger van-button--normal van-button--block van-button--round van-calendar__confirm"><span class="van-button__text">确定</span></button></div>
<div class="van-calendar__footer van-calendar__footer--safe-area-inset-bottom"><button type="text" class="van-button van-button--danger van-button--normal van-button--block van-button--round van-calendar__confirm"><span class="van-button__text">确定</span></button></div>
</div>
`;
@ -206,7 +206,7 @@ exports[`popup wrapper 2`] = `
</div>
</div>
</div>
<div class="van-calendar__footer van-calendar__footer--safe-area-inset-bottom"><button class="van-button van-button--danger van-button--normal van-button--block van-button--round van-calendar__confirm"><span class="van-button__text">确定</span></button></div>
<div class="van-calendar__footer van-calendar__footer--safe-area-inset-bottom"><button type="text" class="van-button van-button--danger van-button--normal van-button--block van-button--round van-calendar__confirm"><span class="van-button__text">确定</span></button></div>
</div><i role="button" tabindex="0" class="van-icon van-icon-cross van-popup__close-icon van-popup__close-icon--top-right">
<!----></i>
</div>
@ -259,7 +259,7 @@ exports[`row-height prop 1`] = `
</div>
</div>
</div>
<div class="van-calendar__footer van-calendar__footer--safe-area-inset-bottom"><button class="van-button van-button--danger van-button--normal van-button--block van-button--round van-calendar__confirm"><span class="van-button__text">确定</span></button></div>
<div class="van-calendar__footer van-calendar__footer--safe-area-inset-bottom"><button type="text" class="van-button van-button--danger van-button--normal van-button--block van-button--round van-calendar__confirm"><span class="van-button__text">确定</span></button></div>
</div>
`;

View File

@ -236,8 +236,8 @@ Use `input-align` prop to align the input value
| arrow-direction `v2.0.4` | Can be set to `left` `up` `down` | *string* | `right` |
| label-class | Label className | *any* | - |
| label-width | Label width | *number \| string* | `90px` |
| label-align | Label text align, can be set to `center` `right` | *string* | `left` |
| input-align | Input text align, can be set to `center` `right` | *string* | `left` |
| label-align | Label align, can be set to `center` `right` | *string* | `left` |
| input-align | Input align, can be set to `center` `right` | *string* | `left` |
| error-message-align | Error message align, can be set to `center` `right` | *string* | `left` |
| autosize | Textarea auto resizecan accpet an object,<br>e.g. { maxHeight: 100, minHeight: 50 } | *boolean \| object* | `false` |
| left-icon | Left side icon name | *string* | - |

View File

@ -256,7 +256,7 @@ export default {
| label-class | 左侧文本额外类名 | *any* | - |
| label-width | 左侧文本宽度,默认单位为`px` | *number \| string* | `90px` |
| label-align | 左侧文本对齐方式,可选值为 `center` `right` | *string* | `left` |
| input-align | 输入框内容对齐方式,可选值为 `center` `right` | *string* | `left` |
| input-align | 输入框对齐方式,可选值为 `center` `right` | *string* | `left` |
| error-message-align | 错误提示文案对齐方式,可选值为 `center` `right` | *string* | `left` |
| autosize | 是否自适应内容高度,只对 textarea 有效,<br>可传入对象,如 { maxHeight: 100, minHeight: 50 }<br>单位为`px` | *boolean \| object* | `false` |
| left-icon | 左侧[图标名称](#/zh-CN/icon)或图片链接 | *string* | - |

View File

@ -55,10 +55,12 @@
}
&--center {
justify-content: center;
text-align: center;
}
&--right {
justify-content: flex-end;
text-align: right;
}

View File

@ -406,8 +406,8 @@ export default {
| Attribute | Description | Type | Default |
|------|------|------|------|
| label-width | Field label width | *number \| string* | `90px` |
| label-align | Field label text align, can be set to `center` `right` | *string* | `left` |
| input-align | Field input text align, can be set to `center` `right` | *string* | `left` |
| label-align | Field label align, can be set to `center` `right` | *string* | `left` |
| input-align | Field input align, can be set to `center` `right` | *string* | `left` |
| error-message-align | Error message align, can be set to `center` `right` | *string* | `left` |
| validate-first | Whether to stop the validation when a rule fails | *boolean* | `false` |

View File

@ -439,7 +439,7 @@ export default {
|------|------|------|------|
| label-width | 表单项文本宽度,默认单位为`px` | *number \| string* | `90px` |
| label-align | 表单项文本对齐方式,可选值为 `center` `right` | *string* | `left` |
| input-align | 输入框内容对齐方式,可选值为 `center` `right` | *string* | `left` |
| input-align | 输入框对齐方式,可选值为 `center` `right` | *string* | `left` |
| error-message-align | 错误提示文案对齐方式,可选值为 `center` `right` | *string* | `left` |
| validate-first | 是否在某一项校验不通过时停止校验 | *boolean* | `false` |