O
O
okkkman2020-01-20 09:07:52
Vue.js
okkkman, 2020-01-20 09:07:52

How to run this component without Webpack?

Hello.
How to run this component without Webpack?
https://innologica.github.io/vue2-daterange-picker...
Found CDN: https://www.jsdelivr.com/package/npm/vue2-daterang... Inserted
in head:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue2-daterange-picker.css" type='text/css'>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue2-daterange-picker.umd.min.js"></script>

How to register a component?
Vue.use(DateRangePicker) not working

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2020-01-20
@okkkman

No use, it's just a component.
i.e. or

Vue.component('date-range-picker', window['vue2-daterange-picker'].default);
or
{
  components: {
    DateRangePicker:  window['vue2-daterange-picker'].default
  }, 
  // ...
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question