more.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="more" :style="{ height: value ? '430rpx' : '0px' }">
  3. <view class="more-line">
  4. <m-line color="#d4d4d4" length="100%" :hairline="true"></m-line>
  5. </view>
  6. <view class="flex_r more-list">
  7. <view class="flex_c_c more-item" v-for="(item, index) in list" :key="index" @click="onClick(item)">
  8. <view class="icon_ more-item-icon">
  9. <image class="img" :src="item.icon" mode="aspectFill"></image>
  10. </view>
  11. <view class="text_26" style="color: #686868">
  12. {{ item.title }}
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. props: {
  21. value: {
  22. type: Boolean,
  23. default: false
  24. }
  25. },
  26. // #4c4c4c
  27. data() {
  28. return {
  29. isShow: false,
  30. list: [
  31. {
  32. type: 'img',
  33. icon: 'https://jymini.oss-cn-guangzhou.aliyuncs.com/mini/pic.svg',
  34. title: '照片'
  35. },
  36. {
  37. type: 'order',
  38. icon: 'https://jymini.oss-cn-guangzhou.aliyuncs.com/mini/order.svg',
  39. title: '订单'
  40. },
  41. // {
  42. // type: 'video',
  43. // icon: 'https://jymini.oss-cn-guangzhou.aliyuncs.com/mini/video.svg',
  44. // title: '视频'
  45. // }
  46. ]
  47. };
  48. },
  49. created() {},
  50. watch: {
  51. value: {
  52. handler: function (newV) {
  53. this.isShow = newV;
  54. },
  55. immediate: true
  56. }
  57. },
  58. methods: {
  59. onClick(item) {
  60. this.$emit('onMore', item);
  61. }
  62. }
  63. };
  64. </script>
  65. <style lang="scss" scoped>
  66. .more {
  67. position: relative;
  68. box-sizing: border-box;
  69. width: 100%;
  70. background-color: #f6f6f6;
  71. overflow: hidden;
  72. transition: all 0.2s;
  73. .more-line {
  74. position: absolute;
  75. top: 0;
  76. left: 0;
  77. right: 0;
  78. }
  79. .more-list {
  80. box-sizing: border-box;
  81. padding: 20rpx;
  82. width: 100%;
  83. height: 370rpx;
  84. flex-wrap: wrap;
  85. }
  86. .more-item {
  87. width: 25%;
  88. height: 190rpx;
  89. .more-item-icon {
  90. width: 120rpx;
  91. height: 120rpx;
  92. background-color: #fff;
  93. border-radius: 30rpx;
  94. margin-bottom: 10rpx;
  95. .img {
  96. width: 50%;
  97. height: 50%;
  98. }
  99. }
  100. }
  101. }
  102. </style>