Vue-multiselect: How to register it without require or import?

Created on 1 Dec 2016  路  6Comments  路  Source: shentao/vue-multiselect

Hi,

I would like to use this plugin at legacy page where I don't have webpack or require, so how can I register multiselect like:

javascript new Vue({ el: '#app', components: { 'multiselect': <<< ??? HOW TO REGISTER IT HERE >>> }, data: { selected: null, options: ['list', 'of', 'options'] }, methods: { updateSelected (newSelected) { this.selected = newSelected } } })

Most helpful comment

This info should be more accessible on the official page. Took me a while to find it.

All 6 comments

Should be available as window.VueMultiselect.default when you add it with just a <script> tag.

Thanks for fast response :)

I made http://codepen.io/cve/pen/qqpZrv with demonstration this situation and in the console I see

Multiselect is not defined

Sorry, my bad! Should be window.VueMultiselect.default :)

Ok, I've updated code snippet, but now in the console I see:

Invalid prop: type check failed for prop "key". Expected String, got Boolean. (found in component <multiselect>)

Sorry, I miss #139 Thanks for help :)

This info should be more accessible on the official page. Took me a while to find it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

focussing picture focussing  路  3Comments

wujekbogdan picture wujekbogdan  路  4Comments

PrimozRome picture PrimozRome  路  3Comments

xereda picture xereda  路  4Comments

yaakovp picture yaakovp  路  3Comments