12345678910111213141516171819202122232425262728293031323334 |
- <template lang="pug">
- div
- select.input-select(@change='onSelect')
- option(
- v-for='o in options'
- :value='o.id'
- ) {{ o.name }}
- </template>
- <script>
- export default {
- props: {
- selected: {
- type: Object,
- default: ''
- },
- options: {
- type: Array,
- default: []
- }
- },
- methods: {
- onSelect(e) {
- this.$emit('onSelect', e.target.value)
- }
- }
- }
- </script>
- <style lang="sass">
- .input-select
- width: 100%
- height: 35px
- </style>
|