From 02c01b59441307fa4bb7b2c8e18de24388647b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Fri, 6 May 2022 14:44:16 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8:=20=E6=96=B0=E5=A2=9E=20input=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=20autocomplete=20=E5=8E=9F=E7=94=9F=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/src/component/input/index.vue | 5 ++++- .../src/document/zh-CN/components/input.md | 16 +++++++++------- .../src/document/zh-CN/guide/changelog.md | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/package/component/src/component/input/index.vue b/package/component/src/component/input/index.vue index 58d46c87..4ce51c2d 100644 --- a/package/component/src/component/input/index.vue +++ b/package/component/src/component/input/index.vue @@ -23,13 +23,15 @@ export interface LayInputProps { placeholder?: string; allowClear?: boolean; autofocus?: boolean; + autocomplete?: boolean; } const props = withDefaults(defineProps(), { disabled: false, readonly: false, allowClear: false, - autofocus: false + autofocus: false, + autocomplete: false }); const emit = defineEmits([ @@ -75,6 +77,7 @@ const onBlur = () => { :disabled="disabled" :placeholder="placeholder" :autofocus="autofocus" + :autocomplete="autocomplete" :class="{ 'layui-disabled': disabled }" class="layui-input" @input="onInput" diff --git a/package/document/src/document/zh-CN/components/input.md b/package/document/src/document/zh-CN/components/input.md index 427184b9..00e85cda 100644 --- a/package/document/src/document/zh-CN/components/input.md +++ b/package/document/src/document/zh-CN/components/input.md @@ -170,16 +170,18 @@ export default { ::: table -| 属性 | 描述 | 可选值 | -| ----------- | ------------- | -------------- | -| name | 原始属性 name | -- | -| placeholder | 提示信息 | -- | -| disabled | 禁用 | `true` `false` | -| v-model | 值 | -- | +| 属性 | 描述 | 可选值 | +| ----------- | -------------------- | -------------- | +| name | 原始属性 name | -- | +| placeholder | 提示信息 | -- | +| disabled | 禁用 | `true` `false` | +| v-model | 值 | -- | +| autofocus | 原生属性 autofocus | `true` `false` | +| autocomplete | 原生属性 autocomplete | `true` `false` | ::: -::: title Input 属性 +::: title Input 事件 ::: ::: table diff --git a/package/document/src/document/zh-CN/guide/changelog.md b/package/document/src/document/zh-CN/guide/changelog.md index df744226..67d13e09 100644 --- a/package/document/src/document/zh-CN/guide/changelog.md +++ b/package/document/src/document/zh-CN/guide/changelog.md @@ -20,6 +20,7 @@
  • [新增] menu 组件 changeSelectedKey 事件。
  • [新增] menu 组件 childSpacing 属性, 开启菜单层级缩进。
  • [新增] slider 组件 showDots 属性, 显示步长断点。
  • +
  • [新增] input 组件 autocomplete 原生属性。
  • [新增] input 组件 autofocus 原生属性。
  • [修复] side 组件 width 属性无效。