Convert select2 component to SFC for more standard handling -- this was requiring the vue runtime before...

This commit is contained in:
Dannon Baker
2022-04-22 11:47:01 -04:00
parent cacf6b94ab
commit c6d8c6ba4d
@@ -1,10 +1,16 @@
<template>
<select>
<slot></slot>
</select>
</template>
<script>
// Based on https://vuejs.org/v2/examples/select2.html but adapted to handle list values
// with "multiple: true" set.
import $ from "jquery";
export default {
props: ["options", "value", "placeholder", "containerClass", "enabled"],
template: `<select><slot></slot></select>`,
mounted: function () {
const vm = this;
// TODO: refactor property list to objects that allow defaults and types
@@ -49,3 +55,4 @@ export default {
$(this.$el).off().select2("destroy");
},
};
</script>