<template>
  <view class="nav-bar">
    <view class="go-back">
      <u-icon name="arrow-left" :color="color" size="32" @click="goBack"></u-icon>
    </view>
    <view class="nav-title" :style="{color:color}">
      {{ title }}
    </view>
  </view>
</template>
<script>
export default {
  data() {
    return {
        goBack(){
            uni.navigateBack()
        }
    };
  },
  props: {
    title: "",
    color:''
  },
};
</script>
<style lang="scss" scoped>
.nav-bar {
  width: 100%;
  padding: 24rpx 32rpx 20rpx 32rpx;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 1);
  font-family: DM Sans;
  font-size: 30rpx;
  font-weight: 700;
  line-height: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  .go-back{
    position: absolute;
    top: 24rpx;
    left: 32rpx;
  }
}
</style>
