Files
PhotonVision/chameleon-client/src/components/ch-select.vue

46 lines
1.0 KiB
Vue
Raw Normal View History

2019-03-15 21:47:44 +02:00
<template>
2019-03-24 20:01:57 +02:00
<Row type="flex" justify="start" align="middle" :gutter="1" >
<Col span="4">
<h4>{{title.charAt(0).toUpperCase() + title.slice(1)}} :</h4>
</Col>
<Col span="4">
<i-select v-model="value" size="small" v-bind:placeholder="list[0]" @on-change="handleInput">
<i-option v-for="item in list" :value="item" :key="item">{{item}}</i-option>
</i-select>
</Col>
</Row>
2019-03-15 21:47:44 +02:00
</template>
<script>
export default {
name: 'ch-select',
2019-03-23 23:42:24 +02:00
props:[
'title',
'list'
],
2019-03-15 21:47:44 +02:00
data() {
return {
content:this.value
}
},
methods: {
handleInput() {
2019-03-23 23:42:24 +02:00
this.$emit('input',{[this.title]:this.value});
2019-03-15 21:47:44 +02:00
}
}
}
</script>
2019-03-16 21:47:34 +02:00
<style>
2019-03-15 21:47:44 +02:00
h4 {
color: #e6ebf1;
2019-03-24 20:01:57 +02:00
text-align: left;
2019-03-15 21:47:44 +02:00
}
2019-03-24 21:01:25 +03:00
/* .ivu-select-selection{
2019-03-16 21:47:34 +02:00
background-color: #2c3e50 !important;
2019-03-24 21:01:25 +03:00
} */
/* .ivu-select-selected-value{
2019-03-16 21:47:34 +02:00
color: #fff !important;
2019-03-24 21:01:25 +03:00
} */
2019-03-16 21:47:34 +02:00
2019-03-15 21:47:44 +02:00
</style>