QrCode.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <div class="qr-code-container">
  3. <div v-if="type === '1'" class="qr-code-content">
  4. <div class="qr-code-title">
  5. 2. 添加企业微信:
  6. </div>
  7. <div class="qr-code">
  8. <img src="../../../assets/images/商务合作.png" alt="">
  9. </div>
  10. </div>
  11. <div v-if="type === '2'" class="qr-code-content">
  12. <div class="qr-code">
  13. <img src="../../../assets/images/商务合作.png" alt="">
  14. <div v-if="showText" class="qr-code-title qr-code-title-small">
  15. <span>添加企业微信</span>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. export default {
  23. name: 'QrCode',
  24. props: {
  25. type: String,
  26. default() {
  27. return '1'
  28. },
  29. showText: {
  30. type: Boolean,
  31. default() {
  32. return true
  33. }
  34. }
  35. },
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. .qr-code-container {
  40. display: flex;
  41. padding: 0 20px 0 32px;
  42. .qr-code-content {
  43. padding: 0 20px;
  44. }
  45. .qr-code-title {
  46. font-size: 16px;
  47. line-height: 24px;
  48. color: #1d1d1d;
  49. &-small {
  50. text-align: center;
  51. }
  52. }
  53. .qr-code {
  54. margin-top: 8px;
  55. padding-left: 14px;
  56. img {
  57. width: 122px;
  58. height: 122px;
  59. }
  60. }
  61. &::before {
  62. content: '';
  63. display: block;
  64. width: 1px;
  65. height: 148px;
  66. background: #ECECEC;
  67. }
  68. &::after {
  69. content: '';
  70. display: block;
  71. width: 1px;
  72. height: 148px;
  73. background: #ECECEC;
  74. }
  75. }
  76. </style>