Off topic - vuejs and vuetify - how to use v-on

80 views
Skip to first unread message

Bruce Mcpherson

unread,
Mar 11, 2020, 10:32:21 AM3/11/20
to Google Apps Script Community
This is quite off topic, but a few of you have been telling me that you are using vuejs for your client side htmlservice apps. If you are, here's a write up on how to use v-on and component activation slots if you are interested. 

There's also (coincidentally) a few things about destructuring in there that would be of interest for those moving to V8.

Faustino Rodriguez

unread,
Mar 12, 2020, 11:16:37 AM3/12/20
to Google Apps Script Community
Thanks Bruce for sharing
I now feel more comfortable on my Vue-path knowing you are also on it
I started to use Vue+Vuetify last year for any new project and planning to migrate others when an upgrade is required

That combination (Vue+Vuetify) have anything I had used before plus most of what I have missed in other libraries

Bruce Mcpherson

unread,
Mar 12, 2020, 11:32:31 AM3/12/20
to google-apps-sc...@googlegroups.com
Great stuff. Are you also using graphql (vue-apollo)?

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/e15124de-fefa-40c0-85f3-598372f943df%40googlegroups.com.

Faustino Rodriguez

unread,
Mar 12, 2020, 1:13:51 PM3/12/20
to Google Apps Script Community
Indeed
Not there yet, I don't know what is graphql and what is used for ...

Alex

unread,
Mar 12, 2020, 9:54:28 PM3/12/20
to Google Apps Script Community
[Offtop of the offtop]

I saw several mentions about Vue and etc. on the forum. But I didn't see any info about UI construction.

I use non-bundle assembly on the local side. I'm based on HtmlService templates for templating and prototyping. Something like this. It works perfectly.
  • And I wonder how you build your projects for add-ons?
  • Do you use css preprocessors for builds?
  • Bundles (Webpack, Parcel)?
Best, Alex.

Bruce Mcpherson

unread,
Mar 13, 2020, 5:17:09 AM3/13/20
to google-apps-sc...@googlegroups.com
Graphql is query language, so you can use it independent of the databases it resolves to (indeed you can combine a whole selection of back end databases). It goes perfectly with reactive frameworks such as vue and react. 

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.

Bruce Mcpherson

unread,
Mar 13, 2020, 5:20:09 AM3/13/20
to google-apps-sc...@googlegroups.com
Hi Alex

Most of my Vue work is not Apps Script related, so I'm using vie-cli for building. With Apps script, the method you are using is probably best. I'd recommend  using a material component framework with it like vuetify though, as it takes care of css for you. No need for bootstrap or jquery or those kind of things i see you have in the project you shared.

bruce



--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.

Alex

unread,
Mar 16, 2020, 5:21:30 AM3/16/20
to Google Apps Script Community
Thanks Bruce!

I'll update my sample with my the last flow after adding vuetify.

Bruce Mcpherson

unread,
Mar 16, 2020, 6:35:48 AM3/16/20
to google-apps-sc...@googlegroups.com
btw - quasar is less complicated than vuetify, and seems to have more components. I haven't tried it as I already committed to vuetify, but if i was starting again, I'd probably look at it too.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.

Alan Wells

unread,
Mar 16, 2020, 11:39:38 AM3/16/20
to Google Apps Script Community
I took a look at quasar.  Looks interesting.  Thanks for the suggestion.


On Monday, March 16, 2020 at 6:35:48 AM UTC-4, Bruce Mcpherson wrote:
btw - quasar is less complicated than vuetify, and seems to have more components. I haven't tried it as I already committed to vuetify, but if i was starting again, I'd probably look at it too.

On Mon, 16 Mar 2020 at 09:21, Alex <oshli...@gmail.com> wrote:
Thanks Bruce!

I'll update my sample with my the last flow after adding vuetify.

On Friday, March 13, 2020 at 12:20:09 PM UTC+3, Bruce Mcpherson wrote:
Hi Alex

Most of my Vue work is not Apps Script related, so I'm using vie-cli for building. With Apps script, the method you are using is probably best. I'd recommend  using a material component framework with it like vuetify though, as it takes care of css for you. No need for bootstrap or jquery or those kind of things i see you have in the project you shared.

bruce

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.

João Soares

unread,
Jan 20, 2021, 12:57:06 PM1/20/21
to Google Apps Script Community
Hi, Alex! I've looked in a fair bit to the code you linked here, but when I try to adapt it into mine, It always fails because of the "window.Vue.use" function specified in the router CDN. I am trying to make it work inside a dialog, opened with "DocumentApp.getUi().showModalDialog()", but I keep getting that error. I'm just wondering if this error is specific to dialogs, since the whole window is not used, and thus failing to execute that operation, or if it's something else on my end.

Bruce Mcpherson

unread,
Jan 21, 2021, 7:47:16 AM1/21/21
to google-apps-sc...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/eec4ade7-0dc5-4d2b-b8dd-82b87e4024b1o%40googlegroups.com.

Bruce Mcpherson

unread,
Jan 21, 2021, 12:13:18 PM1/21/21
to google-apps-sc...@googlegroups.com
Hey Alex

You've been busy!
image.png

On Mon, 16 Mar 2020 at 09:21, Alex <oshli...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages