From 5f798de86bb68c8c1fa6eba9c632d7e3e9dfdd36 Mon Sep 17 00:00:00 2001
From: chenxi-20 <76168465+chenxi-20@users.noreply.github.com>
Date: Tue, 5 Mar 2024 17:43:16 +0800
Subject: [PATCH] feat(search): [search] Increase input maximum character limit
attribute maxlength (#1457)
---
examples/sites/demos/apis/search.js | 11 +++++++++++
.../pc/app/search/basic-usage-composition-api.vue | 2 +-
.../sites/demos/pc/app/search/basic-usage.vue | 2 +-
.../sites/demos/pc/app/search/webdoc/search.js | 5 +++--
packages/vue/src/search/src/pc.vue | 15 +++++++++++++++
5 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/examples/sites/demos/apis/search.js b/examples/sites/demos/apis/search.js
index ba9b0b869..01c809936 100644
--- a/examples/sites/demos/apis/search.js
+++ b/examples/sites/demos/apis/search.js
@@ -74,6 +74,17 @@ export default {
pcDemo: 'events',
mfDemo: ''
},
+ {
+ name: 'maxlength',
+ type: 'number',
+ defaultValue: '',
+ desc: {
+ 'zh-CN': 'input 框的原生属性,限制最大输入字符数【3.14.0新增】',
+ 'en-US': 'The native properties of the input box limit the maximum number of input characters[New 3.14.0]'
+ },
+ mode: ['pc'],
+ pcDemo: 'basic-usage'
+ },
{
name: 'mini',
type: 'boolean',
diff --git a/examples/sites/demos/pc/app/search/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/search/basic-usage-composition-api.vue
index 05f419804..21848577a 100644
--- a/examples/sites/demos/pc/app/search/basic-usage-composition-api.vue
+++ b/examples/sites/demos/pc/app/search/basic-usage-composition-api.vue
@@ -1,6 +1,6 @@
diff --git a/examples/sites/demos/pc/app/search/basic-usage.vue b/examples/sites/demos/pc/app/search/basic-usage.vue
index bcda97e22..84cd37c79 100644
--- a/examples/sites/demos/pc/app/search/basic-usage.vue
+++ b/examples/sites/demos/pc/app/search/basic-usage.vue
@@ -1,6 +1,6 @@
diff --git a/examples/sites/demos/pc/app/search/webdoc/search.js b/examples/sites/demos/pc/app/search/webdoc/search.js
index 961d860d0..b1d6b66d2 100644
--- a/examples/sites/demos/pc/app/search/webdoc/search.js
+++ b/examples/sites/demos/pc/app/search/webdoc/search.js
@@ -9,9 +9,10 @@ export default {
'en-US': 'Basic Usage'
},
desc: {
- 'zh-CN': '通过 v-model
设置双向绑定搜索值, placeholder
设置默认占位符文本。',
+ 'zh-CN':
+ '通过 v-model
设置双向绑定搜索值, placeholder
设置默认占位符文本, input
元素的原生属性maxlength
设置输入框最大输入字符长度。',
'en-US':
- 'Set bidirectional binding search values through v-model
, and set default placeholder text through placeholder
.'
+ 'Set bidirectional binding search values through v-model
, and set default placeholder text through placeholder
The native attribute of the input
elementmaxlength
sets the maximum input character length of the input box.'
},
codeFiles: ['basic-usage.vue']
},
diff --git a/packages/vue/src/search/src/pc.vue b/packages/vue/src/search/src/pc.vue
index b8fef18da..bfc5d5cc5 100644
--- a/packages/vue/src/search/src/pc.vue
+++ b/packages/vue/src/search/src/pc.vue
@@ -36,6 +36,21 @@