diff --git a/package.json b/package.json index 8d6f965..52b3d9d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "v-form-engine", - "version": "1.2.3", + "version": "1.2.4", "description": "一个基于 vue + element-ui 的 PC 端表单引擎。支持灵活的配置项、编辑/查看两种视图、自定义模板/插槽、溢出隐藏、双击复制等...", "typings": "dist/index.d.ts", "main": "dist/v-form-engine.js", diff --git a/src/form-engine.vue b/src/form-engine.vue index bd96e12..660a504 100644 --- a/src/form-engine.vue +++ b/src/form-engine.vue @@ -46,9 +46,21 @@ :is="getComponentName(item.type)" :placeholder="getPlaceholder(item)" :type="item.type" - :clearable="item.clearable || clearable" - :disabled="item.disabled || disabled" - :readonly="item.readonly" + :clearable="getAttrValue( + getAttrValue(item, 'component-props', item), + 'clearable', + getAttrValue(item, 'clearable', clearable) + )" + :disabled="getAttrValue( + getAttrValue(item, 'component-props', item), + 'disabled', + getAttrValue(item, 'disabled', disabled) + )" + :readonly="getAttrValue( + getAttrValue(item, 'component-props', item), + 'readonly', + getAttrValue(item, 'readonly', readonly) + )" >