feat: 搜索框内添加检索总条数

This commit is contained in:
ZiuChen 2022-08-25 21:46:40 +08:00
parent eafcb6b93f
commit 8a04564920
2 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,10 @@
<template>
<div class="clip-search">
<input v-model="filterText" type="text" placeholder="🔍 检索剪贴板历史" />
<input
v-model="filterText"
type="text"
:placeholder="itemCount ? `🔍 在${itemCount}条历史中检索...` : '🔍 检索剪贴板历史...'"
/>
<span v-show="filterText" @click="clear" class="clip-search-suffix"></span>
</div>
</template>
@ -11,6 +15,9 @@ const props = defineProps({
modelValue: {
type: String,
required: true
},
itemCount: {
type: Number
}
})
const filterText = ref('')

View File

@ -8,7 +8,7 @@
></ClipFullData>
<ClipSwitch ref="ClipSwitchRef" @onNavClick="handleNavClick">
<template #SidePanel>
<ClipSearch v-model="filterText"></ClipSearch>
<ClipSearch v-model="filterText" :itemCount="showList.length"></ClipSearch>
</template>
</ClipSwitch>
<div class="clip-break"></div>