[英]TypeError: Cannot read property 'v4' of undefined
Am getting this error in vue我在 vue 中收到此错误
vue.esm.js?efeb:628 [Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'v4'
of undefined"
found in
---> <AddTodo> at src/components/AddTodo.vue
<App> at src/App.vue
<Root>
I have already installed uuid so v4 should be working but it is not.我已经安装了 uuid,所以 v4 应该可以工作,但事实并非如此。
I got same error and I solved it.我遇到了同样的错误,我解决了。
import {v4} from 'uuid';
const uuId = v4()
Maybe I'm late to the party也许我迟到了
import * as uuid from 'uuid';
Now you can call anything from uuid.现在你可以从 uuid 调用任何东西。 Such as,
如,
uuid.v4();
Hope this helps希望这可以帮助
Am getting this error in vue我在 vue 中遇到这个错误
vue.esm.js?efeb:628 [Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'v4'
of undefined"
found in
---> <AddTodo> at src/components/AddTodo.vue
<App> at src/App.vue
<Root>
I have already installed uuid so v4 should be working but it is not.我已经安装了 uuid,所以 v4 应该可以工作,但事实并非如此。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.