<template>
  <view class="top-div">
    <slot name="left">
      <view></view>
    </slot>
    <slot name="right">
      <tn-button width="80px" height="32px" :plain="true" text-color="#0099ff" @click="handleBack">
        <uni-icons type="arrow-left" size="18" color="#0099ff" style="margin-right: 5px;"></uni-icons>返回
      </tn-button>
    </slot>
  </view>
</template>

<script setup>
const emit = defineEmits(["back"]);

const handleBack = () => {
  emit("back");
};
</script>

<style scoped>
.top-div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  padding: 6vh 20px 10px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-sizing: border-box;
}
</style>
