<template>
  <div>
    <div class="nav text-center bg-[#f2e8fc] text-pp-500">
      <div class="back" @click="mback" v-if="route.path != '/m/home'">
        <n-icon size="20">
          <back />
        </n-icon>
      </div>
      {{ route.meta.title }}
    </div>
    <router-view></router-view>
  </div>
</template>

<script setup>
//mark import
import back from '@/icon/back.svg';


//mark data
const route = useRoute()
const router = useRouter()
//mark method

//mark 周期、内置函数等
function mback() {
  router.go(-1);
}
</script>

<style scoped>
.nav {
  height: 42px;
  line-height: 42px;
  position: relative;
}

.back {
  height: 42px;
  line-height: 42px;
  display: flex;
  align-items: center;
  position: absolute;
  top: 0;
  left: 10px;
}
</style>