Blame view

src/components/backBox.vue 1.08 KB
d4283687   梁保满   首页布局完成,页面顶部返回组件
1
2
3
  <template>
    <div class="back">
      <div class="back-l" @click="back">
65f592b6   梁保满   答题卡列表页
4
        <i class="fa fa-mail-reply-all"></i>
d4283687   梁保满   首页布局完成,页面顶部返回组件
5
6
7
8
9
10
11
12
13
        <slot name="title"></slot>
      </div>
      <div class="back-r">
        <slot name="btns"></slot>
      </div>
    </div>
  </template>
  
  <script>
813d4d64   梁保满   批量设置答案添加输入
14
  import BusEvent from "@/utils/busEvent";
d4283687   梁保满   首页布局完成,页面顶部返回组件
15
16
  export default {
    name: "back",
813d4d64   梁保满   批量设置答案添加输入
17
18
19
20
21
22
23
24
    props:{
      params:{
        type:Object,
        default:function(){
          return {}
        }
      }
    },
d4283687   梁保满   首页布局完成,页面顶部返回组件
25
26
    methods: {
      back() {
813d4d64   梁保满   批量设置答案添加输入
27
        BusEvent.$emit("querySel", this.params);
d4283687   梁保满   首页布局完成,页面顶部返回组件
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
        this.$router.go(-1);
      },
    },
  };
  </script>
  
  <style lang="scss" scoped>
  .back {
    width: 100%;
    height: 56px;
    border-bottom: 1px solid #e2e2e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    .back-l {
      display: flex;
      align-items: center;
      cursor: pointer;
      flex-shrink: 0;
      font-size: 18px;
      font-weight: 500;
    }
    .back-r {
      flex: 1;
      display: flex;
      justify-content: flex-end;
    }
    .fa-mail-reply-all {
      font-size: 28px;
      color: #b3b3b3;
      margin-right: 12px;
    }
  }
  </style>