StationSelect.vue
807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<template>
<div class="station-select">
<a-radio-group v-model="selectedStation" @change="handleChange" button-style="solid">
<a-row :gutter="16">
<a-col :span="8" v-for="station in stations" :key="station">
<a-radio-button :value="station" style="margin-bottom: 10px; width: 100px">
{{ station }}
</a-radio-button>
</a-col>
</a-row>
</a-radio-group>
</div>
</template>
<script>
export default {
name: 'StationSelect',
data() {
return {
selectedStation: '',
stations: ['纵切机台1', '纵切机台2', '纵切机台3']
}
},
methods: {
handleChange(e) {
this.$emit('select', e.target.value)
}
}
}
</script>
<style scoped>
.station-select {
padding: 20px;
text-align: center;
}
</style>