<template>
	<view class="page__view highlight">

		<navbar title="标记有我" leftClick @leftClick="$utils.navigateBack" />

    <view class="record">
      <view class="record-item" v-for="(image, imgIdx) in markmeList" :key="imgIdx">
        <image class="img" :src="image" mode="aspectFill" @click="previewImage(markmeList, imgIdx)"></image>
      </view>
    </view>

  </view>
</template>

<script>
	import { mapState } from 'vuex'

  export default {
    data() {
      return {
      }
    },
    computed: {
			...mapState(['markmeList']),
    },
    methods: {
      previewImage(arr, index) {
        uni.previewImage({
          urls: arr,
          current: arr[index], // 当前显示图片的链接
        });
      },
    },
  }
</script>

<style lang="scss" scoped>

  .record {
    width: 100%;
    padding: 40rpx;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16rpx;

    &-item {
      height: 300rpx;
      border: 2rpx solid #CDCDCD;
      border-radius: 12rpx;
      overflow: hidden;

      .img {
        width: 100%;
        height: 100%;
      }
    }
  }
</style>