Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed dynamic outpus #22

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed dynamic outpus
  • Loading branch information
Will-create committed Jan 20, 2023
commit bffcb8687a4fbb76d85c2f49a824ceeb4ca5a2ed
16 changes: 15 additions & 1 deletion components/code.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,21 @@
<ui-component name="codemirror" path="?.code" config="type:javascript;minheight:300;parent:auto;margin:60;tabs:true;trim:true" class="m"></ui-component>
</div>
</settings>

<script>
TOUCH(function(exports, init) {
exports.configure = function() {
var changes = exports.instance.changes;
if (changes && changes.newbie) {
var outputs = [];
var count = exports.instance.config.outputs;
for (let i = 1; i <= count; i++)
outputs.push({ id: 'output' + (i === 1 ? '' : i), name: (count === 1 ? 'Output' : 'Output #' + i) });
exports.instance.outputs = outputs;
UPD('flow.data');
}
}
});
</script>
<body>
<header>
<i class="ICON"></i>NAME
Expand Down