“dzb”
2022-09-22 65cf29e0e28e60e8264cd66826aa23d3ae986f37
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<template>
    <div class="userList">
        <!-- <header>
            <div class="headerContent">
                <div class="search">
                    <span>筛选条件:</span>
                    <el-input placeholder="请输入内容" v-model="search"></el-input>
                    <div class="findBtn">
                        <el-button type="primary" @click="getUserList">查询</el-button>
                    </div>
                </div>
                <div class="addUser">
                    <el-button class="addBtn" type="primary" @click="dialogCreate = true">添加用户</el-button>
                    <el-dialog :visible.sync="dialogCreate" title="新增账户" width="45%" v-if="dialogCreate"
                        :before-close="handleClose1">
                        <createUser :refresh="getUserList" />
                    </el-dialog>
                </div>
            </div>
        </header> -->
        <myHeader @setDialog="changeDialog" @getSearch="getSearch"></myHeader>
        <myMain :refresh="isFresh" :keyword="keyword" @resetFresh="resetFresh" />
    </div>
</template>
<script>
import myHeader from "./components/header"
import myMain from "./components/main"
export default {
    components: {
        myHeader,
        myMain
    },
    data() {
        return {
            isFresh: false,
            keyword: '',
        }
    },
    methods: {
        // 获取搜索返回结果
        getSearch({ text }) {
            this.keyword = text;
            this.isFresh = true;
        },
        // 获取刷新结果
        changeDialog({ flag }) {
            console.log(flag);
            this.isFresh = flag;
        },
        // 重置isFresh
        resetFresh({ flag }) {
            this.isFresh = flag;
            console.log(this.isFresh);
        }
    }
}
</script>
<style lang="scss" scoped>
.userList {
    text-align: left;
    margin: 10px 20px;
    color: #4b9bb7;
 
    &::v-deep .el-dialog__header,
    &::v-deep .el-dialog__body {
        background-color: #06122c;
    }
 
    &::v-deep .el-dialog__header {
        display: flex;
        align-items: center;
        background-color: #fff;
        padding: 20px;
        line-height: 60px;
    }
 
    &::v-deep .el-dialog__title {
        color: #4b9bb7;
    }
 
    &::v-deep .el-dialog__close {
        width: 20px;
        height: 20px;
        // color: #fff;
    }
 
    &::v-deep .el-dialog__body {
        padding: 0;
    }
}
</style>