✨(input): 新增 input 组件 autofocus 原生属性
This commit is contained in:
parent
c794039150
commit
892e965452
@ -22,9 +22,15 @@ export interface LayInputProps {
|
|||||||
modelValue?: string;
|
modelValue?: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
allowClear?: boolean;
|
allowClear?: boolean;
|
||||||
|
autofocus?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<LayInputProps>(), {});
|
const props = withDefaults(defineProps<LayInputProps>(), {
|
||||||
|
disabled: false,
|
||||||
|
readonly: false,
|
||||||
|
allowClear: false,
|
||||||
|
autofocus: false
|
||||||
|
});
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
"update:modelValue",
|
"update:modelValue",
|
||||||
@ -68,6 +74,7 @@ const onBlur = () => {
|
|||||||
:value="modelValue || value"
|
:value="modelValue || value"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
|
:autofocus="autofocus"
|
||||||
:class="{ 'layui-disabled': disabled }"
|
:class="{ 'layui-disabled': disabled }"
|
||||||
class="layui-input"
|
class="layui-input"
|
||||||
@input="onInput"
|
@input="onInput"
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
<li>[新增] menu 组件 changeSelectedKey 事件。</li>
|
<li>[新增] menu 组件 changeSelectedKey 事件。</li>
|
||||||
<li>[新增] menu 组件 childSpacing 属性, 开启菜单层级缩进。</li>
|
<li>[新增] menu 组件 childSpacing 属性, 开启菜单层级缩进。</li>
|
||||||
<li>[新增] slider 组件 showDots 属性, 显示步长断点。</li>
|
<li>[新增] slider 组件 showDots 属性, 显示步长断点。</li>
|
||||||
|
<li>[新增] input 组件 autofocus 原生属性。</li>
|
||||||
<li>[修复] side 组件 width 属性无效。</li>
|
<li>[修复] side 组件 width 属性无效。</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user