mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 20:04:09 +00:00
[new feature] Checkbox: support config the maximum amount of checked options (#631)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<van-checkbox-group v-model="result">
|
||||
<van-checkbox-group v-model="result" :max="max">
|
||||
<van-checkbox v-for="(item, index) in list" :key="index" :name="item" :disabled="index === 2">复选框{{item}}</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
</template>
|
||||
@@ -22,7 +22,8 @@ export default {
|
||||
'c',
|
||||
'd'
|
||||
],
|
||||
result: ['a', 'b']
|
||||
result: ['a', 'b'],
|
||||
max: 0
|
||||
};
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user