Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyh2001 committed Mar 19, 2024
2 parents 722ce16 + e72883e commit e3b6d42
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/json/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
},
{
"title": "Up Load 文件上传",
"rule": "up-loadUpLoad文件上传",
"rule": "up-loadUpLoad文件上传upload",
"url": "components/up-load"
},
{
Expand Down
15 changes: 12 additions & 3 deletions docs/.vitepress/theme/components/vp-search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
/** 按下回车触发搜索 */
const onSearch = (): void => {
if (!value.value) {
return
}
/**
* 过滤搜索结果
*
Expand Down Expand Up @@ -53,9 +56,14 @@
value.value = ''
}
const fontColor = computed(() =>
isDark.value ? 'var(--vp-c-text-dark-1)' : 'var(--vp-c-text-light-1)'
)
/**
* 失去焦点关闭弹窗
*/
const onBlur = () => {
setTimeout(() => {
isShow.value = false
}, 800)
}
</script>

<template>
Expand All @@ -66,6 +74,7 @@
autocomplete="off"
placeholder="搜索组件"
:on-enter="onSearch"
:on-blur="onBlur"
:class="{ dark: isDark }"
/>

Expand Down

0 comments on commit e3b6d42

Please sign in to comment.