mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-22 14:39:16 +08:00
[improvement] Field:增加titleWidth属性 (#482)
This commit is contained in:
parent
852269a272
commit
dd488a0e3b
@ -57,9 +57,9 @@
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 0 15px;
|
||||
font-size: 18px;
|
||||
font-size: 18px !important;
|
||||
color: $gray-dark;
|
||||
position: absolute;
|
||||
line-height: inherit;
|
||||
position: absolute !important;
|
||||
line-height: inherit !important;
|
||||
}
|
||||
}
|
||||
|
@ -96,6 +96,7 @@
|
||||
|-----------|-----------|-----------|-------------|
|
||||
| icon | 左侧图标,可选值见 Icon 组件 | `String` | - |
|
||||
| title | 左侧标题 | `String | Number` | - |
|
||||
| titleWidth | 标题宽度 | `Number` | - |
|
||||
| value | 右侧内容 | `String | Number` | - |
|
||||
| label | 标题下方的描述信息 | `String` | - |
|
||||
| border | 是否显示下边框 | `Boolean` | `true` |
|
||||
|
@ -133,6 +133,7 @@
|
||||
| readonly | 是否只读 | `Boolean` | `false` |
|
||||
| clearable | 是否启用清除控件 | `Boolean` | `false` |
|
||||
| required | 是否显示表单必填星号 | `Boolean` | `false` |
|
||||
| titleWidth | 标题宽度 | `Number` | `90` |
|
||||
| maxlength | 最大输入长度,设置为 -1 的时候不限制最大长度 | `Number` | `-1` |
|
||||
| placeholder | 输入框为空时占位符 | `String` | - |
|
||||
| is-link | 是否展示右侧箭头并开启点击反馈 | `Boolean` | `false` |
|
||||
|
@ -53,6 +53,10 @@ Component({
|
||||
border: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
titleWidth: {
|
||||
type: Number,
|
||||
value: 90
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
is-link="{{ isLink }}"
|
||||
required="{{ required }}"
|
||||
custom-style="{{ customStyle }}"
|
||||
title-width="90px"
|
||||
title-width="{{ titleWidth }}"
|
||||
custom-class="{{ customClass }} van-field {{ labelAlign ? 'van-field--label-' + labelAlign : '' }}"
|
||||
>
|
||||
<slot name="label" slot="title" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user