2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-10 07:52:23 +03:00

adjust webpack config for renderless component

This commit is contained in:
Jeff
2019-11-06 09:52:36 -08:00
parent db8b40afab
commit 612d7153b4
5 changed files with 36 additions and 8 deletions
+27
View File
@@ -0,0 +1,27 @@
<script>
import Select from './Select';
export default {
...Select,
computed: {
...Select.computed,
searchEl() {
return this.$root.$el.querySelector('input[type=search]');
}
},
render () {
const scope = {};
for (const property in {
...Select.computed,
...Select.methods,
...Select.props,
...this.$data,
}) {
scope[property] = this[property];
}
return this.$scopedSlots.default(scope);
},
};
</script>
-4
View File
@@ -1,7 +1,3 @@
<style lang="scss">
@import '../scss/vue-select.scss';
</style>
<template>
<div :dir="dir" class="v-select" :class="stateClasses">
<div ref="toggle" @mousedown.prevent="toggleDropdown" class="vs__dropdown-toggle">