college-detail-brochureCell.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <uv-cell :title="item.title" :label="item.createTime" class="bg-white" is-link @click="goBrochure(null, item)"/>
  3. </template>
  4. <script setup>
  5. import {createPropDefine} from "@/utils";
  6. import {useDownload} from "@/hooks/useDownload";
  7. import {useTransfer} from "@/hooks/useTransfer";
  8. const props = defineProps({
  9. item: createPropDefine({}, Object),
  10. detail: createPropDefine({}, Object)
  11. })
  12. const {downloadFile} = useDownload()
  13. const {transferTo} = useTransfer()
  14. const goBrochure = (type, brochure = null) => {
  15. brochure = brochure || props.detail.enrollBrochures.find(b => b.type == type)
  16. if (!brochure) return
  17. if (brochure.url) return downloadFile(brochure.url)
  18. brochure['logo'] = props.detail.baseInfo.logo
  19. transferTo('/pages/college-library/introduction/introduction', brochure, null, true)
  20. }
  21. </script>
  22. <style scoped lang="scss">
  23. ::v-deep(.uv-cell) {
  24. .uv-cell__title-text {
  25. font-size: 13px;
  26. line-height: 18px;
  27. }
  28. .uv-cell__label {
  29. margin-top: 2px;
  30. }
  31. .uv-cell-group__title {
  32. padding: 15px 12px 8px;
  33. }
  34. }
  35. </style>