service.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <div style="color: #4c4c4e; height: calc(100vh - 151px);">
  3. <div class="pt-5">
  4. <v-btn size="large" color="primary" variant="text" prepend-icon="mdi-chevron-triple-left" @click="router.go(-1)">返回上一页</v-btn>
  5. </div>
  6. <h1 class="my-5">{{ data.title }}</h1>
  7. <p class="font-weight-bold">{{ data.startDesc }}</p>
  8. <p v-if="data.startTitle" class="font-weight-bold mt-1">{{ data.startTitle }}</p>
  9. <ul v-if="data?.children && data?.children.length">
  10. <li v-for="(val, index) in data.children" :key="index">{{ val }}</li>
  11. </ul>
  12. <p v-if="data?.endDesc" :class="{'mt-5': type !== 'service'}">{{ data.endDesc }}</p>
  13. </div>
  14. </template>
  15. <script setup>
  16. defineOptions({ name: 'headhunting-drill-service' })
  17. import { ref } from 'vue'
  18. import { serviceData } from '@/utils/headhuntingData'
  19. import { useRouter } from 'vue-router'
  20. const router = useRouter()
  21. const props = defineProps({
  22. id: {
  23. type: String,
  24. default: ''
  25. },
  26. type: {
  27. type: String,
  28. default: ''
  29. }
  30. })
  31. const data = ref(serviceData.find(e => e.id === props.id))
  32. </script>
  33. <style scoped lang="scss">
  34. ul {
  35. list-style: none;
  36. margin-left: 20px;
  37. margin-top: 10px;
  38. li {
  39. margin-bottom: 1.5rem;
  40. }
  41. }
  42. </style>