feat(Form): add disabled and readonly prop (#7830)
* feat(Form): add disabled and readonly prop * chore(Field): 使用 getProp 方法 * fix(Field): 将 computed 改为直接取值
This commit is contained in:
@@ -471,6 +471,8 @@ export default {
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
| --- | --- | --- | --- |
|
||||
| disabled | Whether to disable field | _boolean_ | `false` |
|
||||
| readonly | Whether to be readonly | _boolean_ | `false` |
|
||||
| label-width | Field label width | _number \| string_ | `6.2em` |
|
||||
| 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` |
|
||||
|
||||
@@ -504,6 +504,8 @@ export default {
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| disabled | 是否禁用输入框 | _boolean_ | `false` |
|
||||
| readonly | 是否只读 | _boolean_ | `false` |
|
||||
| label-width | 表单项 label 宽度,默认单位为`px` | _number \| string_ | `6.2em` |
|
||||
| label-align | 表单项 label 对齐方式,可选值为 `center` `right` | _string_ | `left` |
|
||||
| input-align | 输入框对齐方式,可选值为 `center` `right` | _string_ | `left` |
|
||||
|
||||
@@ -7,6 +7,8 @@ const [createComponent, bem] = createNamespace('form');
|
||||
|
||||
export default createComponent({
|
||||
props: {
|
||||
disabled: Boolean,
|
||||
readonly: Boolean,
|
||||
colon: Boolean,
|
||||
labelWidth: [Number, String],
|
||||
labelAlign: String,
|
||||
|
||||
Reference in New Issue
Block a user