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:
@@ -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>
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user