|
|
|
@ -1,18 +1,18 @@
@@ -1,18 +1,18 @@
|
|
|
|
|
<template> |
|
|
|
|
<Teleport to="body"> |
|
|
|
|
<transition name="zoom-fade" mode="out-in"> |
|
|
|
|
<div :class="getClass" @click.stop v-if="visible"> |
|
|
|
|
<div :class="`${prefixCls}-content`" v-click-outside="handleClose"> |
|
|
|
|
<div v-if="visible" :class="getClass" @click.stop> |
|
|
|
|
<div v-click-outside="handleClose" :class="`${prefixCls}-content`"> |
|
|
|
|
<div :class="`${prefixCls}-input__wrapper`"> |
|
|
|
|
<a-input |
|
|
|
|
ref="inputRef" |
|
|
|
|
:class="`${prefixCls}-input`" |
|
|
|
|
:placeholder="t('common.searchText')" |
|
|
|
|
ref="inputRef" |
|
|
|
|
allow-clear |
|
|
|
|
@change="handleSearch" |
|
|
|
|
> |
|
|
|
|
<template #prefix> |
|
|
|
|
<SearchOutlined /> |
|
|
|
|
<SearchOutlined/> |
|
|
|
|
</template> |
|
|
|
|
</a-input> |
|
|
|
|
<span :class="`${prefixCls}-cancel`" @click="handleClose"> |
|
|
|
@ -20,37 +20,37 @@
@@ -20,37 +20,37 @@
|
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div :class="`${prefixCls}-not-data`" v-show="getIsNotData"> |
|
|
|
|
<div v-show="getIsNotData" :class="`${prefixCls}-not-data`"> |
|
|
|
|
{{ t('component.app.searchNotData') }} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<ul :class="`${prefixCls}-list`" v-show="!getIsNotData" ref="scrollWrap"> |
|
|
|
|
<ul v-show="!getIsNotData" ref="scrollWrap" :class="`${prefixCls}-list`"> |
|
|
|
|
<li |
|
|
|
|
:ref="setRefs(index)" |
|
|
|
|
v-for="(item, index) in searchResult" |
|
|
|
|
:ref="setRefs(index)" |
|
|
|
|
:key="item.path" |
|
|
|
|
:data-index="index" |
|
|
|
|
@mouseenter="handleMouseenter" |
|
|
|
|
@click="handleEnter" |
|
|
|
|
:class="[ |
|
|
|
|
`${prefixCls}-list__item`, |
|
|
|
|
{ |
|
|
|
|
[`${prefixCls}-list__item--active`]: activeIndex === index, |
|
|
|
|
}, |
|
|
|
|
]" |
|
|
|
|
@mouseenter="handleMouseenter" |
|
|
|
|
@click="handleEnter" |
|
|
|
|
> |
|
|
|
|
<div :class="`${prefixCls}-list__item-icon`"> |
|
|
|
|
<Icon :icon="item.icon || 'mdi:form-select'" :size="20" /> |
|
|
|
|
<Icon :icon="item.icon || 'mdi:form-select'" :size="20"/> |
|
|
|
|
</div> |
|
|
|
|
<div :class="`${prefixCls}-list__item-text`"> |
|
|
|
|
{{ item.name }} |
|
|
|
|
</div> |
|
|
|
|
<div :class="`${prefixCls}-list__item-enter`"> |
|
|
|
|
<Icon icon="ant-design:enter-outlined" :size="20" /> |
|
|
|
|
<Icon icon="ant-design:enter-outlined" :size="20"/> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<AppSearchFooter /> |
|
|
|
|
<AppSearchFooter/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</transition> |
|
|
|
|