鸿宇研学生前端代码
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.

58 lines
1.1 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <view class="page__view highlight">
  3. <navbar title="标记有我" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="record">
  5. <view class="record-item" v-for="(image, imgIdx) in markmeList" :key="imgIdx">
  6. <image class="img" :src="image" mode="aspectFill" @click="previewImage(markmeList, imgIdx)"></image>
  7. </view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. import { mapState } from 'vuex'
  13. export default {
  14. data() {
  15. return {
  16. }
  17. },
  18. computed: {
  19. ...mapState(['markmeList']),
  20. },
  21. methods: {
  22. previewImage(arr, index) {
  23. uni.previewImage({
  24. urls: arr,
  25. current: arr[index], // 当前显示图片的链接
  26. });
  27. },
  28. },
  29. }
  30. </script>
  31. <style lang="scss" scoped>
  32. .record {
  33. width: 100%;
  34. padding: 40rpx;
  35. box-sizing: border-box;
  36. display: grid;
  37. grid-template-columns: repeat(3, 1fr);
  38. gap: 16rpx;
  39. &-item {
  40. height: 300rpx;
  41. border: 2rpx solid #CDCDCD;
  42. border-radius: 12rpx;
  43. overflow: hidden;
  44. .img {
  45. width: 100%;
  46. height: 100%;
  47. }
  48. }
  49. }
  50. </style>