Browse Source

fix(form): fix the form item setting not taking effect

pull/117/head
vben 6 years ago
parent
commit
6936adb2c2
  1. 1
      CHANGELOG.zh_CN.md
  2. 5
      src/components/Form/src/FormItem.tsx

1
CHANGELOG.zh_CN.md

@ -17,6 +17,7 @@
- 修复升级之后 table 类型问题
- 修复分割菜单且左侧菜单没有数据时候,继续展示上一次子菜单的问题
- 修复`useMessage`类型问题
- 修复表单项设置`disabled`不生效问题
## 2.0.0-rc.8 (2020-11-2)

5
src/components/Form/src/FormItem.tsx

@ -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;
}

Loading…
Cancel
Save