吉光研途前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
2.4 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view :style="style" @click="onClick">
  3. <view class="module">
  4. <image class="module-bg" :src="configList.page_serve_module_bg" mode="widthFix"></image>
  5. <image class="module-bg absolute" :src="configList.page_serve_module_bg_0" mode="widthFix"></image>
  6. <image class="module-bg absolute" :src="configList.page_serve_module_bg_1" mode="widthFix"></image>
  7. <image class="module-bg absolute" :src="configList.page_serve_module_bg_2" mode="widthFix"></image>
  8. <view class="flex module-fg">
  9. <view class="flex module-info">
  10. <view class="title">{{ data.title }}</view>
  11. <image class="icon" src="@/static/image/serve-icon.png" mode="widthFix"></image>
  12. </view>
  13. <button class="flex btn">
  14. <view>更多</view>
  15. <uv-icon name="arrow-down-fill" color="#808080" size="10rpx"></uv-icon>
  16. </button>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. props: {
  24. value: {
  25. type: Boolean,
  26. default: true
  27. },
  28. data: {
  29. type: Object,
  30. default() {
  31. return {}
  32. }
  33. },
  34. style: {
  35. type: String,
  36. default: ''
  37. },
  38. },
  39. computed: {
  40. isFold: {
  41. set(val) {
  42. this.$emit('input', val)
  43. },
  44. get() {
  45. return this.value
  46. }
  47. }
  48. },
  49. methods: {
  50. onClick() {
  51. const isFold = !this.isFold
  52. this.isFold = isFold
  53. this.$emit('change', isFold)
  54. },
  55. },
  56. }
  57. </script>
  58. <style scoped lang="scss">
  59. .module {
  60. font-size: 0;
  61. width: 100%;
  62. height: auto;
  63. position: relative;
  64. &-bg {
  65. width: 100%;
  66. height: auto;
  67. }
  68. &-fg {
  69. position: absolute;
  70. top: 0;
  71. left: 0;
  72. justify-content: space-between;
  73. width: 100%;
  74. padding: 30rpx 30rpx 0 22rpx;
  75. box-sizing: border-box;
  76. }
  77. &-info {
  78. column-gap: 16rpx;
  79. .title {
  80. font-size: 32rpx;
  81. font-weight: 700;
  82. line-height: 1;
  83. font-family: PingFang SC;
  84. color: transparent;
  85. background-image: linear-gradient(to right, #6851A7, #AA87F0);
  86. background-clip: text;
  87. display: inline-block;
  88. }
  89. .icon {
  90. width: 30rpx;
  91. height: auto;
  92. }
  93. }
  94. .btn {
  95. column-gap: 10rpx;
  96. font-size: 22rpx;
  97. color: #808080;
  98. }
  99. }
  100. .absolute {
  101. position: absolute;
  102. top: 0;
  103. left: 0;
  104. }
  105. </style>