Skip to content

Instantly share code, notes, and snippets.

@tai2
tai2 / jquery-selectmenu.js
Last active September 11, 2021 11:30
jquery ui select menu vue component
Vue.component('jquery-selectmenu', {
props: ['value'],
template: `<select><slot /></select>`,
mounted: function() {
const emit = value => this.$emit('input', value);
$(this.$el).selectmenu({
change: function(event, data) {
emit(data.item.value);
}
});