<template>
  <van-sticky class="sticky" v-if="!appFlag">
    <div class="header">
      <div class="back">
        <backIcon/>
      </div>
      {{ title }}
      <div class="right"><slot></slot></div>
    </div>
  </van-sticky>
</template>
<script>
export default {
  props: {
    title: {
      default: ''
    }
  }
}
</script>
<style lang="less" scoped>
.sticky {
  background-color: var(--bg-);
}
.header {
  position: relative;
  font-size: 18px;
  font-weight: 600;
  height: 50px;
  background-color: var(--bg-);
  padding: 0 40px 2px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  .back {
    position: absolute;
    top: 11px;
    left: 9px;
  }
  .right {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}
</style>