Skip to content

Commit 714dd66

Browse files
committed
Search 组件:1)修改 search 按钮的样式;2)增加 search 按钮后的 actionMore slot;3)修改 Form 向下减少 15px 间距,更紧凑
1 parent d73b843 commit 714dd66

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/components/Search/src/Search.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ const setVisible = () => {
9898
</script>
9999

100100
<template>
101+
<!-- update by 芋艿:class="-mb-15px" 用于降低和 ContentWrap 组件的底部距离,避免空隙过大 -->
101102
<Form
102103
:is-custom="false"
103104
:label-width="labelWidth"
@@ -106,21 +107,26 @@ const setVisible = () => {
106107
:is-col="isCol"
107108
:schema="newSchema"
108109
@register="register"
110+
class="-mb-15px"
109111
>
110112
<template #action>
111113
<div v-if="layout === 'inline'">
112-
<ElButton v-if="showSearch" type="primary" @click="search">
114+
<!-- update by 芋艿:去除搜索的 type="primary",颜色变淡一点 -->
115+
<ElButton v-if="showSearch" @click="search">
113116
<Icon icon="ep:search" class="mr-5px" />
114117
{{ t('common.query') }}
115118
</ElButton>
119+
<!-- update by 芋艿:将 icon="ep:refresh-right" 修改成 icon="ep:refresh",和 ruoyi-vue 搜索保持一致 -->
116120
<ElButton v-if="showReset" @click="reset">
117-
<Icon icon="ep:refresh-right" class="mr-5px" />
121+
<Icon icon="ep:refresh" class="mr-5px" />
118122
{{ t('common.reset') }}
119123
</ElButton>
120124
<ElButton v-if="expand" text @click="setVisible">
121125
{{ t(visible ? 'common.shrink' : 'common.expand') }}
122126
<Icon :icon="visible ? 'ep:arrow-up' : 'ep:arrow-down'" />
123127
</ElButton>
128+
<!-- add by 芋艿:补充在搜索后的按钮 -->
129+
<slot name="actionMore"></slot>
124130
</div>
125131
</template>
126132
<template #[name] v-for="name in Object.keys($slots)" :key="name"
@@ -142,6 +148,8 @@ const setVisible = () => {
142148
{{ t(visible ? 'common.shrink' : 'common.expand') }}
143149
<Icon :icon="visible ? 'ep:arrow-up' : 'ep:arrow-down'" />
144150
</ElButton>
151+
<!-- add by 芋艿:补充在搜索后的按钮 -->
152+
<slot name="actionMore"></slot>
145153
</div>
146154
</template>
147155
</template>

0 commit comments

Comments
 (0)