From b0f5719d9819d5adcc6ac6f80e7cd85cac79dc9d Mon Sep 17 00:00:00 2001 From: baojie Date: Fri, 17 Jul 2020 15:57:15 +0800 Subject: [PATCH 1/5] fix: #2516 --- components/input/__tests__/index.test.js | 13 --- components/input/inputProps.js | 1 - examples/App.vue | 104 +++++++---------------- 3 files changed, 30 insertions(+), 88 deletions(-) diff --git a/components/input/__tests__/index.test.js b/components/input/__tests__/index.test.js index 3ca8f6d82a..02de583e3f 100644 --- a/components/input/__tests__/index.test.js +++ b/components/input/__tests__/index.test.js @@ -11,12 +11,6 @@ describe('Input', () => { focusTest(TextArea); focusTest(Password); - it('should support maxLength', async () => { - const wrapper = mount(Input, { attrs: { maxLength: 3 }, sync: false }); - await asyncExpect(() => { - expect(wrapper.html()).toMatchSnapshot(); - }, 0); - }); it('select()', () => { const wrapper = mount(Input); wrapper.vm.select(); @@ -62,13 +56,6 @@ describe('TextArea', () => { expect(wrapper.html()).toMatchSnapshot(); }); }); - - it('should support maxLength', async () => { - const wrapper = mount(TextArea, { attrs: { maxLength: 10 }, sync: false }); - await asyncExpect(() => { - expect(wrapper.html()).toMatchSnapshot(); - }); - }); }); describe('As Form Control', () => { diff --git a/components/input/inputProps.js b/components/input/inputProps.js index 0158a09ed6..5c52b6799d 100644 --- a/components/input/inputProps.js +++ b/components/input/inputProps.js @@ -30,7 +30,6 @@ export default { default: true, type: Boolean, }, - maxLength: PropTypes.number, loading: PropTypes.bool, className: PropTypes.string, }; diff --git a/examples/App.vue b/examples/App.vue index 535d215986..928a5b1121 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -1,51 +1,5 @@