feat(Form): add disabled and readonly prop (#7829)

* feat(Form): add disabled and readonly prop

* chore(Field): 使用 getProp 方法

* fix(Field): 将 computed 改为直接取值
This commit is contained in:
Mikasa33
2020-12-30 17:29:42 +08:00
committed by GitHub
parent 6972afffb5
commit 8da1e23d53
4 changed files with 25 additions and 7 deletions
+2
View File
@@ -427,6 +427,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` |
+2
View File
@@ -458,6 +458,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` |
+2
View File
@@ -5,6 +5,8 @@ const [createComponent, bem] = createNamespace('form');
export default createComponent({
props: {
disabled: Boolean,
readonly: Boolean,
colon: Boolean,
labelWidth: [Number, String],
labelAlign: String,