# BsHeaderNav 顶部导航

顶部面板

# 没有标题,只有按钮

没有标题,只有按钮

没有标题,只有按钮

<template>
  <div class="header-nav-api__wrap">
    <BsHeaderNav
      :buttons-config="buttonsConfig"
    />
  </div>
</template>

<script>
  export default {
    data() {
      return {
        buttonsConfig: {
          buttons: [
            {
              code: 'btn-save',
              label: '保存',
              type: 'primary'
            },
            {
              code: 'btn-back',
              label: '返回'
            }
          ],
          btnClickEvent: this.btnClickEvent
        }
      }
    },
    methods: {
      btnClickEvent(item) {
        this.$message({
          showClose: true,
          message: item.label,
          type: 'success'
        })
      }
    }
  }
</script>
<style>
  .header-nav-api__wrap {
    width: 900px;
  }
</style>
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
Expand Copy

# 既有标题,又有按钮

既有标题,又有按钮

既有标题,又有按钮

<template>
  <div class="header-nav-api__wrap">
    <BsHeaderNav
      :buttons-config="buttonsConfig"
    />
  </div>
</template>

<script>
  export default {
    data() {
      return {
        buttonsConfig: {
          title: '支付信息录入',
          buttons: [
            {
              code: 'btn-save',
              label: '保存',
              type: 'primary'
            },
            {
              code: 'btn-back',
              label: '返回',
            }
          ],
          btnClickEvent: this.btnClickEvent
        }
      }
    },
    methods: {
      btnClickEvent(item) {
        this.$message({
          showClose: true,
          message: item.label,
          type: 'success'
        })
      }
    }
  }
</script>
<style>
  .header-nav-api__wrap {
    position: relative;
    width: 900px;
  }

  .header-nav .left-title {
    top: unset !important;
  }
</style>
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
Expand Copy