我有 UI 显示来自 3 个不同数组的按钮,这些数据是相关的,订单交换和奇偶校验,按钮具有预先选择的值,如果选择交换 2,我需要选择奇偶校验 2。
<html>
<v-flex md4 sm4 >
<v-select
v-model="select7"
:items="orders"
flat solo
></v-select>
</v-flex>
<v-flex md4 sm4 >
<v-select
v-model="select2"
:items="exchanges"
flat solo
></v-select>
</v-flex>
<v-flex md4 sm4 >
<v-select
v-model="select3"
:items="parities"
flat solo
></v-select>
</html>
<script>
data () {
select7:'o1',
orders: ['o1','o2'],
select2:'ex1',
select5:'ex1',
select8:'ex2',
exchanges: ['ex1','ex2'],
select3:'par1',
select6:'par1',
select9:'par4',
parities: ['par1,'par2','par3'],
parities2: ['par4,'par5','par6']
}
computed : {
availableParitiess() {
if (this.exchanges === 'ex2'){
return this.parities = parities2 ;
}
}
</script>