Commit 451fde16 by zhaochengxiang

bug fix

parent 33adf925
......@@ -136,7 +136,12 @@ const FC = (props) => {
newDatasource = JSON.parse(JSON.stringify(newDatasource));
newDatasource && (newDatasource.targetParameters||[]).forEach(item => {
if (item.selectMode === null && item.required) {
item.needEnc = (item.value!==datasourceRow[item.name])
const index = (datasource?.targetParameters??[]).findIndex(_item => _item.name === item.name)
item.needEnc = true
if (index !== -1) {
item.needEnc = (datasource?.targetParameters[index].value!==datasourceRow[item.name])
}
}
item.value = datasourceRow[item.name]||'';
......@@ -144,7 +149,12 @@ const FC = (props) => {
newDatasource && newDatasource.credential && (newDatasource.credential.credentialParameters||[]).forEach(item => {
if (item.selectMode === null && item.required) {
item.needEnc = (item.value!==credentialRow[item.name]);
const index = (datasource?.credential?.credentialParameters??[]).findIndex(_item => _item.name === item.name)
item.needEnc = true
if (index !== -1) {
item.needEnc = (datasource?.credential?.credentialParameters[index].value!==credentialRow[item.name])
}
}
item.value = credentialRow[item.name]||'';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment