mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-21 02:50:11 +08:00
This commit is contained in:
parent
6050baf0b2
commit
e10071a430
@ -125,7 +125,7 @@ describe('Checkbox', () => {
|
||||
expect(vm.checkList).toEqual(['a'])
|
||||
})
|
||||
|
||||
test('true false lable', async () => {
|
||||
test('true false label', async () => {
|
||||
const wrapper = _mount(
|
||||
`<el-checkbox true-label="a" :false-label="3" v-model="checked"></el-checkbox>`,
|
||||
() => ({
|
||||
@ -155,6 +155,27 @@ describe('Checkbox', () => {
|
||||
expect(wrapper.vm.checked).toBe(true)
|
||||
expect(wrapper.vm.checklist).toEqual(['a'])
|
||||
})
|
||||
|
||||
test('label', async() => {
|
||||
const wrapper = _mount(
|
||||
`
|
||||
<div>
|
||||
<el-checkbox-group v-model="checklist">
|
||||
<el-checkbox label="">all</el-checkbox>
|
||||
<el-checkbox label="a">a</el-checkbox>
|
||||
<el-checkbox label="b">b</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
`,
|
||||
() => ({
|
||||
checked: false,
|
||||
checklist: [],
|
||||
}),
|
||||
)
|
||||
const checkbox = wrapper.find('.el-checkbox')
|
||||
await checkbox.trigger('click')
|
||||
expect(wrapper.vm.checklist[0]).toEqual('')
|
||||
})
|
||||
})
|
||||
|
||||
describe('check-button', () => {
|
||||
|
@ -75,7 +75,7 @@ export default defineComponent({
|
||||
default: () => undefined,
|
||||
},
|
||||
label: {
|
||||
type: [Boolean, Number, String],
|
||||
type: [String, Boolean, Number],
|
||||
},
|
||||
indeterminate: Boolean,
|
||||
disabled: Boolean,
|
||||
|
Loading…
Reference in New Issue
Block a user