Browse Source

fix: variable plugin sync outputs.properties

xiamidaxia 10 months ago
parent
commit
730b6bb8b4

+ 1 - 1
apps/demo-fixed-layout/src/plugins/variable-plugin/variable-plugin.ts

@@ -53,7 +53,7 @@ export const createVariablePlugin: PluginCreator<VariablePluginOptions> = define
         syncOutputs(form.getValueIn('outputs'));
         // Listen outputs change
         form.onFormValuesChange(props => {
-          if (props.name === 'outputs') {
+          if (props.name.match(/^outputs/)) {
             syncOutputs(form.getValueIn('outputs'));
           }
         });

+ 1 - 1
apps/demo-free-layout/src/plugins/variable-plugin/variable-plugin.ts

@@ -53,7 +53,7 @@ export const createVariablePlugin: PluginCreator<VariablePluginOptions> = define
         syncOutputs(form.getValueIn('outputs'));
         // Listen outputs change
         form.onFormValuesChange(props => {
-          if (props.name === 'outputs') {
+          if (props.name.match(/^outputs/)) {
             syncOutputs(form.getValueIn('outputs'));
           }
         });