A
A
Artem00712017-08-03 11:40:53
JavaScript
Artem0071, 2017-08-03 11:40:53

How to connect JqueryUI to VueJS?

I use vue-cli , I

only managed to connect jquery, but I can’t connect *-ui

As I already did:
npm install jquery-ui

in webpack.prod.conf.js in plugins I registered

new webpack.DefinePlugin({
      'process.env': env,
      $: 'jquery',
      jquery: 'jquery',
      'window.jQuery': 'jquery',
      jQuery: 'jquery'
    }),


As a result, it turned out to connect only pure jquery, as I understand it, because this worked:
mounted(){
            $('a').click(function (e) {
                alert('working!')
            })
        }


And I need draggable(), but it’s not in pure jquery, as I understand it, I need -ui

I also tried this method , but I don’t understand where to write require
I need this draggable only on one page, but I don’t understand where and how to connect

it I didn’t find jquery, I tried to write my own, but the idea failed, so I need to connect jquery

UPD:
I also read this article, but it doesn’t say exactly how he installed this jq and plugins

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aslan, 2017-08-03
@Artem0071

Why not use view libs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question