From 05094d9e2febf51db4676f9ec30adb73e0e5b592 Mon Sep 17 00:00:00 2001 From: Marvin Gui <63292605+yi-boide@users.noreply.github.com> Date: Mon, 9 Oct 2023 04:41:20 -0500 Subject: [PATCH] =?UTF-8?q?feat(searchbar):=20=E5=A2=9E=E5=8A=A0=20cursor-?= =?UTF-8?q?spacing=20=E5=B1=9E=E6=80=A7(#2458)=20(#2587)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/__VUE/searchbar/doc.taro.md | 1 + src/packages/__VUE/searchbar/index.taro.vue | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/packages/__VUE/searchbar/doc.taro.md b/src/packages/__VUE/searchbar/doc.taro.md index 6067e88451..09d44d9856 100644 --- a/src/packages/__VUE/searchbar/doc.taro.md +++ b/src/packages/__VUE/searchbar/doc.taro.md @@ -266,6 +266,7 @@ app.use(Searchbar); | readonly | 输入框只读 | boolean | `false` | | input-align | 对齐方式,可选 `left` `center` `right` | string | `left` | | safe-area-inset-bottom`v4.1.6` | 是否开启 iphone 系列全面屏底部安全区适配 | boolean | `false` | +| cursor-spacing`v4.1.7` | 指定光标与键盘的距离,取 input 距离底部的距离和 cursor-spacing 指定的距离的最小值作为光标与键盘的距离 | number | 0 | ### Events diff --git a/src/packages/__VUE/searchbar/index.taro.vue b/src/packages/__VUE/searchbar/index.taro.vue index 2cdf858a9c..e4b94aea83 100644 --- a/src/packages/__VUE/searchbar/index.taro.vue +++ b/src/packages/__VUE/searchbar/index.taro.vue @@ -20,6 +20,7 @@ :disabled="disabled" :readonly="readonly" :style="styleSearchbar" + :cursor-spacing="cursorSpacing" @click="clickInput" @input="valueChange" @focus="valueFocus" @@ -124,6 +125,10 @@ export default create({ safeAreaInsetBottom: { type: Boolean, default: false + }, + cursorSpacing: { + type: Number, + default: 0 } },