Skip to content

Commit

Permalink
fix(form): fix the form item setting not taking effect
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Nov 3, 2020
1 parent 21a225c commit 6936adb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- 修复升级之后 table 类型问题
- 修复分割菜单且左侧菜单没有数据时候,继续展示上一次子菜单的问题
- 修复`useMessage`类型问题
- 修复表单项设置`disabled`不生效问题

## 2.0.0-rc.8 (2020-11-2)

Expand Down
5 changes: 3 additions & 2 deletions src/components/Form/src/FormItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ export default defineComponent({

const getDisableRef = computed(() => {
const { disabled: globDisabled } = props.formProps;
const { dynamicDisabled } = props.schema;
let disabled = !!globDisabled;
const { dynamicDisabled, componentProps = {} } = props.schema;
const { disabled: itemDisabled = false } = componentProps;
let disabled = !!globDisabled || itemDisabled;
if (isBoolean(dynamicDisabled)) {
disabled = dynamicDisabled;
}
Expand Down

0 comments on commit 6936adb

Please sign in to comment.