书院官网
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Cluster.vue 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <div
  3. :class="['cluster', propsData.height ? 'height_200' : '']"
  4. :style="{ backgroundImage: 'url(' + formatImg(propsData.data.productUrl[0]) + ')' }"
  5. >
  6. <div class="cluster-title">{{ propsData.data.leadingIndustryName }}</div>
  7. <div
  8. class="cluster-content"
  9. v-html="SimpleMDE.prototype.markdown(propsData.data.leadingIndustryDetail)"
  10. ></div>
  11. </div>
  12. </template>
  13. <script setup>
  14. import SimpleMDE from "simplemde";
  15. import { formatImg } from "@/utils/common.js";
  16. const propsData = defineProps({
  17. data: {
  18. type: Object,
  19. },
  20. height: {
  21. type: Number,
  22. },
  23. });
  24. </script>
  25. <style lang="scss" scoped>
  26. .cluster {
  27. position: relative;
  28. border-radius: 10px;
  29. padding: 10px 20px;
  30. @include border-box;
  31. @include flex(column, flex-start, flex-start, nowrap);
  32. margin-bottom: 10px;
  33. // @include bg-image("https://img.js.design/assets/img/64abb2f1eec7205596b5791f.jpg");
  34. background-size: 100% 100%;
  35. background-repeat: no-repeat;
  36. &-title {
  37. @include font(14px, $color-white);
  38. font-weight: bold;
  39. margin-bottom: 10px;
  40. z-index: 100;
  41. }
  42. &-content {
  43. @include font(12px, $color-white);
  44. line-height: 20px;
  45. word-break: break-word;
  46. z-index: 100;
  47. }
  48. }
  49. .cluster:before {
  50. content: "";
  51. position: absolute;
  52. top: 0;
  53. left: 0;
  54. width: 100%;
  55. height: 100%;
  56. background-color: rgba(0, 0, 0, 0.5);
  57. border-radius: 10px;
  58. @include border-box;
  59. }
  60. .height_200 {
  61. height: 200px;
  62. .cluster-content {
  63. @include text-ellipsis-multiple(7);
  64. }
  65. }
  66. </style>