wr1207
2023-04-17 32e4bad2cff2793052effcd2d59cdd8923702b22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<template>
    <div>
        <el-button-group>
            <el-tooltip class="item" effect="dark" :content="hsz ? '正常数据' : '回收站'" placement="top">
                <el-button v-if="hsz_status" :icon="!hsz ? 'el-icon-delete' : 'el-icon-s-grid'" @click="toggleHszList" size="small"></el-button>
            </el-tooltip>
            <el-tooltip class="item" effect="dark" :content="expand ? '菜单收起' : '菜单展开'" placement="top">
                <el-button v-if="expand_status" :icon="expand ? 'el-icon-top' : 'el-icon-bottom'" size="small" @click="toggleRowExpansion"></el-button>
            </el-tooltip>
            <el-tooltip class="item" effect="dark" :content="search_visible ? '搜索框收起' : '搜索框展开'" placement="top">
                <el-button class="hidden-sm-and-down"  icon="el-icon-search" size="small" @click="searchshow"></el-button>
            </el-tooltip>
            <el-button class="hidden-sm-and-down"  icon="el-icon-refresh" size="small" @click="refesh_list"></el-button>
        </el-button-group>
    </div>
</template>
 
<script>
export default {
    name:'TableTool',
    props: {
        expand_status:{
            type:Boolean,
            default:false,
        },
        expand:{
            type:Boolean,
            default:false,
        },
        hsz_status:{
            type:Boolean,
            default:false,
        },
        hsz:{
            type:Boolean,
            default:false,
        },
        search_visible:{
            type:Boolean,
            default:false
        }
    },
    methods: {
        searchshow() {
            this.$emit('update:search_visible', !this.search_visible)
        },
        toggleHszList(){
            this.$emit('update:hsz', !this.hsz)
            this.$emit('toggle_list')
        },
        refesh_list() {
            this.$emit('refesh_list')
        },
        toggleRowExpansion(){
            this.$emit('toggle')
        }
    },
}
</script>
 
<style lang="scss" scoped>
 
</style>