mirror of https://github.com/ElemeFE/element
parent
a230e4a0ff
commit
dc816832e1
|
@ -156,7 +156,7 @@
|
|||
return this.size || this._formSize;
|
||||
},
|
||||
sizeClass() {
|
||||
return (this.$ELEMENT || {}).size || this.elFormItemSize;
|
||||
return this.elFormItemSize || (this.$ELEMENT || {}).size;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
|
@ -102,6 +102,27 @@ describe('Form', () => {
|
|||
expect(vm.$refs.labelLeft.$el.classList.contains('el-form--label-left')).to.be.true;
|
||||
done();
|
||||
});
|
||||
it('label size', () => {
|
||||
vm = createVue({
|
||||
template: `
|
||||
<div>
|
||||
<el-form :model="form" size="mini" ref="labelMini">
|
||||
<el-form-item>
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
name: ''
|
||||
}
|
||||
};
|
||||
}
|
||||
}, true);
|
||||
expect(vm.$refs.labelMini.$el.children[0].classList.contains('el-form-item--mini')).to.be.true;
|
||||
});
|
||||
it('show message', done => {
|
||||
vm = createVue({
|
||||
template: `
|
||||
|
|
Loading…
Reference in New Issue