Checkbox: Using the max attribute can limit the number of items that can be checked (#14742) (#15585)

This commit is contained in:
MASONGZHI
2019-05-28 20:41:13 +08:00
committed by luckyCao
parent 384c56381c
commit c04021e4dc
3 changed files with 22 additions and 3 deletions

View File

@@ -147,6 +147,7 @@ describe('Checkbox', () => {
}
}, true);
expect(vm.checkList.length === 1).to.be.true;
expect(vm.$refs.a.isDisabled).to.be.true;
vm.$refs.a.$el.click();
vm.$nextTick(() => {
expect(vm.checkList.indexOf('a') !== -1).to.be.true;
@@ -158,6 +159,8 @@ describe('Checkbox', () => {
vm.$nextTick(() => {
expect(vm.checkList.indexOf('c') !== -1).to.be.false;
expect(vm.checkList.indexOf('d') !== -1).to.be.false;
expect(vm.$refs.c.isDisabled).to.be.true;
expect(vm.$refs.d.isDisabled).to.be.true;
done();
});
});