feat(Field): highlight word num when reaching maxlength

This commit is contained in:
陈嘉涵
2020-02-05 15:58:51 +08:00
parent eb7abea49c
commit 61093ef00f
5 changed files with 32 additions and 1 deletions
+11
View File
@@ -280,3 +280,14 @@ test('formatter prop', () => {
input.trigger('input');
expect(wrapper.emitted('input')[1][0]).toEqual('efg');
});
test('reach max word-limit', () => {
const wrapper = mount(Field, {
propsData: {
value: 'foo',
maxlength: 3,
showWordLimit: true,
},
});
expect(wrapper).toMatchSnapshot();
});