F
F
frolova_elena2018-07-04 19:44:28
JavaScript
frolova_elena, 2018-07-04 19:44:28

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'],}

component.vue


<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

1 answer(s)
F
frolova_elena, 2018-07-04
@frolova_elena

render .but these plugins are not connected

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question