窑炉
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
class="btn"
|
||||
v-for="opt in options"
|
||||
:key="opt"
|
||||
@click="active = opt"
|
||||
@click="clickBtn(opt)"
|
||||
:class="active == opt ? 'btn-active' : ''">
|
||||
{{ opt }}
|
||||
</button>
|
||||
@@ -22,15 +22,18 @@
|
||||
export default {
|
||||
name: 'SelectorBtnGroup',
|
||||
components: {},
|
||||
props: ['options'],
|
||||
props: ['options', 'active'],
|
||||
data() {
|
||||
return {
|
||||
active: this.options[0] || 'default'
|
||||
// active: this.options[0] || 'default'
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
|
||||
clickBtn(opt) {
|
||||
// this.active = opt
|
||||
this.$emit('emitFun', opt)
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user