PageHead.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <div class="PageHead">
  3. <div class="flex-box-ce">
  4. <span class="return" @click="routePush?$router.push(routePush):$router.go(-1)">返回</span>
  5. <span v-if="phName!=''">{{phName}}</span>
  6. <div v-else class="slot">
  7. <slot name="headMent"></slot>
  8. </div>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. name:'pageHead',
  15. props:{
  16. phName:{
  17. type:String,
  18. default:''
  19. },
  20. routePush:{
  21. type:String,
  22. default:null
  23. }
  24. },
  25. data() {
  26. return {};
  27. },
  28. watch: {},
  29. created() {},
  30. mounted() {},
  31. methods: {}
  32. };
  33. </script>
  34. <style scoped="scoped" lang="scss">
  35. .PageHead {
  36. height: 42px;
  37. font-size: 14px;
  38. span{
  39. height: 32px;
  40. line-height: 32px;
  41. }
  42. span:nth-child(1) {
  43. cursor: pointer;
  44. width: 42px;
  45. color: #8f8f8f;
  46. position: relative;
  47. }
  48. span:nth-child(1)::after{
  49. position: absolute;
  50. content: " ";
  51. height: 18px;
  52. width: 1px;
  53. background-color: #8f8f8f;
  54. right: 0px;
  55. top: 50%;
  56. margin-top: -9px;
  57. }
  58. span:nth-child(1):hover {
  59. color: #1299f9;
  60. }
  61. span:nth-child(2) {
  62. padding-left: 12px;
  63. color: #585858;
  64. }
  65. .slot{
  66. margin-left: 12px;
  67. }
  68. }
  69. </style>