Closed cliftonlabrum closed 4 years ago
To do so you just have to import uuid's v4 and define into $uuid
attribute of Vue's prototype.
import uuid from 'uuid/v4';
import Vue from 'vue';
Vue.prototype.$uuid = uuid;
Perfect, thank you!
I want to use
v4()
globally in my Vue app. Is there a way to import this so that the$uuid
default is the same thing as using$uuid.v4()
but without having to remember the.v4()
everywhere?Thanks!