1. 双向绑定
<template>
<div class="params-select">
<GDropdown
size="small"
:class="selectStyle"
v-model="model"
:menu-max-height="height"
:options="options"
/>
</div>
</template>
<script>
export default {
components: {
GDropdown,
},
props: {
value: null,
},
computed: {
model: {
get() {
return this.value;
},
set(val) {
this.$emit('input', val);
},
},
},
methods: {},
};
</script>