fix: bug#16693

This commit is contained in:
XieYongHong 2023-07-24 09:45:05 +08:00
parent 69dfc01b0d
commit 83bde12038
1 changed files with 16 additions and 16 deletions

View File

@ -302,22 +302,22 @@ export const useColumns = (type?: MetadataType, target?: 'device' | 'product', n
title: '输入参数',
dataIndex: 'inputs',
width: 120,
form: {
required: true,
rules: [{
callback(rule:any,value: any, dataSource: any[]) {
const field = rule.field.split('.')
const fieldIndex = Number(field[1])
const values = dataSource.find((item, index) => index === fieldIndex)
return validatorConfig({
type: 'object',
properties: values.inputs
}, true)
}
}]
},
// form: {
// required: true,
// rules: [{
// callback(rule:any,value: any, dataSource: any[]) {
// const field = rule.field.split('.')
// const fieldIndex = Number(field[1])
//
// const values = dataSource.find((item, index) => index === fieldIndex)
//
// return validatorConfig({
// type: 'object',
// properties: values.inputs
// }, true)
// }
// }]
// },
control(newValue, oldValue) {
if (newValue && !oldValue) {
return true