: 新增 input 组件 autocomplete 原生属性

This commit is contained in:
就眠儀式 2022-05-06 14:44:16 +08:00
parent 892e965452
commit 02c01b5944
3 changed files with 14 additions and 8 deletions

View File

@ -23,13 +23,15 @@ export interface LayInputProps {
placeholder?: string;
allowClear?: boolean;
autofocus?: boolean;
autocomplete?: boolean;
}
const props = withDefaults(defineProps<LayInputProps>(), {
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"

View File

@ -171,15 +171,17 @@ export default {
::: table
| 属性 | 描述 | 可选值 |
| ----------- | ------------- | -------------- |
| ----------- | -------------------- | -------------- |
| name | 原始属性 name | -- |
| placeholder | 提示信息 | -- |
| disabled | 禁用 | `true` `false` |
| v-model | 值 | -- |
| autofocus | 原生属性 autofocus | `true` `false` |
| autocomplete | 原生属性 autocomplete | `true` `false` |
:::
::: title Input 属性
::: title Input 事件
:::
::: table

View File

@ -20,6 +20,7 @@
<li>[新增] menu 组件 changeSelectedKey 事件。</li>
<li>[新增] menu 组件 childSpacing 属性, 开启菜单层级缩进。</li>
<li>[新增] slider 组件 showDots 属性, 显示步长断点。</li>
<li>[新增] input 组件 autocomplete 原生属性。</li>
<li>[新增] input 组件 autofocus 原生属性。</li>
<li>[修复] side 组件 width 属性无效。</li>
</ul>