Answer the question
In order to leave comments, you need to log in
Error render function or template not defined in component: anonymous nuxt?
I included jquery, bxslider
config:
head: {
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Nuxt.js project' }
],
script: [
{type: 'text / javascript', src: 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'},
{type: 'text / javascript', src: 'https://cdnjs.cloudflare.com/ajax/libs/bxslider/4.2.12/jquery.bxslider.min.js'},
],
link: [
{rel: 'stylesheet', type: 'text / css', href: '//cdnjs.cloudflare.com/ajax/libs/bxslider/4.2.12/jquery.bxslider.min.css'}
plugins: [
{ src:'~/plugins/js/jquery-3.3.1.min.js', ssr: false },
{ src:'~/plugins/js/bxslider.min.js', ssr: false },
{ src:'~/plugins/js/circle-progress.js', ssr: false}
],
build: {
vendor: ['jquery', 'bxslider'],}
<script>
const $ = window.$
export default {
methods: {
hideTroughJquery (selector) {
$(selector).hide()
}
},
mounted () {
$('.bxslider').bxSlider()
}
}
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question