Open CHOMNANP opened 2 years ago
Hello @CHOMNANP are you using nuxt with typescript?
I am using nuxtjs with javascript.
Unfortunately I don't have much nuxt experience but I will try to test it when I got some time
I implemented this in nuxt, a way that I found to make the component work correctly is add a button toggler to mount the component after the client is in the view, try it.
Note: In the plugins on nuxt.config.js I setted mode: 'client' instead of ssr: false and and set ssr:false in every page that I use the component
This how I made it work with nuxt:
// plugins/vue-camera.js
import Vue from 'vue'
import EasyCamera from 'easy-vue-camera'
Vue.component('EasyCamera', EasyCamera)
// nuxt.config.js
...
plugins: [
{ src: '~/plugins/vue-camera.js', mode: 'client' }
],
...
<!-- pages/camera.vue -->
<template>
<EasyCamera v-model="picture" />
</template>
...
Anyone manage to this plugin in Nuxtjs?
I have tried install the plugin in nuxtjs, yet I got the error message saying the component is not found in nuxtjs. I have confirmed that the installation and configuration has been done.