CusNavigation.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div style="padding: 0px 0px 0px 0px; display: flex; align-items: center;">
  3. <!-- <div style="padding: 16px 0px 0px 24px;">
  4. <a-breadcrumb>
  5. <a-breadcrumb-item style="font-family: PingFangSC, PingFang SC;">首页</a-breadcrumb-item>
  6. <a-breadcrumb-item><a href="">Application Center</a></a-breadcrumb-item>
  7. <a-breadcrumb-item><a href="">Application List</a></a-breadcrumb-item>
  8. <a-breadcrumb-item>An Application</a-breadcrumb-item>
  9. </a-breadcrumb>
  10. </div> -->
  11. <div style="line-height: 0px;" v-if="gobackabled" class="cus-goback" @click="onGoback">
  12. <van-icon name="static/images/icon-back.png" size="1.7rem" />
  13. </div>
  14. <div style="font-family: PingFangSC, PingFang SC;
  15. font-weight: bold;
  16. font-size: 1.1rem;
  17. color: #191A1A;
  18. line-height: 30px;
  19. text-align: justify;
  20. font-style: normal;">
  21. <span>{{ title }}</span>
  22. </div>
  23. </div>
  24. </template>
  25. <script setup lang="ts">
  26. import { Router, useRouter } from 'vue-router'
  27. // 属性
  28. defineProps({
  29. title: {
  30. type: String,
  31. default: '未知'
  32. },
  33. gobackabled: {
  34. type: Boolean,
  35. default: false
  36. }
  37. })
  38. // 返回上一页
  39. const router:Router = useRouter();
  40. const onGoback = (event: any) => {
  41. console.log(event);
  42. router.go(-1)
  43. }
  44. </script>
  45. <style scoped>
  46. .cus-goback{
  47. margin-right: 3px;
  48. }
  49. .cus-goback:hover{
  50. cursor: pointer;
  51. }
  52. </style>