-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: this.$refs.fullscreen.toggle is not a function #29
Comments
The same problem with example: <template>
<div id="app">
<div class="example">
Content
</div>
<button type="button" @click="toggle" >Fullscreen</button>
</div>
</template>
<script>
import fullscreen from 'vue-fullscreen'
import Vue from 'vue'
Vue.use(fullscreen)
export default {
methods: {
toggle () {
this.$fullscreen.toggle(this.$el.querySelector('.example'), {
wrap: false,
callback: this.fullscreenChange
})
},
fullscreenChange (fullscreen) {
this.fullscreen = fullscreen
}
},
data() {
return {
fullscreen: false
}
}
}
</script> |
And the same problem with «No conflict» example: <template>
<div id="app">
<fs ref="fullscreen">
Content
</fs>
<div class="example">
Content
</div>
<button type="button" @click="toggle" >Fullscreen</button>
</div>
</template>
<script>
import Fullscreen from 'vue-fullscreen'
import Vue from 'vue'
Vue.use(Fullscreen, {name: 'fs'})
export default {
methods: {
toggle () {
this.$refs['fullscreen'].toggle()
this.$fs.toggle(this.$el.querySelector('.example'), {
wrap: false,
callback: this.fullscreenChange
})
},
fullscreenChange (fullscreen) {
this.fullscreen = fullscreen
}
},
data() {
return {
fullscreen: false
}
}
}
</script> |
I can't reproduce this problem. |
My code is Field Component for Laravel Nova (https://nova.laravel.com/) |
I have never used Laravel Nova. |
Hi! I copy and compile example:
In browser:
But after click Fullscreen button nothing happened. In browser colsole I see error:
The text was updated successfully, but these errors were encountered: