提交 | 用户 | age
|
2a61f6
|
1 |
<!-- @author Shiyn/ huangmx 20200807优化--> |
L |
2 |
<template> |
|
3 |
<div class="top-right-btn"> |
|
4 |
<el-row> |
|
5 |
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> |
|
6 |
<el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()" /> |
|
7 |
</el-tooltip> |
|
8 |
<el-tooltip class="item" effect="dark" content="刷新" placement="top"> |
|
9 |
<el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" /> |
|
10 |
</el-tooltip> |
|
11 |
</el-row> |
|
12 |
</div> |
|
13 |
</template> |
|
14 |
<script> |
|
15 |
export default { |
|
16 |
name: 'RightToolbar', |
|
17 |
props: { |
|
18 |
showSearch: { |
|
19 |
type: Boolean, |
|
20 |
default: true |
|
21 |
} |
|
22 |
}, |
|
23 |
data() { |
|
24 |
return {} |
|
25 |
}, |
|
26 |
|
|
27 |
methods: { |
|
28 |
// 搜索 |
|
29 |
toggleSearch() { |
|
30 |
this.$emit('update:showSearch', !this.showSearch) |
|
31 |
}, |
|
32 |
// 刷新 |
|
33 |
refresh() { |
|
34 |
this.$emit('queryTable') |
|
35 |
} |
|
36 |
} |
|
37 |
} |
|
38 |
</script> |