How to add script to the ui-template widget

Trying to add script to a the ui-template widget to add behaviour the widget.
Does not seem to work.
example script:

  export default {
    data: () => ({
      sheet: false,

Hi! Thanak for trying this out. Unfortunately we dont quite yet support this, but one of the items top on our list to get to.

Hoping it’ll only be a couple of weeks away.

Maybe I’m missing something or not understanding the requirement - can’t we just import the script in the classic HTML way -
e.g. <script src="myscripts.js"></script>

It works on Dashboard 1.0

Yes, you can, but youre creating a Vue component in that script, which Vue has no visibility of, so it just gets loaded as an arbitary JS class/object, that doesn’t get bound to the HTML template.

We have just shipped v0.10.0 which now supports this - docs.

1 Like