diff --git a/src/renderer/components/ft-input/ft-input.js b/src/renderer/components/ft-input/ft-input.js index fb0cb9cd7ed02..dc81c17746ca7 100644 --- a/src/renderer/components/ft-input/ft-input.js +++ b/src/renderer/components/ft-input/ft-input.js @@ -61,6 +61,10 @@ export default defineComponent({ tooltip: { type: String, default: '' + }, + maxLength: { + type: Number, + default: null } }, data: function () { diff --git a/src/renderer/components/ft-input/ft-input.vue b/src/renderer/components/ft-input/ft-input.vue index c9a7c8523a14f..af6de38f2ce5c 100644 --- a/src/renderer/components/ft-input/ft-input.vue +++ b/src/renderer/components/ft-input/ft-input.vue @@ -50,6 +50,7 @@ :disabled="disabled" :spellcheck="spellcheck" :aria-label="!showLabel ? placeholder : null" + :maxLength="maxLength" @input="e => handleInput(e.target.value)" @focus="handleFocus" @blur="handleInputBlur" diff --git a/src/renderer/components/top-nav/top-nav.vue b/src/renderer/components/top-nav/top-nav.vue index 03cd544ce1ac6..796f9499eecfd 100644 --- a/src/renderer/components/top-nav/top-nav.vue +++ b/src/renderer/components/top-nav/top-nav.vue @@ -87,6 +87,7 @@ :data-list="searchSuggestionsDataList" :spellcheck="false" :show-clear-text-button="true" + :max-length="100" @input="getSearchSuggestionsDebounce" @click="goToSearch" />