js
例如:这里的 searchOption
product_id: {
type: 'string',
label: '商品ID',
tableOption: {
width: 100,
'show-overlow-tooltip': true
},
searchOption: {
comType: 'input',
default: '',
placeholder: '请输入商品ID'
},
detailPanelOption:{}
},
js
<!-- 动态组件 -->
<el-form-item v-for="(item, key) in schema.properties" :key="key" :label="item.label">
<component :is="schemaSearchConfig[item?.option?.comType]" :schemaKey="key" :schema="item"
@loaded="handleChildLoad" :ref="handleSeachComponentList">
</component>
</el-form-item>
js
const getValue = () => {
return dtoValue.value !== undefined ? { [schemaKey]: dtoValue.value } : {}
}
const getValue = () => {
let valueObj = {}
searchComponentList.value.forEach(component => {
valueObj = {
...valueObj,
...component?.getValue()
}
})
return valueObj;
}
评论 0
还没有评论,来坐沙发