From c8b438fb82a5bc6a8e0db1953903d159448bfaa7 Mon Sep 17 00:00:00 2001 From: sleep_fish Date: Tue, 5 Apr 2022 20:51:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(auto-complete):=20=E4=BF=AE=E5=A4=8Deslint?= =?UTF-8?q?=E5=92=8C=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#394)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__tests__/auto-complete.spec.ts | 60 ++++--- .../devui-vue/devui/auto-complete/index.ts | 6 +- .../auto-complete/src/auto-complete-types.ts | 158 ++++++++++-------- .../auto-complete/src/auto-complete.scss | 7 +- .../devui/auto-complete/src/auto-complete.tsx | 33 +++- .../auto-complete/src/components/dropdown.tsx | 16 +- .../src/composables/use-custom-template.ts | 13 +- .../src/composables/use-input-handle.ts | 24 ++- .../src/composables/use-keyboard-select.ts | 16 +- .../src/composables/use-lazy-handle.ts | 11 +- .../src/composables/use-searchfn.ts | 39 +++-- .../src/composables/use-select-handle.ts | 28 +++- .../components/PageContributorConfig.ts | 12 -- .../docs/components/auto-complete/index.md | 58 +++++-- .../en-US/components/auto-complete/api-en.md | 48 ++++-- packages/devui-vue/tsconfig.json | 2 +- 16 files changed, 337 insertions(+), 194 deletions(-) diff --git a/packages/devui-vue/devui/auto-complete/__tests__/auto-complete.spec.ts b/packages/devui-vue/devui/auto-complete/__tests__/auto-complete.spec.ts index 3df59b01c4..bfc33cdfa7 100644 --- a/packages/devui-vue/devui/auto-complete/__tests__/auto-complete.spec.ts +++ b/packages/devui-vue/devui/auto-complete/__tests__/auto-complete.spec.ts @@ -1,7 +1,6 @@ import { mount } from '@vue/test-utils'; import { nextTick, ref } from 'vue'; import DAutoComplete from '../src/auto-complete'; - // delay api const wait = (delay = 300) => new Promise(resolve => setTimeout(() => resolve(true), delay)); @@ -13,7 +12,7 @@ describe('auto-complete', () => { `, setup() { @@ -71,7 +70,7 @@ describe('auto-complete', () => { :source="source" v-model="value" :disabled="isDisabled" - /> + /> `, @@ -128,8 +127,8 @@ describe('auto-complete', () => { disabledKey="disabled" isSearching :formatter="formatter" - > -