fix:select多选placeholder无效, 将多选和单选搜索样式统一

Signed-off-by: forget skyrim <11513667+forget-skyrim@user.noreply.gitee.com>
This commit is contained in:
forget skyrim 2022-12-07 03:12:43 +00:00 committed by Gitee
parent 5566ff9b09
commit 549375678e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 13 deletions

View File

@ -206,16 +206,22 @@ provide("searchMethod", props.searchMethod);
<lay-tag-input
v-if="multiple"
v-model="multipleValue"
v-model:input-value="searchValue"
:allow-clear="allowClear"
:placeholder="placeholder"
:collapseTagsTooltip="collapseTagsTooltip"
:minCollapsedNum="minCollapsedNum"
:disabledInput="true"
:disabled="disabled"
:disabledInput="!showSearch"
:size="size"
:class="{ 'layui-unselect': true }"
@remove="handleRemove"
@clear="handleClear"
@input-value-change="handleSearch"
@keyup.delete.capture.prevent.stop
@keyup.backspace.capture.prevent.stop
@keydown.enter.capture.prevent.stop
>
<template #suffix>
<lay-icon
@ -247,16 +253,6 @@ provide("searchMethod", props.searchMethod);
</lay-input>
<template #content>
<dl class="layui-select-content">
<div class="layui-select-search" v-if="multiple && showSearch">
<lay-input
size="sm"
prefix-icon="layui-icon-search"
:modelValue="searchValue"
:placeholder="searchPlaceholder"
@compositionstart="onCompositionstart"
@compositionend="onCompositionend"
@input="handleSearch"
></lay-input>
</div>
<template v-if="items">
<lay-select-option

View File

@ -300,12 +300,11 @@ defineExpose({
</template>
</LayToopTip>
</template>
<template v-if="!disabledInput">
<input
ref="inputRefEl"
class="layui-tag-input-inner-input"
:style="inputStyle"
:disabled="disabled"
:disabled="(disabled || disabledInput)"
:placeholder="placeholder"
:readonly="readonly"
@keydown.enter="handleEnter"
@ -317,7 +316,6 @@ defineExpose({
@compositionupdate="handleComposition"
@compositionend="handleComposition"
/>
</template>
</span>
<span
v-if="allowClear && tagData?.length && !disabled"