Skip to content

Directives

Bruno P. Kinoshita edited this page Oct 14, 2021 · 2 revisions

We have only one custom Vue directive in Cylc UI, the v-cylc-object directive to display a context menu with mutations.

It is used in components like TreeItem when it creates an instance of Task or Job.

You must specify an ID, as that is used to create the form and mutations, as in the example below.

<task v-cylc-object="node.node.id"  ... />

The directive simply creates a listener that emits an event to show the context menu. The click event that you use when you click a task, job, etc, is created here.

Clone this wiki locally