There was an error while loading. Please reload this page.
1 parent 6b732c2 commit 906daaaCopy full SHA for 906daaa
1 file changed
packages/dag/src/components/form/field-inference/List.vue
@@ -745,10 +745,11 @@ export default {
745
handleChangeCustomInput() {
746
const { customInputData } = this.currentData
747
this.currentData.newDataType = this.customInputDataValue
748
- .replace('[', '')
749
- .replace(']', '')
750
- .replace(/\$[^,]*\b/g, function (val) {
751
- return '' + customInputData[val.replace(/^\$/, '')]?.value || val
+ .replace(/\[(.*?)\]/g, '$1') // 去掉所有的方括号,保留内容
+ .replace(/\$\w+/g, match => {
+ // 匹配所有 $ 开头的变量
+ const key = match.slice(1) // 去掉 $ 前缀
752
+ return customInputData[key]?.value || match
753
})
754
}
755
0 commit comments